function validateData(dataTypeDef, 
					  userData) {

	if (dataTypeDef == "name") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "organization") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "email") {
		/*
		 * Can return -1 and -2
		 */
		if (isBlankString(userData)) {
			return -1;
		} else if (isValidEmail(userData) == false) {
			return -2;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "emailBusiness") {
		/*
		 * can return -1,-2 and -3 for invald business email
		 */
		if (isBlankString(userData)) {
			return -1;
		} else if (isValidEmail(userData) == false) {
			return -2;
		} else if (isValidEmail(userData) == '5') {
			return -3;			
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "phone") {
		if (isBlankString(userData)) {
			return -1;
		}else if (isValidPhone(userData) == false) {
			return -2;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "country") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "comments") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "role") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "username") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "interest") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "capatchacode") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}
	} else if (dataTypeDef == "prodchoice") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}	
	} else if (dataTypeDef == "numusers") {
		if (isBlankString(userData)) {
			return -1;
		} else  {
			return 1;
		}	
	} else {
		
	}
	
}



function isBlankString (theData){
	
	/* 
	Note : returns true if theEntry has (if no chars typed, white spaces typed, zero typed)
	 Language : JavaScript | accepts : content of a textField | returns : boolean (true , false)
	 does : checks whether the given input box is empty; Returns true if string s is empty or 
	 whitespace characters only.
    */
    if (theData == undefined){
    	return true;
    }
    
	/*	
	 * whitespace characters
	*/

	var whitespace = " \b\t\n\r";

	theInput = theData;
	theLength = theData.length;

	var startwhitespace = 0;
	var endwhitespace = 0;

	for ( var i = 0; i < theLength; i++) {

		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) !== -1)
			startwhitespace++;
		else
			break;

	}

	for ( var i = theLength - 1; i >= 0; i--) {
		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) !== -1)
			endwhitespace++;
		else
			break;
	}

	theInput = theInput.substring(startwhitespace, (theLength - endwhitespace));
	theLength = theLength - startwhitespace - endwhitespace;

	/*
	 * Is the text field empty?
	 */
	if ((theInput == null) || (theLength == 0) || (theInput == 0)) {
		return (true);
	}
	
	/*
	 Search through string's characters one by one until we find a non-whitespace character. When we do, 
	 return false; if we don't, return true.
	*/
	for ( var i = 0; i < theLength; i++) {
		// Check that current character isn't whitespace.

		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) == -1) {
			return (false);
		}
	}

	/*
	 All characters are whitespace.
	*/
	return (true);
	
}



function isValidEmail(theEntry) {

	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.@/&*+\~";
	theInput = theEntry;
	theLength = theEntry.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);
	var atTheRateCount = 0;
	if (theInput.indexOf(".") == -1)
		return (false);

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (theChar == '@')
			atTheRateCount++;
	}

	if (atTheRateCount == 0)
		return (false);

	if (atTheRateCount > 1)
		return (false);

	if (theInput.indexOf(".", theInput.indexOf("@") + 2) == -1)
		return (false);
	if (theInput.charAt(theInput.indexOf("@") - 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf("@") + 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
		return (false);

	for ( var i = 0; i < theLength; i++) {
		if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
			return (false);
	}

	if (validStartChar.indexOf(theStartChar) == -1)
		return (false);

	if (validEndChar.indexOf(theEndChar) == -1)
		return (false);

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1)
			return (false);
	}

	var straddr = theEntry;
	var namesarr = straddr.split("@");
	var domain = namesarr[1].split(".");

	var emdomain = namesarr[1].toLowerCase();
	domain1 = domain[0].toLowerCase();

	if (domain1 == "yahoo" || domain1 == "rediffmail" || domain1 == "hotmail"
			|| domain1 == "gmail" || domain1 == "rediff" || domain1 == "msn"
			|| domain1 == "aol" || domain1 == "alloymail"
			|| domain1 == "address" || domain1 == "mail" || domain1 == "gmx"
			|| domain1 == "altavista" || domain1 == "138mail"
			|| domain1 == "address" || domain1 == "animail"
			|| domain1 == "asiamail" || domain1 == "aussiemail"
			|| domain1 == "bluebottle" || domain1 == "boardermail"
			|| domain1 == "bolt" || domain1 == "canada"
			|| domain1 == "canoemail" || domain1 == "cashette"
			|| domain1 == "catchamail" || domain1 == "centralpets"
			|| domain1 == "coolgoose" || domain1 == "coolgoose"
			|| domain1 == "coolgoose" || domain1 == "dbzmail"
			|| domain1 == "dcemail" || domain1 == "didamail"
			|| domain1 == "doramail" || domain1 == "emailaccount"
			|| domain1 == "excite" || domain1 == "fanfiction"
			|| domain1 == "fastmail" || domain1 == "fastmail"
			|| domain1 == "fastermail" || domain1 == "fictionpress"
			|| domain1 == "flashmail" || domain1 == "gawab"
			|| domain1 == "gmail" || domain1 == "gmx" || domain1 == "gmx"
			|| domain1 == "graffiti" || domain1 == "hotmail"
			|| domain1 == "hushmail" || domain1 == "hush" || domain1 == "hush"
			|| domain1 == "icqmail" || domain1 == "ignmail"
			|| domain1 == "incamail" || domain1 == "indiatimes"
			|| domain1 == "kittymail" || domain1 == "koreanmail"
			|| domain1 == "linuxmail" || domain1 == "lycos"
			|| domain1 == "mail" || domain1 == "mail2world"
			|| domain1 == "mailpanda" || domain1 == "mailasia"
			|| domain1 == "mantramail" || domain1 == "marchmail"
			|| domain1 == "moose-mail" || domain1 == "myownemail"
			|| domain1 == "mypersonalemail" || domain1 == "myway"
			|| domain1 == "netster" || domain1 == "online"
			|| domain1 == "operamail" || domain1 == "outgun"
			|| domain1 == "postmark" || domain1 == "postmaster"
			|| domain1 == "prontomail" || domain1 == "recyclermail"
			|| domain1 == "rediffmail" || domain1 == "romymichele"
			|| domain1 == "sacmail" || domain1 == "recipedemo"
			|| domain1 == "sandiego" || domain1 == "shadango"
			|| domain1 == "safe-mail" || domain1 == "snail-mail"
			|| domain1 == "stalag13" || domain1 == "surfy"
			|| domain1 == "talk21" || domain1 == "themail"
			|| domain1 == "tmicha" || domain1 == "ureach"
			|| domain1 == "uymail" || domain1 == "vfemail"
			|| domain1 == "virtual-mail" || domain1 == "vorras"
			|| domain1 == "wapicode" || domain1 == "web"
			|| domain1 == "weekonline" || domain1 == "whale-mail"
			|| domain1 == "wildmail" || domain1 == "x-mail"
			|| domain1 == "yahoo" || domain1 == "yyhmail" || domain1 == "inbox")

	{

		return 5;

	}

	if (emdomain == "10minutemail.com" || emdomain == "2prong.com"
			|| emdomain == "4warding.com" || emdomain == "6url.com"
			|| emdomain == "afrobacon.com" || emdomain == "bugmenot.com"
			|| emdomain == "bumpymail.com" || emdomain == "centermail.com"
			|| emdomain == "centermail.net" || emdomain == "choicemail1.com"
			|| emdomain == "deadspam.com" || emdomain == "despam.it"
			|| emdomain == "despammed.com" || emdomain == "discardmail.com"
			|| emdomain == "discardmail.de" || emdomain == "disposeamail.com"
			|| emdomain == "dodgeit.com" || emdomain == "dontreg.com"
			|| emdomain == "dontsendmespam.de" || emdomain == "dumpandjunk.com"
			|| emdomain == "dumpmail.de" || emdomain == "e4ward.com"
			|| emdomain == "emaildienst.de" || emdomain == "emailias.com"
			|| emdomain == "emailto.de" || emdomain == "emailxfer.com"
			|| emdomain == "emz.net" || emdomain == "enterto.com"
			|| emdomain == "front14.org" || emdomain == "getonemail.com"
			|| emdomain == "ghosttexter.de" || emdomain == "gishpuppy.com"
			|| emdomain == "greensloth.com" || emdomain == "guerrillamail.com"
			|| emdomain == "guerrillamail.net" || emdomain == "h8s.org"
			|| emdomain == "haltospam.com" || emdomain == "hatespam.org"
			|| emdomain == "hidemail.de" || emdomain == "iheartspam.org"
			|| emdomain == "ipoo.org" || emdomain == "jetable.com"
			|| emdomain == "jetable.net" || emdomain == "jetable.org"
			|| emdomain == "kasmail.com" || emdomain == "killmail.com"
			|| emdomain == "killmail.net" || emdomain == "klassmaster.net"
			|| emdomain == "link2mail.net" || emdomain == "lortemail.dk"
			|| emdomain == "mail2rss.org" || emdomain == "mail333.com"
			|| emdomain == "mailblocks.com" || emdomain == "maileater.com"
			|| emdomain == "mailexpire.com" || emdomain == "mailfreeonline.com"
			|| emdomain == "mailmoat.com" || emdomain == "mailnull.com"
			|| emdomain == "mailshell.com" || emdomain == "mailsiphon.com"
			|| emdomain == "mailzilla.com" || emdomain == "meinspamschutz.de"
			|| emdomain == "messagebeamer.de" || emdomain == "mintemail.com"
			|| emdomain == "myspamless.com" || emdomain == "mytrashmail.com"
			|| emdomain == "neomailbox.com" || emdomain == "nervmich.net"
			|| emdomain == "nervtmich.net" || emdomain == "netmails.com"
			|| emdomain == "netmails.net" || emdomain == "netzidiot.de"
			|| emdomain == "nobulk.com" || emdomain == "noclickemail.com"
			|| emdomain == "nospamfor.us" || emdomain == "nurfuerspam.de"
			|| emdomain == "oneoffemail.com" || emdomain == "oopi.org"
			|| emdomain == "outlawspam.com" || emdomain == "pancakemail.com"
			|| emdomain == "poofy.org" || emdomain == "pookmail.com"
			|| emdomain == "privacy.net" || emdomain == "punkass.com"
			|| emdomain == "rejectmail.com" || emdomain == "safersignup.de"
			|| emdomain == "shortmail.net" || emdomain == "sibmail.com"
			|| emdomain == "slaskpost.se" || emdomain == "sneakemail.com"
			|| emdomain == "sofort-mail.de" || emdomain == "spam.la"
			|| emdomain == "spamavert.com" || emdomain == "spambob.com"
			|| emdomain == "spambob.net" || emdomain == "spambob.org"
			|| emdomain == "spambox.us" || emdomain == "spamcon.org"
			|| emdomain == "spamday.com" || emdomain == "spamex.com"
			|| emdomain == "spamfree24.com" || emdomain == "spamfree24.net"
			|| emdomain == "spamfree24.org" || emdomain == "spamgourmet.com"
			|| emdomain == "spamhole.com" || emdomain == "spamify.com"
			|| emdomain == "spaminator.de" || emdomain == "spamslicer.com"
			|| emdomain == "spaml.com" || emdomain == "spammotel.com"
			|| emdomain == "spamoff.de" || emdomain == "spamtrail.com"
			|| emdomain == "tempemail.net" || emdomain == "tempinbox.com"
			|| emdomain == "temporarily.de"
			|| emdomain == "temporaryforwarding.com"
			|| emdomain == "temporaryinbox.com" || emdomain == "trashmail.com"
			|| emdomain == "trashmail.net" || emdomain == "trashmail.org"
			|| emdomain == "trashmail.de" || emdomain == "trash-mail.de"
			|| emdomain == "twinmail.de" || emdomain == "venompen.com"
			|| emdomain == "wegwerfadresse.de" || emdomain == "wh4f.org"
			|| emdomain == "willselfdestruct.com" || emdomain == "wuzup.net"
			|| emdomain == "wwwnew.eu" || emdomain == "xemaps.com"
			|| emdomain == "xents.com" || emdomain == "xmaily.com"
			|| emdomain == "yep.it" || emdomain == "yopmail.com"
			|| emdomain == "zoemail.org" || emdomain == "mailinator.com"
			|| emdomain == "fakeinformation.com" || emdomain == "fastacura.com"
			|| emdomain == "fastchevy.com" || emdomain == "fastchrysler.com"
			|| emdomain == "fastkawasaki.com" || emdomain == "fastmazda.com"
			|| emdomain == "fastmitsubishi.com" || emdomain == "fastnissan.com"
			|| emdomain == "fastsubaru.com" || emdomain == "fastsuzuki.com"
			|| emdomain == "fasttoyota.com" || emdomain == "fastyamaha.com"
			|| emdomain == "fuckingduh.com" || emdomain == "fux0ringduh.com"
			|| emdomain == "klassmaster.com" || emdomain == "mailin8r.com"
			|| emdomain == "mailinator.com" || emdomain == "mailinater.com"
			|| emdomain == "mailinator2.com" || emdomain == "sogetthis.com"
			|| emdomain == "emailmiser.com" || emdomain == "675hosting.com"
			|| emdomain == "675hosting.net" || emdomain == "675hosting.org"
			|| emdomain == "75hosting.com" || emdomain == "75hosting.net"
			|| emdomain == "75hosting.org" || emdomain == "ajaxapp.net"
			|| emdomain == "amiri.net" || emdomain == "amiriindustries.com"
			|| emdomain == "emailmiser.com" || emdomain == "etranquil.com"
			|| emdomain == "etranquil.net" || emdomain == "etranquil.org"
			|| emdomain == "gowikibooks.com" || emdomain == "gowikicampus.com"
			|| emdomain == "gowikicars.com" || emdomain == "gowikifilms.com"
			|| emdomain == "gowikigames.com" || emdomain == "gowikimusic.com"
			|| emdomain == "gowikinetwork.com"
			|| emdomain == "gowikitravel.com" || emdomain == "gowikitv.com"
			|| emdomain == "iwi.net" || emdomain == "myspaceinc.com"
			|| emdomain == "myspaceinc.net" || emdomain == "myspaceinc.org"
			|| emdomain == "myspacepimpedup.com" || emdomain == "ourklips.com"
			|| emdomain == "pimpedupmyspace.com" || emdomain == "rklips.com"
			|| emdomain == "turual.com" || emdomain == "upliftnow.com"
			|| emdomain == "uplipht.com" || emdomain == "viditag.com"
			|| emdomain == "viewcastmedia.com"
			|| emdomain == "viewcastmedia.net"
			|| emdomain == "viewcastmedia.org"
			|| emdomain == "wetrainbayarea.com"
			|| emdomain == "wetrainbayarea.org" || emdomain == "xagloo.com"
			|| emdomain == "anonymail.dk" || emdomain == "blogmyway.org"
			|| emdomain == "buyusedlibrarybooks.org"
			|| emdomain == "dotmsg.com" || emdomain == "fakemailz.com"
			|| emdomain == "footard.com" || emdomain == "forgetmail.com"
			|| emdomain == "lovemeleaveme.com" || emdomain == "mailquack.com"
			|| emdomain == "mailslapping.com" || emdomain == "oneoffmail.com"
			|| emdomain == "recyclemail.dk" || emdomain == "shiftmail.com"
			|| emdomain == "spambog.com" || emdomain == "spambog.de"
			|| emdomain == "spammotel.com" || emdomain == "trashdevil.com"
			|| emdomain == "trashdevil.de" || emdomain == "whopy.com"
			|| emdomain == "wilemail.com" || emdomain == "4warding.com"
			|| emdomain == "1chuan.com" || emdomain == "1zhuan.com"
			|| emdomain == "4warding.com" || emdomain == "4warding.net"
			|| emdomain == "4warding.org" || emdomain == "imstations.com"
			|| emdomain == "walala.org") {

		return 5;
	}

	return (true);

}

function isValidPhone(phone) {
	var ename = phone;

	if (ename.length < 3)
		return (false);

	for (i = 0; i < ename.length; i++) {
		if (isNaN(ename.charAt(i)))

			if (!((ename.charAt(i) == '(') || (ename.charAt(i) == ')')
					|| (ename.charAt(i) == '+') || (ename.charAt(i) == '-'))) {
				return (false);
			}
	}
}
















/**** LEGACY CODE FROM CORPORATER EXPRESS SITE ??? HE HE... OLD MODULES HAVE TO BE PASTED BELOW **/
var USStates = new Array(51);
USStates[0] = "ALABAMA";
USStates[1] = "ALASKA";
USStates[2] = "ARIZONA";
USStates[3] = "ARKANSAS";
USStates[4] = "CALIFORNIA";
USStates[5] = "COLORADO";
USStates[6] = "CONNECTICUT";
USStates[7] = "DELAWARE";
USStates[8] = "DISTRICT OF COLUMBIA";
USStates[9] = "FLORIDA";
USStates[10] = "GEORGIA";
USStates[11] = "HAWAII";
USStates[12] = "IDAHO";
USStates[13] = "ILLINOIS";
USStates[14] = "INDIANA";
USStates[15] = "IOWA";
USStates[16] = "KANSAS";
USStates[17] = "KENTUCKY";
USStates[18] = "LOUISIANA";
USStates[19] = "MAINE";
USStates[20] = "MARYLAND";
USStates[21] = "MASSACHUSETTS";
USStates[22] = "MICHIGAN";
USStates[23] = "MINNESOTA";
USStates[24] = "MISSISSIPPI";
USStates[25] = "MISSOURI";
USStates[26] = "MONTANA";
USStates[27] = "NEBRASKA";
USStates[28] = "NEVADA";
USStates[29] = "NEW HAMPSHIRE";
USStates[30] = "NEW JERSEY";
USStates[31] = "NEW MEXICO";
USStates[32] = "NEW YORK";
USStates[33] = "NORTH CAROLINA";
USStates[34] = "NORTH DAKOTA";
USStates[35] = "OHIO";
USStates[36] = "OKLAHOMA";
USStates[37] = "OREGON";
USStates[38] = "PENNSYLVANIA";
USStates[39] = "RHODE ISLAND";
USStates[40] = "SOUTH CAROLINA";
USStates[41] = "SOUTH DAKOTA";
USStates[42] = "TENNESSEE";
USStates[43] = "TEXAS";
USStates[44] = "UTAH";
USStates[45] = "VERMONT";
USStates[46] = "VIRGINIA";
USStates[47] = "WASHINGTON";
USStates[48] = "WEST VIRGINIA";
USStates[49] = "WISCONSIN";
USStates[50] = "WYOMING";

function validateUSState(state) {
	var currentState = state.toUpperCase();
	var check = false;

	for (i = 0; i <= USStates.length - 1; i++) {
		if (currentState == USStates[i]) {
			check = true;
		}

	}
	return check;
}

function prim_database(value1, value2) {
	var ckCount = 0;

	for ( var i = 0; i < 8; i++) {
		if ((i <= value1.length - 2) && (value1[i].checked)) {
			ckCount = ckCount + 1;
			value2.disabled = true;
		}
		if ((i == value1.length - 1) && (value2.value.length == 0)
				&& (ckCount == 0)) {

			return false;
		}

		else if (i == value1.length - 1)
			return true;

	}
	;

}

function primary_database(value1) {
	var ckCount = 0;
	var flag = false;
	for ( var i = 0; i < value1.length; i++) {

		if (value1[i].checked) {
			flag = true;

		}
		/*
		 * if((i<=value1.length-2)&&(value1[i].checked)) { ckCount=ckCount+1;
		 * value2.disabled=true; }
		 * if((i==value1.length-1)&&(value2.value.length==0)&&(ckCount == 0)) {
		 * 
		 * return false; }
		 * 
		 * else if(i==value1.length-1) return true;
		 */

	}
	return flag;

}

function webserver(checkvalue, fieldvalue) {

	var ckCount4 = 0;
	if ((checkvalue[0].checked))
		if (fieldvalue.value.length == 0)
			return false;
	/*
	 * if((checkvalue[1].checked)) if(fieldvalue.value.length > 0) return false;
	 */
	if (!(checkvalue[0].checked) && !(checkvalue[1].checked))
		return false;
	else
		return true;

}

function isValidDate(day, month, year) {
	var jsday = day.options[day.options.selectedIndex].value;
	var jsmonth = month.options[month.options.selectedIndex].value;
	var jsyear = year.options[year.options.selectedIndex].value;

	if (jsmonth == 2) {
		if (jsday > 29)
			return (false);
		if (jsday > 28 & (jsyear % 4) != 0)
			return (false);
	}

	if (jsmonth == 4 || jsmonth == 6 || jsmonth == 9 || jsmonth == 11) {
		if (jsday > 30)
			return (false);
	}
	return (true);
}

function isEmpty2(theEntry) {
	alert("with in the script" + theEntry.value);
	if (theEntry.value == "") {
		return (false);
	} else {
		return (true);
	}
}

function isEmpty(theEntry) {
	// Note : returns true if theEntry has (if no chars typed, white spaces
	// typed, zero typed)
	// Language : JavaScript
	// accepts : content of a textField
	// returns : boolean (true , false)
	// does : checks whether the given input
	// box is empty
	// Returns true if string s is empty or
	// whitespace characters only.

	// whitespace characters

	var whitespace = " \b\t\n\r";

	theInput = theEntry.value;
	theLength = theEntry.value.length;

	var startwhitespace = 0;
	var endwhitespace = 0;

	for ( var i = 0; i < theLength; i++) {

		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) !== -1)
			startwhitespace++;
		else
			break;

	}// for loop ends

	for ( var i = theLength - 1; i >= 0; i--) {
		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) !== -1)
			endwhitespace++;
		else
			break;
	}

	theInput = theInput.substring(startwhitespace, (theLength - endwhitespace));
	theLength = theLength - startwhitespace - endwhitespace;

	// Is the text field empty?
	if ((theInput == null) || (theLength == 0) || (theInput == 0)) {
		return (true);
	}

	// Search through string's characters one by one
	// until we find a non-whitespace character.
	// When we do, return false; if we don't, return true.

	for ( var i = 0; i < theLength; i++) {
		// Check that current character isn't whitespace.

		var theChar = theInput.charAt(i);
		if (whitespace.indexOf(theChar) == -1) {
			return (false);
		}
	}// for loop ends
	// All characters are whitespace.
	return (true);
}// function isEmpty ends

function validChar(theEntry) {
	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.&/";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);
	if (validStartChar.indexOf(theStartChar) == -1) {
		if (theStartChar == " ")
			theStartChar = "Space";
		// alert(theStartChar+" not allowed at the Start.");
		alert("Please Enter Correct Value");
		return (false);
	}
	if (validEndChar.indexOf(theEndChar) == -1) {
		if (theEndChar == " ")
			theEndChar = "Space";
		// alert(theEndChar+" not allowed at the End.");
		alert("Please Enter Correct Value");
		return (false);
	}

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1) {
			if (theChar == " ")
				theChar = "Space";
			// alert(theChar+" not allowed.");
			alert("Please Enter Correct Value");
			return (false);
		}
	}
	return (true);
}

function validCharwithSpace(theEntry) // the function checks for valid
										// characters other than space
{
	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.& ";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);
	if (validStartChar.indexOf(theStartChar) == -1) {
		if (theStartChar == " ")
			theStartChar = "Space";
		// alert(theStartChar+" not allowed at the Start.");
		alert("Please Enter Correct Value");
		return (false);
	}
	if (validEndChar.indexOf(theEndChar) == -1) {
		if (theEndChar == " ")
			theEndChar = "Space";
		// alert(theEndChar+" not allowed at the End.");
		alert("Please Enter Correct Value");
		return (false);
	}

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1) {
			/*
			 * if(theChar == " ") return true; theChar = "Space";
			 * alert(theChar+" not allowed.");
			 */
			return (false);
		}
	}

	return (true);
}

function validEmail(theEntry) {

	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.@/&*+\~";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);
	var atTheRateCount = 0;
	if (theInput.indexOf(".") == -1)
		return (false);

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (theChar == '@')
			atTheRateCount++;
	}

	if (atTheRateCount == 0)
		return (false);

	if (atTheRateCount > 1)
		return (false);

	if (theInput.indexOf(".", theInput.indexOf("@") + 2) == -1)
		return (false);
	if (theInput.charAt(theInput.indexOf("@") - 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf("@") + 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
		return (false);

	for ( var i = 0; i < theLength; i++) {
		if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
			return (false);
	}

	if (validStartChar.indexOf(theStartChar) == -1)
		return (false);

	if (validEndChar.indexOf(theEndChar) == -1)
		return (false);

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1)
			return (false);
	}

	var straddr = theEntry.value;
	var namesarr = straddr.split("@");
	var domain = namesarr[1].split(".");

	var emdomain = namesarr[1].toLowerCase();
	domain1 = domain[0].toLowerCase();

	if (domain1 == "yahoo" || domain1 == "rediffmail" || domain1 == "hotmail"
			|| domain1 == "gmail" || domain1 == "rediff" || domain1 == "msn"
			|| domain1 == "aol" || domain1 == "alloymail"
			|| domain1 == "address" || domain1 == "mail" || domain1 == "gmx"
			|| domain1 == "altavista" || domain1 == "138mail"
			|| domain1 == "address" || domain1 == "animail"
			|| domain1 == "asiamail" || domain1 == "aussiemail"
			|| domain1 == "bluebottle" || domain1 == "boardermail"
			|| domain1 == "bolt" || domain1 == "canada"
			|| domain1 == "canoemail" || domain1 == "cashette"
			|| domain1 == "catchamail" || domain1 == "centralpets"
			|| domain1 == "coolgoose" || domain1 == "coolgoose"
			|| domain1 == "coolgoose" || domain1 == "dbzmail"
			|| domain1 == "dcemail" || domain1 == "didamail"
			|| domain1 == "doramail" || domain1 == "emailaccount"
			|| domain1 == "excite" || domain1 == "fanfiction"
			|| domain1 == "fastmail" || domain1 == "fastmail"
			|| domain1 == "fastermail" || domain1 == "fictionpress"
			|| domain1 == "flashmail" || domain1 == "gawab"
			|| domain1 == "gmail" || domain1 == "gmx" || domain1 == "gmx"
			|| domain1 == "graffiti" || domain1 == "hotmail"
			|| domain1 == "hushmail" || domain1 == "hush" || domain1 == "hush"
			|| domain1 == "icqmail" || domain1 == "ignmail"
			|| domain1 == "incamail" || domain1 == "indiatimes"
			|| domain1 == "kittymail" || domain1 == "koreanmail"
			|| domain1 == "linuxmail" || domain1 == "lycos"
			|| domain1 == "mail" || domain1 == "mail2world"
			|| domain1 == "mailpanda" || domain1 == "mailasia"
			|| domain1 == "mantramail" || domain1 == "marchmail"
			|| domain1 == "moose-mail" || domain1 == "myownemail"
			|| domain1 == "mypersonalemail" || domain1 == "myway"
			|| domain1 == "netster" || domain1 == "online"
			|| domain1 == "operamail" || domain1 == "outgun"
			|| domain1 == "postmark" || domain1 == "postmaster"
			|| domain1 == "prontomail" || domain1 == "recyclermail"
			|| domain1 == "rediffmail" || domain1 == "romymichele"
			|| domain1 == "sacmail" || domain1 == "recipedemo"
			|| domain1 == "sandiego" || domain1 == "shadango"
			|| domain1 == "safe-mail" || domain1 == "snail-mail"
			|| domain1 == "stalag13" || domain1 == "surfy"
			|| domain1 == "talk21" || domain1 == "themail"
			|| domain1 == "tmicha" || domain1 == "ureach"
			|| domain1 == "uymail" || domain1 == "vfemail"
			|| domain1 == "virtual-mail" || domain1 == "vorras"
			|| domain1 == "wapicode" || domain1 == "web"
			|| domain1 == "weekonline" || domain1 == "whale-mail"
			|| domain1 == "wildmail" || domain1 == "x-mail"
			|| domain1 == "yahoo" || domain1 == "yyhmail" || domain1 == "inbox")

	{

		theEntry.focus();
		return 5;

	}

	if (emdomain == "10minutemail.com" || emdomain == "2prong.com"
			|| emdomain == "4warding.com" || emdomain == "6url.com"
			|| emdomain == "afrobacon.com" || emdomain == "bugmenot.com"
			|| emdomain == "bumpymail.com" || emdomain == "centermail.com"
			|| emdomain == "centermail.net" || emdomain == "choicemail1.com"
			|| emdomain == "deadspam.com" || emdomain == "despam.it"
			|| emdomain == "despammed.com" || emdomain == "discardmail.com"
			|| emdomain == "discardmail.de" || emdomain == "disposeamail.com"
			|| emdomain == "dodgeit.com" || emdomain == "dontreg.com"
			|| emdomain == "dontsendmespam.de" || emdomain == "dumpandjunk.com"
			|| emdomain == "dumpmail.de" || emdomain == "e4ward.com"
			|| emdomain == "emaildienst.de" || emdomain == "emailias.com"
			|| emdomain == "emailto.de" || emdomain == "emailxfer.com"
			|| emdomain == "emz.net" || emdomain == "enterto.com"
			|| emdomain == "front14.org" || emdomain == "getonemail.com"
			|| emdomain == "ghosttexter.de" || emdomain == "gishpuppy.com"
			|| emdomain == "greensloth.com" || emdomain == "guerrillamail.com"
			|| emdomain == "guerrillamail.net" || emdomain == "h8s.org"
			|| emdomain == "haltospam.com" || emdomain == "hatespam.org"
			|| emdomain == "hidemail.de" || emdomain == "iheartspam.org"
			|| emdomain == "ipoo.org" || emdomain == "jetable.com"
			|| emdomain == "jetable.net" || emdomain == "jetable.org"
			|| emdomain == "kasmail.com" || emdomain == "killmail.com"
			|| emdomain == "killmail.net" || emdomain == "klassmaster.net"
			|| emdomain == "link2mail.net" || emdomain == "lortemail.dk"
			|| emdomain == "mail2rss.org" || emdomain == "mail333.com"
			|| emdomain == "mailblocks.com" || emdomain == "maileater.com"
			|| emdomain == "mailexpire.com" || emdomain == "mailfreeonline.com"
			|| emdomain == "mailmoat.com" || emdomain == "mailnull.com"
			|| emdomain == "mailshell.com" || emdomain == "mailsiphon.com"
			|| emdomain == "mailzilla.com" || emdomain == "meinspamschutz.de"
			|| emdomain == "messagebeamer.de" || emdomain == "mintemail.com"
			|| emdomain == "myspamless.com" || emdomain == "mytrashmail.com"
			|| emdomain == "neomailbox.com" || emdomain == "nervmich.net"
			|| emdomain == "nervtmich.net" || emdomain == "netmails.com"
			|| emdomain == "netmails.net" || emdomain == "netzidiot.de"
			|| emdomain == "nobulk.com" || emdomain == "noclickemail.com"
			|| emdomain == "nospamfor.us" || emdomain == "nurfuerspam.de"
			|| emdomain == "oneoffemail.com" || emdomain == "oopi.org"
			|| emdomain == "outlawspam.com" || emdomain == "pancakemail.com"
			|| emdomain == "poofy.org" || emdomain == "pookmail.com"
			|| emdomain == "privacy.net" || emdomain == "punkass.com"
			|| emdomain == "rejectmail.com" || emdomain == "safersignup.de"
			|| emdomain == "shortmail.net" || emdomain == "sibmail.com"
			|| emdomain == "slaskpost.se" || emdomain == "sneakemail.com"
			|| emdomain == "sofort-mail.de" || emdomain == "spam.la"
			|| emdomain == "spamavert.com" || emdomain == "spambob.com"
			|| emdomain == "spambob.net" || emdomain == "spambob.org"
			|| emdomain == "spambox.us" || emdomain == "spamcon.org"
			|| emdomain == "spamday.com" || emdomain == "spamex.com"
			|| emdomain == "spamfree24.com" || emdomain == "spamfree24.net"
			|| emdomain == "spamfree24.org" || emdomain == "spamgourmet.com"
			|| emdomain == "spamhole.com" || emdomain == "spamify.com"
			|| emdomain == "spaminator.de" || emdomain == "spamslicer.com"
			|| emdomain == "spaml.com" || emdomain == "spammotel.com"
			|| emdomain == "spamoff.de" || emdomain == "spamtrail.com"
			|| emdomain == "tempemail.net" || emdomain == "tempinbox.com"
			|| emdomain == "temporarily.de"
			|| emdomain == "temporaryforwarding.com"
			|| emdomain == "temporaryinbox.com" || emdomain == "trashmail.com"
			|| emdomain == "trashmail.net" || emdomain == "trashmail.org"
			|| emdomain == "trashmail.de" || emdomain == "trash-mail.de"
			|| emdomain == "twinmail.de" || emdomain == "venompen.com"
			|| emdomain == "wegwerfadresse.de" || emdomain == "wh4f.org"
			|| emdomain == "willselfdestruct.com" || emdomain == "wuzup.net"
			|| emdomain == "wwwnew.eu" || emdomain == "xemaps.com"
			|| emdomain == "xents.com" || emdomain == "xmaily.com"
			|| emdomain == "yep.it" || emdomain == "yopmail.com"
			|| emdomain == "zoemail.org" || emdomain == "mailinator.com"
			|| emdomain == "fakeinformation.com" || emdomain == "fastacura.com"
			|| emdomain == "fastchevy.com" || emdomain == "fastchrysler.com"
			|| emdomain == "fastkawasaki.com" || emdomain == "fastmazda.com"
			|| emdomain == "fastmitsubishi.com" || emdomain == "fastnissan.com"
			|| emdomain == "fastsubaru.com" || emdomain == "fastsuzuki.com"
			|| emdomain == "fasttoyota.com" || emdomain == "fastyamaha.com"
			|| emdomain == "fuckingduh.com" || emdomain == "fux0ringduh.com"
			|| emdomain == "klassmaster.com" || emdomain == "mailin8r.com"
			|| emdomain == "mailinator.com" || emdomain == "mailinater.com"
			|| emdomain == "mailinator2.com" || emdomain == "sogetthis.com"
			|| emdomain == "emailmiser.com" || emdomain == "675hosting.com"
			|| emdomain == "675hosting.net" || emdomain == "675hosting.org"
			|| emdomain == "75hosting.com" || emdomain == "75hosting.net"
			|| emdomain == "75hosting.org" || emdomain == "ajaxapp.net"
			|| emdomain == "amiri.net" || emdomain == "amiriindustries.com"
			|| emdomain == "emailmiser.com" || emdomain == "etranquil.com"
			|| emdomain == "etranquil.net" || emdomain == "etranquil.org"
			|| emdomain == "gowikibooks.com" || emdomain == "gowikicampus.com"
			|| emdomain == "gowikicars.com" || emdomain == "gowikifilms.com"
			|| emdomain == "gowikigames.com" || emdomain == "gowikimusic.com"
			|| emdomain == "gowikinetwork.com"
			|| emdomain == "gowikitravel.com" || emdomain == "gowikitv.com"
			|| emdomain == "iwi.net" || emdomain == "myspaceinc.com"
			|| emdomain == "myspaceinc.net" || emdomain == "myspaceinc.org"
			|| emdomain == "myspacepimpedup.com" || emdomain == "ourklips.com"
			|| emdomain == "pimpedupmyspace.com" || emdomain == "rklips.com"
			|| emdomain == "turual.com" || emdomain == "upliftnow.com"
			|| emdomain == "uplipht.com" || emdomain == "viditag.com"
			|| emdomain == "viewcastmedia.com"
			|| emdomain == "viewcastmedia.net"
			|| emdomain == "viewcastmedia.org"
			|| emdomain == "wetrainbayarea.com"
			|| emdomain == "wetrainbayarea.org" || emdomain == "xagloo.com"
			|| emdomain == "anonymail.dk" || emdomain == "blogmyway.org"
			|| emdomain == "buyusedlibrarybooks.org"
			|| emdomain == "dotmsg.com" || emdomain == "fakemailz.com"
			|| emdomain == "footard.com" || emdomain == "forgetmail.com"
			|| emdomain == "lovemeleaveme.com" || emdomain == "mailquack.com"
			|| emdomain == "mailslapping.com" || emdomain == "oneoffmail.com"
			|| emdomain == "recyclemail.dk" || emdomain == "shiftmail.com"
			|| emdomain == "spambog.com" || emdomain == "spambog.de"
			|| emdomain == "spammotel.com" || emdomain == "trashdevil.com"
			|| emdomain == "trashdevil.de" || emdomain == "whopy.com"
			|| emdomain == "wilemail.com" || emdomain == "4warding.com"
			|| emdomain == "1chuan.com" || emdomain == "1zhuan.com"
			|| emdomain == "4warding.com" || emdomain == "4warding.net"
			|| emdomain == "4warding.org" || emdomain == "imstations.com"
			|| emdomain == "walala.org") {

		theEntry.focus();
		return 5;
	}

	return (true);

}

function validPhone(phone) {
	var ename = phone.value;

	if (ename.length < 3)
		return (false);

	for (i = 0; i < ename.length; i++) {
		if (isNaN(ename.charAt(i)))

			if (!((ename.charAt(i) == '(') || (ename.charAt(i) == ')')
					|| (ename.charAt(i) == '+') || (ename.charAt(i) == '-'))) {
				return (false);
			}
	}
}

function validCountryPhone(phone) {
	var ename = phone.value;

	if (ename.length < 1)
		return (false);

	for (i = 0; i < ename.length; i++) {
		if (isNaN(ename.charAt(i)))

			if (!((ename.charAt(i) == '(') || (ename.charAt(i) == ')')
					|| (ename.charAt(i) == '+') || (ename.charAt(i) == '-'))) {
				return (false);
			}
	}
}

function validcharecters(theEntry) {
	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);

	if (validStartChar.indexOf(theStartChar) == -1) {
		if (theStartChar == " ")
			theStartChar = "Space";
		alert("Please Enter Correct Value");
		return (false);
	}

	if (validEndChar.indexOf(theEndChar) == -1) {
		if (theEndChar == " ")
			theEndChar = "Space";
		// alert(theEndChar+" not allowed at the end.");
		alert("Please Enter Correct Value");
		return (false);
	}

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1) {
			if (theChar == " ")
				theChar = "Space";
			// alert(theChar+" not allowed");
			alert("Please Enter Correct Value");
			return (false);
		}
	}
	return (true);
}

function validstate4(theEntry) {
	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);

	if (validStartChar.indexOf(theStartChar) == -1) {
		if (theStartChar == " ")
			theStartChar = "Space";
		alert("Please Enter Correct Value");
		return (false);
	}

	if (validEndChar.indexOf(theEndChar) == -1) {
		if (theEndChar == " ")
			theEndChar = "Space";
		// alert(theEndChar+" not allowed at the end.");
		alert("Please Enter Correct Value");
		return (false);
	}

	return (true);
}

function website(theEntry) {

	validStartChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	validEndChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	validInnerChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-./&*+\~";
	theInput = theEntry.value;
	theLength = theEntry.value.length;
	theStartChar = theInput.charAt(0);
	theEndChar = theInput.charAt(theLength - 1);
	var atTheRateCount = 0;
	if (theInput.indexOf(".") == -1)
		return (false);

	if (theInput.charAt(theInput.indexOf("@") - 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf("@") + 1) == ".")
		return (false);

	if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
		return (false);

	for ( var i = 0; i < theLength; i++) {
		if (theInput.charAt(theInput.indexOf(".") + 1) == ".")
			return (false);
	}

	if (validStartChar.indexOf(theStartChar) == -1)
		return (false);

	if (validEndChar.indexOf(theEndChar) == -1)
		return (false);

	for ( var i = 0; i < theLength; i++) {
		var theChar = theInput.charAt(i);
		if (validInnerChar.indexOf(theChar) == -1)
			return (false);
	}

	return (true);
}

function numcheck(val) {
	for ( var i = 0; i <= val.length; i++) {
		if ((val.charAt(i) >= "0") && (val.charAt(i) <= "9")) {
			if (i == val.length - 1)
				return (true);
		}

		else {
			return (false);
		}

	}
}

function validstate(state, other) {

	var ind = state.indexOf("*");
	state = state.substring(0, ind);

	if ((state.length == 0) && (other.length == 0)) {

		return (false);
	} else {
		return (true);
	}

}

function validemptystate(state) {

	var ind = state.indexOf("*");
	state = state.substring(0, ind);

	if (state.length == 0) {

		return (false);
	} else {
		return (true);
	}

}

function statevalidate(state, country) {
	if ((country == "UNITED STATES") || (country == "Canada")) {
		if (state.length == 0) {
			return (false);
		} else {
			return (true);
		}

	}
	return (true);
}

function valstate() {
	if (document.user.Country[document.user.Country.selectedIndex].value == "UNITED STATES") {
		var x = document.user.state[document.user.state.selectedIndex].value;
		if ((x.length == 0) || (validateUSState(x) == false)) {
			return (false);
		} else {
			return (true);
		}
	}
}

function validstate2(state, other) {
	var ind = state.indexOf("*");
	state = state.substring(0, ind);

	if ((state.length != 0) && (other.length != 0)) {
		return (false);
	} else {
		return (true);
	}
}

function validstate3(state, country) {

	var ind = state.indexOf("*");
	state = state.substring(0, ind);

	if (state.length != 0) {
		if ((country == "UNITED STATES") || (country == "Canada")) {
			return (true);
		} else {
			return (false);
		}
	} else {
		return (true);
	}
}

function appdevenv(apdev, apdev2, apdevother) {

	if (apdev.checked == false && apdev2.checked == false
			&& apdevother.value.length == 0) {
		return (false);
	} else {

		return (true);
	}

}

function repprod(checkvalue, fieldvalue) {

	if (!(checkvalue[0].checked)) {
		if (fieldvalue.value.length != 0) {
			if ((checkvalue[1].checked))
				if (fieldvalue.value.length == 0)
					return (false);
		}

		if ((checkvalue[2].checked))
			if (fieldvalue.value.length > 0)
				return (false);
		if (!(checkvalue[1].checked) && !(checkvalue[2].checked))
			return (false);
	} else
		return (true);

}

function repprod2(checkvalue, fieldvalue) {

	if ((checkvalue[0].checked) && (fieldvalue.value.length == 0))
		return (false);
	else
		return (true);

}

function busintell(checkvalue) {

	if ((!(checkvalue[0].checked)) && (!(checkvalue[1].checked))) {
		return (false);
	} else
		return (true);

}

function busintell2(checkvalue, checkvalue1, checkvalue2, checkvalue3,
		checkvalue4, checkvalue5, checkvalue6, checkvalue7) {

	if (checkvalue[0].checked) {
		if (!checkvalue1.checked && !checkvalue2.checked
				&& !checkvalue3.checked && !checkvalue4.checked
				&& !checkvalue5.checked && !checkvalue6.checked) {
			return (false);
		} else {
			if ((checkvalue6.checked) && (checkvalue7.value == "")) {
				return (false);
			} else {
				return (true);
			}
		}
	} else {
		/*
		 * if(checkvalue1.checked || checkvalue2.checked || checkvalue3.checked ||
		 * checkvalue4.checked || checkvalue5.checked || checkvalue6.checked ||
		 * checkvalue7.value.length>0) { return (false); } else {
		 */
		return (true);
		// }
	}
}

function validstate5(val1, val2) {
	var ind1;
	var id;
	if (val1.length != 0) {
		if (val2 == "Canada") {
			id = "21";
		}
		if (val2 == "UNITED STATES") {
			id = "2";
		}

		ind = val1.indexOf("*");
		var str = val1.substring(ind + 1, val1.length);
		if ((id == "21") || (id == "2")) {
			if (str == id)
				return (true);
			else
				return (false);
		} else {
			return (true);
		}
	} else {
		return (true);
	}
}

function validstate6(other, country) {
	if (other.length > 0) {
		if ((country == "UNITED STATES") || (country == "Canada")) {
			return (false);
		} else
			return (true);
	} else
		return (true);

}

function validboxes(val1, val2) {

	if (val1.checked == true) {
		val2.disabled = true;
	}
}

function validallboxes(val1, val2, val3, val4, val5, val6, val7, val8) {
	if (val1.checked == true) {

		val2.disabled = true;
		val3.disabled = true;
		val4.disabled = true;
		val5.disabled = true;
		val6.disabled = true;
		val7.disabled = true;
		val8.disabled = true;

	}
}

function invertvalidboxes(val1, val2) {
	if (val1.checked == true) {
		val2.disabled = false;
	}
}

function invertvalidallboxes(val1, val2, val3, val4, val5, val6, val7, val8) {
	if (val1.checked == true) {

		val2.disabled = false;
		val3.disabled = false;
		val4.disabled = false;
		val5.disabled = false;
		val6.disabled = false;
		val7.disabled = false;
		val8.disabled = false;

	}
}
