
function OpenWindow(url)
{
	param="status=no,resizable=yes,scrollbars=yes,location=no,left=25,top=25,width=700,height=500";
	window.open(url,'',param)
}

function OpenWindow1(url)
{
	param="status=no,toolbar=yes,resizable=yes,scrollbars=yes,location=no,left=25,top=25,width=700,height=500";
	window.open(url,'',param)
}

function OpenWindow_small(url)
{
	param="status=no,resizable=yes,scrollbars=yes,location=no,left=25,top=25,width=700,height=400";
	window.open(url,'',param)
}

function OpenWindow_large(url)
{
	param="status=no,resizable=yes,scrollbars=yes,location=no,left=25,top=25,width=900,height=600";
	window.open(url,'',param)
}

function blanktitle()
{
	document.title = "eVision Inc";
}

function CheckEmail(email)
{
	if(email=="") {
	return "\n Email address";
	}
	else
	{
  	tmp=email;
   		if(tmp.indexOf("@")==-1 || 
tmp.indexOf(".") ==-1){
		return "\n Valid Email address";
		}
		else
		{
			return "";
		}
	}
}

function Enrolment_Form_Validator(frm) {
//this function is called from the onSubmit event of the Enrolment form to check that all the required fields have been filled in;
//if any required field has not been filled in, then the user will be shown a list of those fields and the form will NOT be submitted;
missinginfo = "";

if(frm.FirstName.value=="") {
missinginfo += "\n First Name";
}

if(frm.LastName.value=="") {
missinginfo += "\n Last Name";
}

missinginfo += CheckEmail(frm.email.value);

if(frm.Telephone.value=="") {
missinginfo += "\n Telephone Number";
}
tmp=frm.Seminar;
index=tmp.selectedIndex;
if(tmp.options[index].value=="")
{
    missinginfo += "\n Select a Seminar";}

if (missinginfo != "") {
missinginfo ="Please fill in the following required fields:\n" +
"_____________________________\n" +
missinginfo + "\n_____________________________" +
"\n";
alert(missinginfo);
return false;
}
else{return true;}

}

function Slideshow_Form_Validator(frm) {
//this function is called from the onSubmit event of the Slideshow Registration form to check that all the required fields have been filled in;
//if any required field has not been filled in, then the user will be shown a list of those fields and the form will NOT be submitted;
missinginfo = "";

if(frm.FirstName.value=="") {
missinginfo += "\n First Name";
}

if(frm.LastName.value=="") {
missinginfo += "\n Last Name";
}

missinginfo += CheckEmail(frm.email.value);

if(frm.Telephone.value=="") {
missinginfo += "\n Telephone Number";
}

if (missinginfo != "") {
missinginfo ="Please fill in the following required fields:\n" +
"_____________________________\n" +
missinginfo + "\n_____________________________" +
"\n";
alert(missinginfo);
return false;
}
else{return true;}

}

function confirmformreset()
{
  return confirm("You have chosen to clear the form. Click 'OK' to continue clearing the form."
+ " Click 'Cancel' to cancel clearing the form.");
}


