addEvent (document.forms[0], "submit", submitPrepop);
	
function submitPrepop(){
	document.forms[0].action = 	"prepop.aspx";
}
function showAddress(object, prevAddID,footerHeight,formcontentHeight,newFooterHeight,newFormcontentHeight) 

{

var x = object;

            if(x == 0)

            {

              document.getElementById(prevAddID).style.display="block";
              if(newFooterHeight != 0)
              {
                newFooterHeight = newFooterHeight + "px";
				document.getElementById("Footer").style.height=newFooterHeight;
			  }
			  if(newFormcontentHeight != 0)
			  {
				newFormcontentHeight = newFormcontentHeight + "px";
				document.getElementById("FormContent").style.height=newFormcontentHeight;
			  }	
            }

 

else

            {

              document.getElementById(prevAddID).style.display="none";
               if(footerHeight != 0)
              {
				footerHeight = footerHeight + "px";
				document.getElementById("Footer").style.height=footerHeight;
			  }
			  if(formcontentHeight != 0)
			  {
				formcontentHeight = formcontentHeight + "px";
				document.getElementById("FormContent").style.height=formcontentHeight;
			  }	

            }

}

function popState(state_list, user_state){
	for (var i=0; i < StateList.options.length; i++) {
		if(state_list.options[i].value==user_state){
			state_list.options[i].selected=true;
			break;
		}
	}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//This alternate function to give you more flexiblity in passing parameters. It might not work for some cases.//
//It was used for hmpgid93 - sv716
//The height for prev add will mostly be 100px different. This can be static.
//changeBg1, changeBg2, changeBg3 will be corresponding to the design of a page
//In this case, changeBg1 is the left of the form, changeBg2 is the right of the form
//changeBg3 is the footer part. If you don't need changeBg3 then put 'none' as your parameter in the LP.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function showAddressAlt(object, prevAddID, changeBg1, changeBg2, changeBg3, Height1, Height2) 

{

var x = object;
//this is to show prev add
    if(x == 0)

    {

            document.getElementById(prevAddID).style.display="block";
	    

       if(Height1 != 0)
        {
                newHeight1 = Height1 + 100;
				document.getElementById(changeBg1).style.height= newHeight1 + "px";
				
		}

	   if(Height2 != 0)
		{
				newHeight2 = Height2 + 100;
				document.getElementById(changeBg2).style.height= newHeight2 + "px";
				
		}

		if(changeBg3 != "none")
		{
			
			document.getElementById(changeBg3).style.marginTop = "100px";
		}
    }


else

    {

        document.getElementById(prevAddID).style.display="none";
             
        if(Height1 != 0)
            {
                Height1 = Height1 + "px";
				document.getElementById(changeBg1).style.height= Height1;
			}

	    if(Height2 != 0)
			{
				Height2 = Height2 + "px";
				document.getElementById(changeBg2).style.height= Height2;
			}
		
		if(changeBg3 != "none")
			{
				
				
				document.getElementById(changeBg3).style.marginTop = "0px";
			}
     }

}


//////////////
function showAddress2(object, prevAddID, changeBg1) { 
	var x = object;
	var userAgent = navigator.userAgent;
	var InfoBodyPadding;
	
	//this is to show prev add
	if(x == 0){
		
		if (/MSIE (\d+\.\d+);/.test(userAgent)){ 
			InfoBodyPadding = 85;
		}
		else if (/Firefox[\/\s](\d+\.\d+)/.test(userAgent)){ 
			InfoBodyPadding = 74;
		}
		else if (/Safari[\/\s](\d+\.\d+)/.test(userAgent)){
			InfoBodyPadding = 99;
		}

		document.getElementById(changeBg1).style.paddingBottom= InfoBodyPadding + "px";
		document.getElementById(prevAddID).style.display="block";
		
	}
	else {
		if (/MSIE (\d+\.\d+);/.test(userAgent)){ 
			InfoBodyPadding = 4;
		}
		else if (/Firefox[\/\s](\d+\.\d+)/.test(userAgent)){ 
			InfoBodyPadding = 2;
		}
		else if (/Safari[\/\s](\d+\.\d+)/.test(userAgent)){
			InfoBodyPadding = 22;
		}
		
		document.getElementById(changeBg1).style.paddingBottom= InfoBodyPadding + "px";
		document.getElementById(prevAddID).style.display="none";
	}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function swapButton(btnID, btnStatus, imgSrc)
	{
		
		if(btnStatus == "over")
		{
			
			document.getElementById(btnID).src = imgSrc;
		}

		else if(btnStatus == "out")

		{

			document.getElementById(btnID).src = imgSrc;
		}
	}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////