// JavaScript Document
function open_window(url) {
	window.open(url, 'new_window', 'width=800,height=600,menubar=yes,resizable=yes,scrollbars=yes');
}

function toggle_content(id) {
	// window.alert(document.getElementById(id).style.display);

	if (document.getElementById(id).style.display == 'none') {
		//window.alert('I will display it now');
		document.getElementById(id).style.display = 'block';
	}
	else {
		//window.alert('I will hide it now');
		document.getElementById(id).style.display = 'none';
	}

}

function CheckRequiredFields() {
	var errormessage = new String();
	
	// Put field checks below this point.

	if(WithoutContent(document.FormName.name.value))
	{ 	errormessage += "\nPlease type name."; 
	}
	if(WithoutContent(document.FormName.email.value))
	{ 	errormessage += "\nPlease type your e-mail."; 
	}
	if(WithoutContent(document.FormName.phone.value))
	{ 	errormessage += "\nPlease type your phone number."; 
	}	

	// Put field checks above this point.
	if(errormessage.length > 2) {
		alert('NOTE:' + errormessage);
		return false;
	}
//		alert(' Thank You for your interest. \n\n A Thinnox counselor \nwill contact you shortly. ');	
} // end of function CheckRequiredFields()


function WithoutContent(ss) {
	if(ss.length > 0) { return false; }
	return true;
}