var sHref =window.location.toString();
var bReload = false;


if(eval(window.location.toString().indexOf('www'))==eval(-1))
{
	sHref = sHref.replace("//","//www.");
	bReload = true;
}

if(eval(sHref.indexOf('https'))==eval(-1))
{
	sHref=sHref.replace("http:","https:");
	bReload = true;
}

if(bReload){window.location = sHref;}

function doLoad()
{
	try{
		if (document.all.header_iptStatusMessage.value) 
		{
			var strMsg = document.all.header_iptStatusMessage.value;
			var arrMsg=document.all.header_iptStatusMessage.value.split('::');

			document.all.spnRollMemo.innerHTML = arrMsg[1];
			showInfoDiv(eval(arrMsg[0]));
		}
	}
	catch(e){}
	try{pageLoad();}catch(e){}
	
	setDIV();
	checkError();
}

function doNext()
{
		syncChanges('Signup');
		syncChanges('ServiceTierListXML');
		__doPostBack('cmdNext','');
}	

function checkError()
{
	try{
		if(xmlSignup.firstChild.childNodes[0].getElementsByTagName('error')[0].text)
		{
			var arrMsg =xmlSignup.firstChild.childNodes[0].getElementsByTagName('error')[0].text.split(";");
			
			for (var j = 0; j < arrMsg.length; j++)
			{
				showhideErr(eval('document.all.txt'+Left(arrMsg[j],arrMsg[j].indexOf(':'))),URLencode(Right(arrMsg[j],Len(arrMsg[j])-arrMsg[j].indexOf(':')-1)),true,false,'');
			}
		}
	}
	catch(e){}
}

function URLencode(sStr)
{
	return sStr.replace('&lt;br&gt;', '<br>');
}

function hideDivStatus()
{
	document.all.divStatus.style.visibility = 'hidden';	
	document.all.divStatus.style.display = 'none';
}

function hideDivInformation()
{
	document.all.divInformation.style.visibility = 'hidden';	
	document.all.divInformation.style.display = 'none';
}


		var a;
		var ypos=0;
		var started=0;
		var Id=0;
		function hideInfoDiv(iVal)
		{	
			if(iVal>0)
			{
				ypos=0;
			}
			
			ypos=ypos-15;
			if(ypos<0){ypos=0;}
			
			document.all.divRollMemo.style.height=ypos;
			if (ypos<=0)
			{
				window.clearTimeout(Id);Id=0;
				document.all.divRollMemo.style.visibility='hidden';
				document.all.divRollMemo.style.display='none';
				gshowElement( 'SELECT' );
			}
			else{Id = window.setTimeout('hideInfoDiv(0);',5);}
		
		}
		
		function showInfoDiv(iType)
		{
			
				document.all.divRollMemo.style.visibility='visible';
				document.all.divRollMemo.style.display='block';
				switch(iType) 
				{
					case(1): //INFO
						document.all.imgRollMemo.src = 'images/header/info.gif';
						break
					case(2): //WARNING
						document.all.imgRollMemo.src = 'images/header/warn.gif';
						break
					case(3): //ERROR
						document.all.imgRollMemo.src = 'images/header/error.gif';
						break
				}

				if (a==1)
				{
					a=-1;
				}
				else
				{
					a=1;
				}
				//ghideElement( 'SELECT', document.all.divRollMemo )
				document.all.divRollMemo.style.left = ((screen.width - document.all.tblRollMemo.width)/2);
				if(!Id){movemenu();started=1;}
			
		}

		function movemenu()
		{
			try{
				if(ypos>100){ypos=0;}
				if(ypos<0){ypos=0;}
				ypos=ypos+15;
				document.all.divRollMemo.style.height=ypos;
				if (ypos<=0 || ypos>=100){window.clearTimeout(Id);Id=0;window.setTimeout('hideInfoDiv();',8000);}else{Id = window.setTimeout('movemenu();',5);}
			}
			catch(e){}
		}
		

