// JavaScript Document

function changeCountryTutor()
{
 frmAppl.action ="tutor.asp";
 frmAppl.submit();
}

function ValidateCareerTutor()
{
	var s;
	s = document.frmAppl;	
	if(s.txtFName.value == "")
	{
	alert("Please enter the First Name ");
	s.txtFName.focus();
	return false;
	}
	
	if(s.txtLName.value == "")
	{
	alert("Please enter the Last Name ");
	s.txtLName.focus();
	return false;
	}
	
	if(s.txtEmail.value == "")
	{
	alert("Please enter the Email Address");
	s.txtEmail.focus();
	return false;
	}
	
	if(s.txtEmail.value.indexOf(".") == -1 || s.txtEmail.value.indexOf("@") == -1)
	{
	alert("Please enter a valid Email Address");
	s.txtEmail.select();
	return false;
	}
	if(s.txtCYear.value == "" || s.txtCMonth.value == "" || s.txtCDay.value == "")
	{
	alert("Please enter the valid date");
	s.txtCYear.focus();
	return false;
	}
	if(s.txtGMonth.value == "" || s.txtGYear.value == "" || s.txtGDay.value == "")
	{
	 alert("Please enter the valid date");
	 s.txtGYear.focus();
	 return false;
	}
}

function CoachingFormValidate()
{	
	
	slocate.style.display = "none";
	smatch.style.display = "none";
	semail.style.display = "none";	
	var x;
	var i;
	i =0;
	x = document.courseform	
	if(x.boston_course.selectedIndex == 0) {i++}
	if(x.toronto_course.selectedIndex == 0) {i++}
	if(x.mumbai_course.selectedIndex == 0) {i++}
	if(x.delhi_course.selectedIndex == 0) {i++}
	if(i<3)
	{
	 document.body.scrollTop = 400;
	 smulty.style.display = "";
	 return false;
	}
	
	if(x.boston_course.selectedIndex == 0 && x.toronto_course.selectedIndex == 0 && x.mumbai_course.selectedIndex == 0 && x.delhi_course.selectedIndex == 0){
	//alert("Please select the course")
	document.body.scrollTop = 400;
	slocate.style.display = "";
	x.boston_course.focus();
	return false;
	}
	if(x.first_name.value == "")
	{
		//alert("Please Enter First Name");
		document.body.scrollTop = 450;
		smatch.style.display = "";
		x.first_name.focus();		
		return false;
	}
	if(x.last_name.value == "")
	{
		//alert("Please Enter First Name");
		document.body.scrollTop = 450;
		smatch.style.display = "";
		x.last_name.focus();		
		return false;
	}
	if(x.email.value == "")
	{
		//alert("Please Enter Email Address");
		document.body.scrollTop = 500;
		smatch.style.display = "";
		x.email.focus();
		return false;
	}
	if(x.email.value.indexOf(".") == -1 || x.email.value.indexOf("@") == -1)
	{
		//alert("Please Enter Valid Email Address");
		document.body.scrollTop = 500;
		semail.style.display = "";
		x.email.select();
		return false;
	}
}

function validate_tutor_form()
	{
	 var x;
	 x = document.form1
	 if(x.uid.value == "")
	 {
	 	alert("Enter The User ID");
		x.uid.focus();
		return false;
	 }
	 
	 if(x.pass.value == "")
	 {
	 	alert("Enter The Password");
		x.pass.focus();
		return false;
	 }
	}
	
function validContact()
{
var x;
x = document.contact_form;
	if(x.txtTitle.value == "")
	{
	alert("Please Enter The Title");
	x.txtTitle.focus();
	return false
	}
	if(x.txtCompany.value == "")
	{
	alert("Please Enter The Company");
	x.txtCompany.focus();
	return false
	}
	if(x.txtCountry.value == "")
	{
	alert("Please Enter The Country");
	x.txtCountry.focus();
	return false
	}
	if(x.txtState.value == "")
	{
	alert("Please Enter The State");
	x.txtState.focus();
	return false
	}
	if(x.txtPhone.value == "")
	{
	alert("Please Enter The Phone");
	x.txtPhone.focus();
	return false
	}
	if(x.txtEmail.value == "")
	{
	alert("Please Enter The Email Address");
	x.txtEmail.focus();
	return false
	}
	if(x.txtEmail.value.indexOf("@") == -1 || x.txtEmail.value.indexOf(".") == -1)
	{
	alert("Please Enter a Valid Email Address");
	x.txtEmail.select();
	return false;
	}
	if(x.txtInterest.value == "")
	{
	alert("Please Enter The Interest");
	x.txtInterest.focus();
	return false
	}
}
function validate_support()
{
	var s;
	s = document.supportForm;
	
	if(s.txtName.value == "")
	{
	alert("Please enter the Name ");
	s.txtName.focus();
	return false;
	}
	
	if(s.txtEmail.value == "")
	{
	alert("Please enter the Email Address");
	s.txtEmail.focus();
	return false;
	}
	
	if(s.txtEmail.value.indexOf(".") == -1 || s.txtEmail.value.indexOf("@") == -1)
	{
	alert("Please enter a valid Email Address");
	s.txtEmail.select();
	return false;
	}
	if(s.selProd.value == "")
	{
	alert("Please select the Product ");
	s.selProd.focus();
	return false;
	}	
	if(s.txtProblem.value == "")
	{
	alert("Please enter the short description of problem ");
	s.txtProblem.focus();
	return false;
	}
	if(s.selComp.value == "")
	{
	alert("Please select your Compputer/Processor ");
	s.selProd.focus();
	return false;
	}
	if(s.selRAM.value == "")
	{
	alert("Please select the RAM of system");
	s.selRAM.focus();
	return false;
	}
	if(s.selOperating.value == "")
	{
	alert("Please select the Operating System");
	s.selOperating.focus();
	return false;
	}
	
}	

function popDistance()
{
WindowObjectReference = window.open("popup_distance_course.htm","GmatScore", "width=600,height=500,resizable=no,scrollbars=no,status=no");
}
function virtuousCycle()
{
WindowObjectReference = window.open("popup_virtuous_cycle.htm","GmatScore", "width=300,height=200,resizable=no,scrollbars=no,status=no");
}

function enlargImg(url)
{
WindowObjectReference = window.open(url,"GmatScore", "width=820,height=498,resizable=no,scrollbars=no,status=no");
}

function escramble_506(){
var a,b,c
a='<a href="m'
b='gmatscore.com" class="fbyellow">sal'
a+='ailto:sales'
b+='es@gmatscore.com</a>'
c=unescape('%40')
document.write(a+c+b)
}

function escramble_507(){
var a,b,c
a='<a href="m'
b='gmatscore.com" class="fbyellow">affi'
a+='ailto:affiliates'
b+='liates@gmatscore.com</a>'
c=unescape('%40')
document.write(a+c+b)
}
function TellFriend(ref)
{ 
var str="toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=320,width=500"
	tellaFriend = window.open(ref,"TellObj");
    tellaFriend.opener = top;
} 

function popRequirement()
{
WindowObjectReference = window.open("sysRequire.htm","GmatScore", "width=550,height=400,resizable=no,scrollbars=no,status=no");
}

function popWhitelist()
{
WindowObjectReference = window.open("popup_whitelist.htm","GmatScore", "width=458,height=458,resizable=no,scrollbars=no,status=no");
}

function popGuaranty()
{
WindowObjectReference = window.open("popup_lifetime_guarntee.html","GmatScore", "width=625,height=450,resizable=no,scrollbars=no,status=no");
}

function popdesc()
{	
WindowObjectReference = window.open("popup_description.htm","GmatScore", "width=600,height=500,resizable=no,scrollbars=no,status=no");
}

function popVolumeDiscount()
{
WindowObjectReference = window.open("popup_volume_discount.htm","GmatScore", "width=650,height=550,resizable=no,scrollbars=no,status=no");
}

function popSecureTransaction()
{	
WindowObjectReference = window.open("popup_online_security.html","GmatScore", "width=550,height=350,resizable=no,scrollbars=no,status=no");
}

function showEnlargeImage(id)
{
windowObjectReference = window.open("showenlargeimage.asp?id="+id,"GMATScore", "width=600,height=650,resizable=no,scrollbars=no,status=no")
}

function checkChecked()
{

var x, signal;
signal = 0
x = document.form1;
for(counter = 0;counter<x.checkbox.length;counter++)
{
	if(x.checkbox[counter].checked)
	{	
	signal = 1;
	break;
	}
}
if(signal == 0)
{
alert("Please checked the the test which you want to prurchase");
return false;
}

}


function openPlayer()
{
WindowObjectReference = window.open("fuzzaboutzero/player.html","GmatScore", "width=800,height=600,resizable=no,scrollbars=no,status=no");
}



