// GENERAL FUNCTIONS

function OpenURL(url)
{
	window.open(url);	 
}


//This function accepts a list of div IDs as parameters.
//Purpose: Hides all divs passed in the parameter list except the first one which is not hidden
//First Argument in the parameter list will be the id that is shown, the rest will be hidden 
function Toggle()
{
	var ArgNum   = arguments.length;
	var mydiv;
	
	//Take the first argument in the argument list and make it visible.
	mydiv = document.getElementById(arguments[0]);
	mydiv.style.display = "";
	
	// This will hide all divs that were sent into the function
	for (i=1; i < ArgNum; i++)
	{
		mydiv = document.getElementById(arguments[i]);
		mydiv.style.display = "none";   //Hide the div
	}
}


function copy_fields()
{

	var flag = document.hosting_form.SameAsPhysical.value;
     
	if(flag == 'ON')
 	{
    	document.hosting_form.SameAsPhysical.value = 'OFF';
     	//Empty Fields
     	document.hosting_form.bfirst.value = '';
     	document.hosting_form.blast.value = '';
     	document.hosting_form.baddress1.value = '';
     	document.hosting_form.baddress2.value = '';
     	document.hosting_form.bcity.value = '';
     	document.hosting_form.bstate.value = '';
     	document.hosting_form.bzip.value = '';
     	//Set Focus to First Name Field in the Billing Info
     	document.hosting_form.bfirst.focus();
 	}
 	else
 	{
     	document.hosting_form.SameAsPhysical.value = 'ON';
     	//Fill Fields
     	document.hosting_form.bfirst.value=document.hosting_form.pfirst.value;
     	document.hosting_form.blast.value=document.hosting_form.plast.value;
     	document.hosting_form.baddress1.value=document.hosting_form.paddress1.value;
     	document.hosting_form.baddress2.value=document.hosting_form.paddress2.value;
     	document.hosting_form.bcity.value=document.hosting_form.pcity.value;
     	document.hosting_form.bstate.value=document.hosting_form.pstate.value;
     	document.hosting_form.bzip.value=document.hosting_form.pzip.value;
     	
     	//document.hosting_form.pwh.focus();
 	}
}