function openWin(mypage, myname, w, h, scroll, toolbar) {
	var winl = 0;
	var wint = 0;
	winprops = 'height='+h+',width='+w+',top=100,left=100,scrollbars='+scroll+',toolbar='+toolbar+',resizable';
	
	if(navigator.appName == "Netscape") {
		top.location = mypage;
	} 
	else {
		win = window.open(mypage, myname, winprops);
	}

	/*if (parseInt(navigator.appVersion) >= 4) { 
		win.window.resizeTo(screen.availWidth,screen.availHeight);
		win.window.focus(); 
	}*/
}

function validateRegistration(getForm)
{
    
	var name = getForm.Name.value;	
	var email = getForm.Email.value;	
	var companyName = getForm.CompanyName.value;
	var jobTitle = getForm.JobTitle.value;
	var phone = getForm.Phone.value;
	var address = getForm.Address.value;
	var captcha = getForm.Captcha.value;
	var mailingList = "N";
	
	
	
	if (checkIfEmptyString(name) == true) {
		alert('Name is a required field');
		getForm.Name.focus();
		return false;
	}
	else if (checkIfEmptyString(email) == true) {
		alert('Email is a required field');
		getForm.Email.focus();
		return false;
	}
	else if (checkIfEmptyString(companyName) == true) {
		alert('Company Name is a required field');
		getForm.CompanyName.focus();
		return false;
	}
	else if (checkIfEmptyString(jobTitle) == true) {
		alert('Job Title is a required field');
		getForm.JobTitle.focus();
		return false;
	}
	else if (checkIfEmptyString(phone) == true) {
		alert('Phone is a required field');
		getForm.Phone.focus();
		return false;
	}
	else if (checkIfEmptyString(address) == true) {
		alert('Address is a required field');
		getForm.Address.focus();
		return false;
	}
	else if (captcha != "r7ZmTa") {
		alert('The spamcheck values do not match. Please enter the correct spamcheck value.');
		getForm.Captcha.focus();
		return false;
	}
	else {
		return true;
	}
}

function validateRegistrationEmailContact(getForm)
{
   
	var name = getForm.Name.value;	
	var email = getForm.Email.value;	
	var companyName = getForm.CompanyName.value;
	var phone = getForm.Phone.value;
	var address = getForm.Address.value;
	var captcha = getForm.Captcha.value;
	var mailingList = "N";
	
	
	
	if (checkIfEmptyString(name) == true) {
		alert('Name is a required field');
		getForm.Name.focus();
		return false;
	}
	else if (checkIfEmptyString(email) == true) {
		alert('Email is a required field');
		getForm.Email.focus();
		return false;
	}
	else if (checkIfEmptyString(companyName) == true) {
		alert('Company Name is a required field');
		getForm.CompanyName.focus();
		return false;
	}
	else if (checkIfEmptyString(phone) == true) {
		alert('Phone is a required field');
		getForm.Phone.focus();
		return false;
	}
	else if (checkIfEmptyString(address) == true) {
		alert('Message is a required field');
		getForm.Address.focus();
		return false;
	}
	else if (captcha != "r7ZmTa") {
		alert('The spamcheck values do not match. Please enter the correct spamcheck value.');
		getForm.Captcha.focus();
		return false;
	}
	else {
		return true;
	}
}

// initial code -- 11/07/2001  Jason Barrett	Soltech, Inc.
function checkIfEmptyString(string){
	
	// declare variable as converted string to string object
	var sString = String(string);
	var tempString;
	// set variable to determine if validation occured
	var sReturn = "true";
	
	// if string is empty (contains no characters OR whitespaces) begin validation
	if (sString != ""){
		// validate each character for the length of the string
		for (var i = 0; i < sString.length; i++){
			tempString = sString.charAt(i);
			// if any characters are found, string is not empty
			if (tempString != " "){
				sReturn = "false";
			}
		}
	}
	// string contains characters
	if (sReturn == "false"){
		return false;
	}
	// string is empty or contains only whitespaces
	else{
		return true;
	}
	
}

function validatePhoneNo(phoneNo)
{
	var len = phoneNo.length;
	var character = "";
	
	if (len != 12) {
		return false;
	}
	else {
		for (var i = 0; i < phoneNo.length; i++) {
			character = phoneNo.charAt(i);
			if ((i == 3 || i == 7) && character == "-") {
				continue;
			}
			else if ((i == 3 || i == 7) && character != "-") {
				return false;
			}
			else if (checkIsNumeric(character) == false) {
				return false;
			}
		}		
		return true;
	}
}


// initial code -- 11/07/2001  Jason Barrett	Soltech, Inc.
function checkIsNumeric(string)
{
	// declare variable as converted string to string object
	var sNumber = String(string);
	var tempString;
	var comma;
	
	comma = /,/g;
	sNumber = sNumber.replace(comma, "");
	
	// first determine if string can be converted to an integer....if string is found to be a number,
	// continue with validation
	if (!isNaN(parseInt(sNumber))){
		// validate whether string is empty and is not a null object
		if (sNumber != ""){
			// for each character in string, determine if numeric
			for (var i = 0; i < sNumber.length; i++) {
				tempString = sNumber.charAt(i);	
				// string may have been entered as a decimal, so don't rule out "."	
				if (isNaN(tempString) && tempString != "."){
					return false;
				}
			}
		}
	}
	// if string cannot be parsed into integer, is not numeric, return false
	else if (isNaN(parseInt(sNumber))) {
		return false;
	}
	// if all validation passes, return true
	return true;
}

