
var envs = new Array();
document.onload = outputPostOverForm();

function envInfo( n, u )
{
	this.nam=n ;
	this.add=u; 
}


function AAPostOver( postOverId, pageId, openNewWindow, env )
{	
    	var clientlocation = window.location?window.location:window.parent.location;
    
   	postOver( openNewWindow, env, clientlocation, postOverId, pageId );
}

function outputPostOverForm()
{	
	document.writeln("<form id='postOverForm' name='postOverForm' method='post' >");
	document.writeln("<input type='hidden' id='urlRef' name='urlRef'>");
	document.writeln("<input type='hidden' id='id' name='id'>");
	document.writeln("<input type='hidden' id='pageid' name='pageid'>");
	document.writeln("</form>");
}

function postOver( openNewWindow, env, clientlocation, postOverId, pageId )
{
    	var postOverUrl = getpostOver( env );
   
    	if(openNewWindow)
    	{
        	//document.postOverForm.onSubmit='createNewWindow'
        	document.postOverForm.target = '_new';
    	}
   
    	document.postOverForm.action = postOverUrl;
    	document.postOverForm.urlRef.value = clientlocation;
	document.postOverForm.id.value = postOverId;
	document.postOverForm.pageid.value = pageId
	document.postOverForm.submit();
}

function createNewWindow()
{
	var win = window.open("www.AccessAllstate.com", "AccessAllstate", "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}

function getpostOver ( env )
{
	return env + '/anon/postover.aspx';
}

