//--- This Part is used in /457/default.asp
function windowOpen(aWindow,width,height,aPage,scroll) {
   		myWindow = window.open("",aWindow,"scrollbars=" + scroll + ",width=" + width + ",height=" + height+",top=0,left=0,screenX=0,screenY=0");
   		myWindow.location.href = aPage;
   		if (!myWindow.opener) myWindow.opener = self;
	}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// ---- This Part is used in /457/register_interest.asp
function focusFirstName(theForm) {
	theForm.contact_firstname.focus();
}	

function validateForm(theForm){
	if (validateField(theForm, "contact_firstname", "text", "Please enter your first name.") == false) {
		return false;
	}
	if (validateField(theForm, "contact_surname", "text", "Please enter your last name.") == false) {
		return false;
	}
	if (validateField(theForm, "email", "text", "Please enter your email address.") == false) {
		return false;
	}
	else if (!isValidEmailAddr(theForm.email.value)){
		alert("Your email address does not seem to be correct.");
		theForm.email.focus();
		return false;
	}
	if ((!theForm.job_assistance[0].checked) && (!theForm.job_assistance[1].checked)) {
		alert("Please specify if you are interested in getting help to find a job.");
		return false;
	}
	if ((!theForm.visa_assistance[0].checked) && (!theForm.visa_assistance[1].checked)) {
		alert("Please specify if you are interested in getting help with your visa.");
		return false;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}