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];}}}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_openBrWindow(theURL,winName,features) {	newwindow=window.open(theURL,winName,features);	if (window.focus) {newwindow.focus()}}// build flash through JS to avoid ActiveX validationsfunction buildFlash(filepath,w,h) {   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">\n');   document.write(' <param name="allowScriptAccess" value="sameDomain" />\n');   document.write(' <param name="movie" value="'+filepath+'">\n');   document.write(' <param name="quality" value="high">\n');   document.write(' <param name="wmode" value="transparent">\n');   document.write(' <param name="bgcolor" value="#ffffff" />\n');   document.write(' <param name="scale" value="noborder">\n');   document.write(' <param name="loop" value="false">\n');   document.write(' <embed src="'+filepath+'" width="'+w+'" height="'+h+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n');   document.write('</object>\n');}// *****************// switch links for employment page// *****************function showHide(block_name,status){ 	if((status==0)){ 		document.getElementById(block_name).style.position='absolute'; 		document.getElementById(block_name).style.visibility='hidden'; 		document.getElementById(block_name).style.display='none'; 	}else{ 		document.getElementById(block_name).style.position=''; 		document.getElementById(block_name).style.visibility=''; 		document.getElementById(block_name).style.display=''; 	} }function switchLink(curStep,loc){	if(loc=="employment") {   // in the join/employment.php page		if(curStep==1) {			showHide('step1',1);showHide('step2',0);showHide('step3',0);showHide('step4',0);showHide('step5',0);		} else if(curStep==2) {			showHide('step1',0);showHide('step2',1);showHide('step3',0);showHide('step4',0);showHide('step5',0);		} else if(curStep==3){			showHide('step1',0);showHide('step2',0);showHide('step3',1);showHide('step4',0);showHide('step5',0);		} else if(curStep==4){			showHide('step1',0);showHide('step2',0);showHide('step3',0);showHide('step4',1);showHide('step5',0);		} else if(curStep==5){			showHide('step1',0);showHide('step2',0);showHide('step3',0);showHide('step4',0);showHide('step5',1);		}	}	if(loc=="faqs") {   // in the outsourcing/faqs.php page		if(curStep==1) {			showHide('faq01',1);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==2) {			showHide('faq01',0);showHide('faq02',1);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==3){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',1);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==4){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',1);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==5){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',1);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==6){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',1);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==7){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',1);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==8){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',1);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==9){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',1);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==10){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',1);showHide('faq11',0);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==11){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',1);showHide('faq12',0);showHide('faq13',0);		} else if(curStep==12){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',1);showHide('faq13',0);		} else if(curStep==13){			showHide('faq01',0);showHide('faq02',0);showHide('faq03',0);showHide('faq04',0);showHide('faq05',0);showHide('faq06',0);showHide('faq07',0);showHide('faq08',0);showHide('faq09',0);showHide('faq10',0);showHide('faq11',0);showHide('faq12',0);showHide('faq13',1);		}	}}// *****************// ********** Form validation scripts **********function validateEmpty(data,fieldname) {	// initial variable states    var blankErr = "";	// check for a blank entry in the firstname field	if (data == "") {	    blankErr = "- " + fieldname + " must not be blank\n";	}	return blankErr;}function validateEmail(email,fieldname) {	// initial variable states    var emailErr = "";	if (email == "") {	    emailErr = "- " + fieldname  + " must not be blank\n";	} else {		// check for invalid characters in the email address		var email = email.toLowerCase();		var validchars = "abcdefghijklmnopqrstuvwxyz0123456789@.-_";  		for (var i=0; i < email.length; i++) {			var letter = email.charAt(i);			if (validchars.indexOf(letter) == -1) { emailErr = "- " + fieldname  + " must be a valid email address\n"; }		}		// check to make sure there is an (@) and a following (.)		if (email.indexOf("@") < 1) { emailErr = "- " + fieldname  + " must be a valid email address\n"; }		if (email.indexOf(".",(email.indexOf("@")+2)) < 1) { emailErr = "- " + fieldname  + " must be a valid email address\n"; }	}	return emailErr;}function validateZip(zipcode) {	// initial variable states    var zipErr = "";	if (zipcode == "") {	    zipErr = "- [Zip Code] must not be blank\n";	} else if (zipcode.length > 5) {		zipErr = "- [Zip Code] must be a valid 5-digit number\n";	} else {		var validchars = "0123456789";		for (var i=0; i < zipcode.length; i++) {			var nmbr = zipcode.charAt(i);			if (validchars.indexOf(nmbr) == -1) { zipErr = "- [Zip Code] must be a valid 5-digit number\n"; }		}	}	return zipErr;}function validatePhone(phonenumber) {	// initial variable states    var phoneErr = "";	if (phonenumber == "") {	    phoneErr = "- [Phone Number] must not be blank\n";	} else if (phonenumber.length < 7) {		phoneErr = "- [Phone Number] must be a valid number\n";	} else {		var validchars = "0123456789-";		for (var i=0; i < phonenumber.length; i++) {			var nmbr = phonenumber.charAt(i);			if (validchars.indexOf(nmbr) == -1) { phoneErr = "- [Phone Number] must be a valid number\n"; }		}	}	return phoneErr;}function validateMonth(data,type) {	// initial variable states    var vErr = "";	if (data == "") {	    vErr = "- " + type + " must not be blank\n";	} else if (data.length < 2) {		vErr = "- " + type + " must be a valid 2-digit number within 01-12\n";	} else if (data < 1 || data > 12) {		vErr = "- " + type + " must be a valid 2-digit number within 01-12\n";	} else {		var validchars = "0123456789";		for (var i=0; i < data.length; i++) {			var nmbr = data.charAt(i);			if (validchars.indexOf(nmbr) == -1) { vErr = "- " + type + " must be a valid 2-digit number within 01-12\n"; }		}	}	return vErr;}function validateDay(data,type) {	// initial variable states    var vErr = "";	if (data == "") {	    vErr = "- " + type + " must not be blank\n";	} else if (data.length < 2) {		vErr = "- " + type + " must be a valid 2-digit number within 01-31\n";	} else if (data < 1 || data > 31) {		vErr = "- " + type + " must be a valid 2-digit number within 01-31\n";	} else {		var validchars = "0123456789";		for (var i=0; i < data.length; i++) {			var nmbr = data.charAt(i);			if (validchars.indexOf(nmbr) == -1) { vErr = "- " + type + " must be a valid 2-digit number within 01-31\n"; }		}	}	return vErr;}function validateYear(data,type) {	// initial variable states    var vErr = "";	if (data == "") {	    vErr = "- " + type + " must not be blank\n";	} else if (data.length < 4) {		vErr = "- " + type + " must be a valid 4-digit number\n";	} else {		var validchars = "0123456789";		for (var i=0; i < data.length; i++) {			var nmbr = data.charAt(i);			if (validchars.indexOf(nmbr) == -1) { vErr = "- " + type + " must be a valid 4-digit number\n"; }		}	}	return vErr;}// ******************************************************