function couplesTraining(){
	var temp = false;	
	var key = document.Basic_Training;
        if(key.name.value == ''){
                alert('Please fill in the Name field.');
                key.name.focus();
        }else if(key.date.value == ''){
                alert('Please fill in the Date field.');
                key.date.focus();
        }else if(key.address.value == ''){
                alert('Please fill in the Address field.');
                key.address.focus();
        }else if(key.city.value == ''){
                alert('Please fill in the City field.');
                key.city.focus();
        }else if(key.state.value == ''){
                alert('Please fill in the State field.');
                key.state.focus();
        }else if(key.zip.value == ''){
                alert('Please fill in the Zip field.');
                key.zip.focus();
        }else if((key.cell.value == '') && (key.home.value == '') && (key.work.value == '')){
                alert('Please fill in one of the Cell, Home or Work Phone Number fields.');
                key.cell.focus();
        }else if(key.email.value == ''){
                alert('Please fill in the Email field.');
                key.email.focus();
        }else if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(key.email.value))){
				alert("Invalid E-mail Address! Please re-enter.")
                key.email.focus();
        }else if(key.significant_other.value == ''){
                alert('Please tell us the name of your significant other.');
                key.significant_other.focus(); 
        }else if(key.heard_about.value == ''){
                alert('Please tell us how you heard about the class.');
                key.heard_about.focus();        
        }else{
		temp = true;
		alert("Thank you for registering!")       
		key.submit();
	}
	return temp;
}


function contactUs(){
	var temp = false;	
	var cu = document.cu;
        if(cu.nm.value == ''){
                alert('Name cannot be blank.');
                cu.nm.focus();
        }else if(cu.email.value == ''){
                alert('E-Mail cannot be blank.');
                cu.email.focus();
	}else if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(cu.email.value))){
		alert("Invalid E-mail Address! Please re-enter.")
                cu.email.focus();
	}else if(cu.msg.value == ''){
		alert('Message cannot be blank.');
		cu.msg.focus();
	}else
		temp = true;

	return temp;
}

function getPDF(pdf){
	mypage = "pdfs/"+pdf+".pdf";
	myname = "JT";
	w = "640";
	h = "480";
	popUp(mypage, myname, w, h);
}
function popUp(mypage, myname, w, h){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,scrollbars=yes,resizable,location=no';
	window.open(mypage,myname,settings);

}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_02_over = newImage("images/nav_02-over.gif");
		nav_10_over = newImage("images/nav_10-over.gif");
		nav_12_over = newImage("images/nav_12-over.gif");
		t_nav_01_over = newImage("images/t_nav_01-over.gif");
		t_nav_02_over = newImage("images/t_nav_02-over.gif");
		t_nav_03_over = newImage("images/t_nav_03-over.gif");
		preloadFlag = true;
	}
}

function Navigate(page){
	if(page == ''){
		alert('Coming Soon!');
	}else{
		document.navigate.page.value = page;
		document.navigate.submit();
	}
}

function getProdCat(cat){
	document.navigate.cat.value = cat;
	Navigate("products");	
}

function getProdInfo(prod){
	document.navigate.product_id.value = prod;
	Navigate("listing");	
}
function playVideo(){
	mypage = "hec_presentation.html";
	myname = "video";
	w = "350";
	h = "320";
	popUp(mypage, myname, w, h);
}
function searchSite(){
	var key = document.processor;
	if(key.search.value == ''){
		alert('You must enter keywords to search!');
		key.search.focus();
		return false;
	}else{
		key.webpage_id.value = 10;
		key.submit();
		return true;
	}	
}
