<!--//
// USED ON GLOBAL SITES HOMEPAGES TO CHANGE COUNTRY SITE
 function surfto(form) {
        var myindex=form.global_sites.selectedIndex
        if (form.global_sites.options[myindex].value != "0")
 {
        window.open(form.global_sites.options[myindex].value, target="_top");}
 }
//-->

// USED ON POP UPS
//general popups
function popUp(url) {
	var popWindow = window.open(url,'pop','width=500,height=450,top=167,left=165,scrollbars,resizable');
	popWindow.focus();
}


function MM_openCountryWindow(URL) 

{ 
	window.open(URL	,'','width=300,height=375,scrollbars=0,resizable=0');
 }
 
 function MM_openLangWindow(theURL) 
{ 
	window.open(theURL,'','width=300,height=375,scrollbars=0,resizable=0');
 }



<!--//
// ********************************** Written by Will Welch (willw@digitalwave.com) 11/00 **********************************
//	browser check
if (parseInt(navigator.appVersion) >= 4) {
	browserName = (navigator.appName == "Netscape") ? "ns40" : ((navigator.appName == "Microsoft Internet Explorer") ? "ms40" : "null");
} else {
	browserName = "null";
}
// ********************************** Written by Will Welch (willw@digitalwave.com) 11/00 **********************************
//-->


function showAvailability(a) {
	var new_window;
	var popup_page = "/Commerce/Member/ASP/SSL/availability.asp?type=";
	var features = 'height='+150+','+
				   'width='+320+','+
				   'top='+90+','+
				   'left='+400+','+
				   'menubar='+0+','+
				   'scrollbars='+0+','+
				   'toolbar='+0+','+
				   'resizable='+0;
	new_window = window.open(popup_page + a,"availability",features);
	new_window.focus();
}


//This function makes the Shipping address fields same as the billing address fields.
// used by membership/ApplyForMapping.asp and membership/RegisterToPurchase.asp
function changeshippingaddress()
{
	if (document.Purchasereg.useSameAddress.checked)
	{
		document.Purchasereg.companyShipTo.value = document.Purchasereg.companyBillTo.value;
		document.Purchasereg.address1ShipTo.value = document.Purchasereg.address1BillTo.value;
		document.Purchasereg.address2ShipTo.value = document.Purchasereg.address2BillTo.value;
		document.Purchasereg.cityShipTo.value = document.Purchasereg.cityBillTo.value;
		document.Purchasereg.countyShipTo.value = document.Purchasereg.countyBillTo.value;
		document.Purchasereg.stateShipTo.value = document.Purchasereg.stateBillTo.value;
		document.Purchasereg.postalCodeShipTo.value = document.Purchasereg.postalCodeBillTo.value;
		document.Purchasereg.countryShipTo.value = document.Purchasereg.countryBillTo.value;
		document.Purchasereg.phoneShipTo.value = document.Purchasereg.phoneBillTo.value;
		document.Purchasereg.faxShipTo.value = document.Purchasereg.faxBillTo.value;
	}
}

