var getById = (typeof document.getElementById != "undefined");

function show_select(tr_name, field_name, level){
	//alert(tr_name);

	for (k = level; k<=5; k++)
	{
		obj2 = document.Sub_Form.elements[field_name + "_active_select_level_" + k];
		hide_select(obj2.value);
		obj2.value = "";
	}

	if (toggleDisplay2(tr_name,'block'))
	{
		obj2 = document.Sub_Form.elements[field_name + "_active_select_level_" + level];
		obj2.value = tr_name;
	}

}

function hide_select(tr_name){
	var name_list = tr_name.split(",");

	for(i = 0; i<name_list.length; i++)
	{
		//alert(name_list[i]);
		toggleDisplay2(name_list[i],'none')
	}
}


function show_select2(tr_name, field_name, level,value){
	//alert(tr_name);
	
	$old_value = "";

	if (value !=true)
	{
		for (k = level; k<=5; k++)
		{
			obj2 = document.Sub_Form.elements[field_name + "_active_select_level_" + k];
			hide_select(obj2.value);
			obj2.value = "";
		}
	}
	else
	{
		if (toggleDisplay2(tr_name,'block'))
		{
			obj2 = document.Sub_Form.elements[field_name + "_active_select_level_" + level];
			obj2.value = tr_name;
		}
	}

}

function toggleDisplay2(objname,display1){
    //if(!getById) return;
	
    obj = getRef(objname);
    
	if (!obj)
		return false;

	obj.style.display = display1;
	return true;

}

function toggleDisplay(objname,display1,display2){
    //if(!getById) return;
	
    obj = getRef(objname);
    
	if (!obj)
		return;

    if(obj.style.display == display2)
	obj.style.display = display1;
    else
	obj.style.display = display2;

}

function getRef(obj){
    if(getById)
	return(typeof obj == "string") ? document.getElementById(obj) : obj;
}

function getCookieVal (offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
            return getCookieVal (j);
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
    }
    return null;
}

function SetCookie (name, value) {
    var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
        ((path == null) ? "" : ("; path=" + path)) +
        ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
}




var dummy  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
var dummy2  = /^([a-zA-Z1_])+([0-9_])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

var mikExpPos1 = /[a-zA-Z10_\ \!\$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\-\:\;\\"\'\<\,\>\.\?\/\|\\\\`\~\=\|]/;
var mikExp = /[a-zA-Z_\ \!$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\-\:\;\\"\'\<\,\>\.\?\/\|\\\\`\~\=\|]/;
var formikExpPos1 = /[a-zA-Z10_\ \!\$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\-\:\;\\"\'\<\,\>\.\?\/\|\\\\`\~\=\|]/;
var formikExp = /[a-zA-Z_\ \!$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\-\:\;\\"\'\<\,\>\.\?\/\|\\\\`\~\=\|]/;
function checkphone(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	var charpos1 = val.value.charAt(0);
	if(charpos1.search(mikExpPos1) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
	var lchar = val.value.charAt((strLength) - 1);
	if(lchar.search(mikExp) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
}
/*
function CheckYN() {
	subscribeoption = -1
	for (i=0; i < document.forms[0].subscribe.length; i++) {
		if (document.forms[0].subscribe[i].checked) {
			subscribeoption = i
		}
	}
	if (subscribeoption == 1) {
		var subscribeAlerttext1 = "You have indicated that you do not wish to receive (continue to receive) this publication.\n\nIf you wish to cancel your subscription, please call 888-527-7008 between the hours of 7:30 am and 5:30 pm USA Central time or 218-723-9477 and a customer service representative will assist you.  Outside the U.S. please phone +1-218-723-9477.\n\nSubscribers outside North America may also email us at fulfill@superfill.com  Please include the publication title in the subject line of your email.\n\nOr, change your response to 'Yes' to continue.";
		alert(subscribeAlerttext1);
		document.forms[0].subscribe[1].checked = false;
		document.forms[0].subscribe[0].focus();
		return false
	}
}
*/
function checkforeignphone(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	var lchar = val.value.charAt((strLength) - 1);
	if(lchar.search(formikExp) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
}

function checkphonelength(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	if(strLength != 10) {
		if(strLength != 0) {
			alert("The Phone Field Must Contain 10 Digits");
			document.forms[0].phone.value = "";
			document.forms[0].phone.focus();
			return false
		}
	}
}

function checkfax(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	var charpos1 = val.value.charAt(0);
	if(charpos1.search(mikExpPos1) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
	var lchar = val.value.charAt((strLength) - 1);
	if(lchar.search(mikExp) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
}

function checkforeignfax(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	var lchar = val.value.charAt((strLength) - 1);
	if(lchar.search(formikExp) != -1) {
		var tst = val.value.substring(0, (strLength) - 1);
		val.value = tst;
	}
}

function checkfaxlength(val) {
	var strPass = val.value;
	var strLength = strPass.length;
	if(strLength != 10) {
		if(strLength != 0) {
			alert("The Fax Field Must Contain 10 Digits");
			document.forms[0].fax.value = "";
			document.forms[0].fax.focus();
			return false
		}
	}
}


closetime = 1;
// 0 = do not close, anything else = number of seconds
function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup() {
url = "http://listmgr.advanstar.com/subscribe/subscribe.tml?Address_1_=&Address_2_=&City_Name_=&Class_code=&Company_Name_=&Country_=USA&First_Name_=&Func_Title_code=&Last_Name_=&Occupation_=&Postal_Code_=&State_Province_=&name= &email=&list=&demographics=Address_1_ Address_2_ City_Name_ Class_code Company_Name_ Country_ First_Name_ Func_Title_code Last_Name_ Occupation_ Postal_Code_ State_Province_&confirm=none&showconfirm=F";
width = 700;  // width of window in pixels
height = 200; // height of window in pixels
delay = 0;    // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}

//configure messages to be displayed
//If message contains apostrophe('), backslash them (ie: "I\'m fine")
var statemessage=new Array()
var statefield=new Array()
var phoneinputbox=new Array()
var faxinputbox=new Array()
var phonefaxdescription=new Array()
var a3cmessage=new Array()
var ziptext=new Array()
var zipasttext=new Array()
//var busstatetext=new Array()
var surnametext=new Array()
var openingtags='<font face="Arial" size="4">'
statemessage[0]='<B class="bodyredbold">*</B> State:<br>'
statemessage[1]='<B class="bodyredbold">*</B> Province:<br>'
statemessage[2]='&nbsp;&nbsp;County:<br>'
statemessage[3]='State/Province:<br>'

phoneinputbox[0]='<input onkeyup="javascript:checkphone(Sub_Form.phone);" onchange="return checkphonelength(Sub_Form.phone)" class="form" type="text" name="phone" size="20" maxlength="10" value="" >'
phoneinputbox[2]='<input onkeyup="javascript:checkforeignphone(Sub_Form.phone);" class="form" type="text" name="phone" size="20" maxlength="20" value="">'

faxinputbox[0]='<input onkeyup="javascript:checkfax(Sub_Form.fax);" onchange="return checkfaxlength(Sub_Form.fax)" class="form" type="text" name="fax" size="20" maxlength="10" value="" >'
faxinputbox[2]='<input onkeyup="javascript:checkforeignfax(Sub_Form.fax);" class="form" type="text" name="fax" size="20" maxlength="20" value="">'

phonefaxdescription[0]='Enter Phone/Fax in the format<br>(2187239900)'
phonefaxdescription[1]='Enter Phone/Fax in the format<br>(2187239900)'
phonefaxdescription[2]='Enter Phone/Fax in the format<br>(00441248670512)'
phonefaxdescription[3]='Enter Phone/Fax in the format<br>(85225891390)'

a3cmessage[0]='Address 3:<br><input class="form" type="text" name="address3" size="60" maxlength="100" value="">'
a3cmessage[1]='<TABLE><TR><TD height="17"><input class="form" type="hidden" name="address3" value=""></TD></TR></TABLE>'
ziptext[0]='Zip Code'
ziptext[1]='Post Code'
zipasttext[0] = '<B class="bodyredbold">*</B> '
zipasttext[1] = ''
//busstatetext[0] = 'State/Province'
//busstatetext[1] = 'County'
surnametext[0]='Last Name'
surnametext[1]='Family Name'
statefield[0]='<select class="form" name="state">'
statefield[0]=statefield[0]+'<option value="ZZZ">Select State</option>'

		statefield[0]=statefield[0]+'<option value="AL">ALABAMA</option>'
	
		statefield[0]=statefield[0]+'<option value="AK">ALASKA</option>'
	
		statefield[0]=statefield[0]+'<option value="AZ">ARIZONA</option>'
	
		statefield[0]=statefield[0]+'<option value="AR">ARKANSAS</option>'
	
		statefield[0]=statefield[0]+'<option value="CA">CALIFORNIA</option>'
	
		statefield[0]=statefield[0]+'<option value="CO">COLORADO</option>'
	
		statefield[0]=statefield[0]+'<option value="CT">CONNECTICUT</option>'
	
		statefield[0]=statefield[0]+'<option value="DE">DELAWARE</option>'
	
		statefield[0]=statefield[0]+'<option value="DC">DISTRICT OF COLUMBIA</option>'
	
		statefield[0]=statefield[0]+'<option value="FL">FLORIDA</option>'
	
		statefield[0]=statefield[0]+'<option value="GA">GEORGIA</option>'
	
		statefield[0]=statefield[0]+'<option value="HI">HAWAII</option>'
	
		statefield[0]=statefield[0]+'<option value="ID">IDAHO</option>'
	
		statefield[0]=statefield[0]+'<option value="IL">ILLINOIS</option>'
	
		statefield[0]=statefield[0]+'<option value="IN">INDIANA</option>'
	
		statefield[0]=statefield[0]+'<option value="IA">IOWA</option>'
	
		statefield[0]=statefield[0]+'<option value="KS">KANSAS</option>'
	
		statefield[0]=statefield[0]+'<option value="KY">KENTUCKY</option>'
	
		statefield[0]=statefield[0]+'<option value="LA">LOUISIANA</option>'
	
		statefield[0]=statefield[0]+'<option value="ME">MAINE</option>'
	
		statefield[0]=statefield[0]+'<option value="MD">MARYLAND</option>'
	
		statefield[0]=statefield[0]+'<option value="MA">MASSACHUSETTS</option>'
	
		statefield[0]=statefield[0]+'<option value="MI">MICHIGAN</option>'
	
		statefield[0]=statefield[0]+'<option value="MN">MINNESOTA</option>'
	
		statefield[0]=statefield[0]+'<option value="MS">MISSISSIPPI</option>'
	
		statefield[0]=statefield[0]+'<option value="MO">MISSOURI</option>'
	
		statefield[0]=statefield[0]+'<option value="MT">MONTANA</option>'
	
		statefield[0]=statefield[0]+'<option value="NE">NEBRASKA</option>'
	
		statefield[0]=statefield[0]+'<option value="NV">NEVADA</option>'
	
		statefield[0]=statefield[0]+'<option value="NH">NEW HAMPSHIRE</option>'
	
		statefield[0]=statefield[0]+'<option value="NJ">NEW JERSEY</option>'
	
		statefield[0]=statefield[0]+'<option value="NM">NEW MEXICO</option>'
	
		statefield[0]=statefield[0]+'<option value="NY">NEW YORK</option>'
	
		statefield[0]=statefield[0]+'<option value="NC">NORTH CAROLINA</option>'
	
		statefield[0]=statefield[0]+'<option value="ND">NORTH DAKOTA</option>'
	
		statefield[0]=statefield[0]+'<option value="OH">OHIO</option>'
	
		statefield[0]=statefield[0]+'<option value="OK">OKLAHOMA</option>'
	
		statefield[0]=statefield[0]+'<option value="OR">OREGON</option>'
	
		statefield[0]=statefield[0]+'<option value="PA">PENNSYLVANIA</option>'
	
		statefield[0]=statefield[0]+'<option value="RI">RHODE ISLAND</option>'
	
		statefield[0]=statefield[0]+'<option value="SC">SOUTH CAROLINA</option>'
	
		statefield[0]=statefield[0]+'<option value="SD">SOUTH DAKOTA</option>'
	
		statefield[0]=statefield[0]+'<option value="TN">TENNESSEE</option>'
	
		statefield[0]=statefield[0]+'<option value="TX">TEXAS</option>'
	
		statefield[0]=statefield[0]+'<option value="UT">UTAH</option>'
	
		statefield[0]=statefield[0]+'<option value="VT">VERMONT</option>'
	
		statefield[0]=statefield[0]+'<option value="VA">VIRGINIA</option>'
	
		statefield[0]=statefield[0]+'<option value="WA">WASHINGTON</option>'
	
		statefield[0]=statefield[0]+'<option value="WV">WEST VIRGINIA</option>'
	
		statefield[0]=statefield[0]+'<option value="WI">WISCONSIN</option>'
	
		statefield[0]=statefield[0]+'<option value="WY">WYOMING</option>'
	
		statefield[0]=statefield[0]+'<option value="AS">AMERICAN SAMOA</option>'
	
		statefield[0]=statefield[0]+'<option value="GU">GUAM</option>'
	
		statefield[0]=statefield[0]+'<option value="PR">PUERTO RICO</option>'
	
		statefield[0]=statefield[0]+'<option value="VI">VIRGIN ISLANDS</option>'
	
statefield[0]=statefield[0]+'</SELECT>'
statefield[1]='<select class="form" name="state">'
statefield[1]=statefield[1]+'<option value="ZZZ">Select Province</option>'

	statefield[1]=statefield[1]+'<option value="AB">ALBERTA</option>'
	
	statefield[1]=statefield[1]+'<option value="BC">BRITISH COLUMBIA</option>'
	
	statefield[1]=statefield[1]+'<option value="NL">LABRADOR</option>'
	
	statefield[1]=statefield[1]+'<option value="MB">MANITOBA</option>'
	
	statefield[1]=statefield[1]+'<option value="NB">NEW BRUNSWICK</option>'
	
	statefield[1]=statefield[1]+'<option value="NL">NEWFOUNDLAND</option>'
	
	statefield[1]=statefield[1]+'<option value="NT">NORTHWEST TERRITORY</option>'
	
	statefield[1]=statefield[1]+'<option value="NS">NOVA SCOTIA</option>'
	
	statefield[1]=statefield[1]+'<option value="ON">ONTARIO</option>'
	
	statefield[1]=statefield[1]+'<option value="PE">PRINCE EDWARD ISLAND</option>'
	
	statefield[1]=statefield[1]+'<option value="QC">QUEBEC</option>'
	
	statefield[1]=statefield[1]+'<option value="SK">SASKATCHEWAN</option>'
	
	statefield[1]=statefield[1]+'<option value="YT">YUKON TERRITORY</option>'
	
statefield[1]=statefield[1]+'</SELECT>'
statefield[2]='<input class="form" type="text" name="county" size="10" value=""><input type="hidden" name="state" value="">'
statefield[3]='<input class="form" type="hidden" name="county" size="10" value=""><input type="text" name="state" value="">'
var closingtags='</font>'





//Do not edit below this line (besides HTML code at the very bottom)
var i=0;
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ie5=document.getElementById?1:0
var ns6=document.getElementById&&!document.all?1:0

function Left(str, n)
	/***
	IN: str - the string we are LEFTing
	n - the number of characters we want to return
	RETVAL: n characters from the left side of the string
	***/
	{
	if (n <= 0)     // Invalid bound, return blank string
		return "";
	else if (n > String(str).length)   // Invalid bound, return
		return str;                // entire string
	else // Valid bound, return appropriate substring
		return String(str).substring(0,n);
}


function displaystate(){
	sc_cross.style.visibility="hidden"
	//a3c_cross.style.visibility="hidden"
	z_cross.style.visibility="hidden"
	za_cross.style.visibility="hidden"
	//busstate_cross.visibility="hidden"
	//surname_cross.style.visibility="hidden"

	//phoneinputbox_cross.style.visibility="hidden"
	//faxinputbox_cross.style.visibility="hidden"
	//phonefaxdescription_cross.style.visibility="hidden"

	if (document.forms[0].id_country.value == "ZZZ") {
		phoneinputbox_cross.innerHTML=phoneinputbox[0]
		faxinputbox_cross.innerHTML=faxinputbox[0]
		phonefaxdescription_cross.innerHTML=phonefaxdescription[0]
	
		sc_cross.innerHTML=statemessage[3]+statefield[3]
		a3c_cross.innerHTML=a3cmessage[0]
		z_cross.innerHTML=ziptext[1]
		za_cross.innerHTML=zipasttext[1]
		//busstate_cross.innerHTML=busstatetext[1]
		surname_cross.innerHTML=surnametext[1]
	
	}
	else if (document.forms[0].id_country.value == "1") {
		phoneinputbox_cross.innerHTML=phoneinputbox[0]
		faxinputbox_cross.innerHTML=faxinputbox[0]
		phonefaxdescription_cross.innerHTML=phonefaxdescription[0]
		sc_cross.innerHTML=statemessage[0]+statefield[0]
	
		a3c_cross.innerHTML=a3cmessage[1]
	
		z_cross.innerHTML=ziptext[0]
		za_cross.innerHTML=zipasttext[0]
		//busstate_cross.innerHTML=busstatetext[0]
		surname_cross.innerHTML=surnametext[0]
	}
//	else if (document.forms[0].id_country.value == "51?AN") {
	else if (Left(document.forms[0].id_country.value,3) == "51") {
		sc_cross.innerHTML=statemessage[1]+statefield[1]
		phoneinputbox_cross.innerHTML=phoneinputbox[0]
		faxinputbox_cross.innerHTML=faxinputbox[0]
		phonefaxdescription_cross.innerHTML=phonefaxdescription[0]
	
		a3c_cross.innerHTML=a3cmessage[1]
	
		z_cross.innerHTML=ziptext[0]
		za_cross.innerHTML=zipasttext[0]
		//busstate_cross.innerHTML=busstatetext[0]
		surname_cross.innerHTML=surnametext[0]
	}
//	else if (document.forms[0].id_country.value == "112?HK") {
	else if (Left(document.forms[0].id_country.value,4) == "112") {
		phoneinputbox_cross.innerHTML=phoneinputbox[2]
		faxinputbox_cross.innerHTML=faxinputbox[2]
		phonefaxdescription_cross.innerHTML=phonefaxdescription[3]
		sc_cross.innerHTML=statemessage[3]+statefield[3]
		a3c_cross.innerHTML=a3cmessage[0]
		z_cross.innerHTML=ziptext[1]
		za_cross.innerHTML=zipasttext[1]
		//busstate_cross.innerHTML=busstatetext[1]
		surname_cross.innerHTML=surnametext[1]
	
		a3c_cross.innerHTML=a3cmessage[1]
	
	}
	else {
		phoneinputbox_cross.innerHTML=phoneinputbox[2]
		faxinputbox_cross.innerHTML=faxinputbox[2]
		phonefaxdescription_cross.innerHTML=phonefaxdescription[2]
		sc_cross.innerHTML=statemessage[2]+statefield[2]
		a3c_cross.innerHTML=a3cmessage[0]
		z_cross.innerHTML=ziptext[1]
		za_cross.innerHTML=zipasttext[1]
		//busstate_cross.innerHTML=busstatetext[1]
		surname_cross.innerHTML=surnametext[1]
	}
	phoneinputbox_cross.style.left=0
	phoneinputbox_cross.style.top=0
	faxinputbox_cross.style.left=0
	faxinputbox_cross.style.top=0
	phonefaxdescription_cross.style.left=0
	phonefaxdescription_cross.style.top=0
	sc_cross.style.left=0
	sc_cross.style.top=0
	a3c_cross.style.left=0
	a3c_cross.style.top=0
	z_cross.style.left=0
	z_cross.style.top=0
	za_cross.style.left=0
	za_cross.style.top=0
	surname_cross.style.left=0
	surname_cross.style.top=0
	phoneinputbox_cross.style.visibility="visible"
	faxinputbox_cross.style.visibility="visible"
	phonefaxdescription_cross.style.visibility="visible"
	sc_cross.style.visibility="visible"
	a3c_cross.style.visibility="visible"
	z_cross.style.visibility="visible"
	za_cross.style.visibility="visible"
	surname_cross.style.visibility="visible"
}

function displaystate_ns(){
	if (i<statemessage.length){
		sc_ns.visibility="hide"
		sc_ns.document.write(openingtags+statemessage[i]+closingtags+statefield[i])
		sc_ns.document.close()
		sc_ns.left=290
		sc_ns.top=578
		sc_ns.visibility="show"
		i++
	}
}

function positioncontainers(){
	if (ie5||ns6){
		sc_cross=ns6?document.getElementById("statecontainer"):document.all.statecontainer
		a3c_cross=ns6?document.getElementById("address3container"):document.all.address3container
		z_cross=ns6?document.getElementById("zipcontainer"):document.all.zipcontainer
		za_cross=ns6?document.getElementById("zipastcontainer"):document.all.zipastcontainer
		//busstate_cross=ns6?document.getElementById("busstatecontainer"):document.all.busstatecontainer
		surname_cross=ns6?document.getElementById("surnamecontainer"):document.all.surnamecontainer
		phoneinputbox_cross=ns6?document.getElementById("phoneinputboxcontainer"):document.all.phoneinputboxcontainer
		faxinputbox_cross=ns6?document.getElementById("faxinputboxcontainer"):document.all.faxinputboxcontainer
		phonefaxdescription_cross=ns6?document.getElementById("phonefaxdescriptioncontainer"):document.all.phonefaxdescriptioncontainer
		//displaystate()
	}
	else if (ie5){
		sc_cross=ns6?document.getElementById("statecontainer"):document.all.statecontainer
		a3c_cross=ns6?document.getElementById("address3container"):document.all.address3container
		z_cross=ns6?document.getElementById("zipcontainer"):document.all.zipcontainer
		za_cross=ns6?document.getElementById("zipastcontainer"):document.all.zipastcontainer
		//busstate_cross=ns6?document.getElementById("busstatecontainer"):document.all.busstatecontainer
		surname_cross=ns6?document.getElementById("surnamecontainer"):document.all.surnamecontainer
		phoneinputbox_cross=ns6?document.getElementById("phoneinputboxcontainer"):document.all.phoneinputboxcontainer
		faxinputbox_cross=ns6?document.getElementById("faxinputboxcontainer"):document.all.faxinputboxcontainer
		phonefaxdescription_cross=ns6?document.getElementById("phonefaxdescriptioncontainer"):document.all.phonefaxdescriptioncontainer
		//displaystate()
	}
	else if (ns4){
		sc_ns=document.statecontainerns
		sc_ns.visibility="show"
		//displaystate_ns()
	}
	else {
		sc_cross=ns6?document.getElementById("statecontainer"):document.all.statecontainer
		a3c_cross=ns6?document.getElementById("address3container"):document.all.address3container
		z_cross=ns6?document.getElementById("zipcontainer"):document.all.zipcontainer
		za_cross=ns6?document.getElementById("zipastcontainer"):document.all.zipastcontainer
		//busstate_cross=ns6?document.getElementById("busstatecontainer"):document.all.busstatecontainer
		surname_cross=ns6?document.getElementById("surnamecontainer"):document.all.surnamecontainer
		phoneinputbox_cross=ns6?document.getElementById("phoneinputboxcontainer"):document.all.phoneinputboxcontainer
		faxinputbox_cross=ns6?document.getElementById("faxinputboxcontainer"):document.all.faxinputboxcontainer
		phonefaxdescription_cross=ns6?document.getElementById("phonefaxdescriptioncontainer"):document.all.phonefaxdescriptioncontainer
		//displaystate()
	}
}
//window.onload=positioncontainers








							function checkMail() {
								if (document.forms[0].email.value != "") {
									var emailadr = document.forms[0].email.value;
									var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
									if (!filter.test(emailadr)) {
										alert('Please enter a correctly formatted Email address!');
										document.forms[0].email.value = "";
										document.forms[0].email.focus();
										return false
									}
								}
							}

							function checkConfirmMail() {
								if (document.forms[0].email.value != "") {
									var emailadr = document.forms[0].email.value;
									var emailconfirmadr = document.forms[0].emailconfirm.value;
									var filter2  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
									if (!filter2.test(emailadr)) {
										alert('Please enter a correctly formatted Email address!');
										document.forms[0].email.focus();
										return false
									}
									if (!filter2.test(emailconfirmadr)) {
										alert('Please enter a correctly formatted Confirm Email address!');
										document.forms[0].emailconfirm.focus();
										return false
									}
									if (emailadr != emailconfirmadr) {
										alert("The Confirm Email Address you entered does not match the Your E-mail Address.  Please re-enter.");
										document.forms[0].emailconfirm.focus();
										return false
									}
								}
							}



	function check_box(num)
	{
		if (num == "none" )
		{
			if (document.getElementById('plan_to_provideAll').checked)
			{
				for (i=0; i<=10; i++)
					document.getElementById('plan_to_provide'+i).checked = false;
			}
		}
		else
		{
			if (document.getElementById('plan_to_provide'+num).checked)
				document.getElementById('plan_to_provideAll').checked = false;
		}
	}
	function check_box2(num)
	{
		if (num == "none" )
		{
			if (document.getElementById('plan_to_buyAll').checked)
			{
				for (i=0; i<=10; i++)
					document.getElementById('plan_to_buy'+i).checked = false;
			}
		}
		else
		{
			if (document.getElementById('plan_to_buy'+num).checked)
				document.getElementById('plan_to_buyAll').checked = false;
		}
	}