

function fn_typeID(obj){
	//this function is called when the user enters four characters in the property id field   
  
	if(obj != parseInt(obj)){
		alert('The Quantity field must be numeric');
		document.getElementById('intBedsQuantity').select();
		
		return false;
	}
	
}
function checkForm()
{  
     if(document.form1.clientName.value==''){document.form1.clientName.focus();alert('*please add your name');return false;}
	
	
	//check for an email value
	if(document.form1.email.value==''){document.form1.email.focus();alert('*please add your email');return false;}
	var re = /^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
 	if(!(re.test(document.form1.email.value))){alert('*enter a valid email');return false;} 
    //check for notes

  previewImage();
  
  
  //alert( decodeEmail(encodedEmail));
}
function previewImage() {
var filename = "";
//create the path to your local file

filename = "file:///" + document.form1.strFile.value;

//check if there is a value


document.form1.hFileName.value = filename;
document.form1.submit();


}
function sendReview()

{  //var sendToEmail = decodeEmail(encodedEmail);
     if(document.form1.screenName.value==''){alert('Please add your screen name');return false;}
	//check for an address value
	if(document.form1.length.value=='0'){alert('Please add your duration');return false;}
	if(document.form1.email.value==''){alert('Please add your email');return false;} 
	var re = /^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
 	if(!(re.test(document.form1.email.value))){alert('Please enter a valid email');return false;}
    //check for notes
	if(document.form1.reviewText.value==''){alert('Please enter a text');return false;}
  
   window.document.form1.submit();
  //alert( decodeEmail(encodedEmail));
}
function subEmail(f)

{  //var sendToEmail = decodeEmail(encodedEmail);
   
	if(f.email.value==''){alert('Please add your email');return false;} 
	var re = /^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
 	if(!(re.test(f.email.value))){alert('Please enter a valid email');return false;}
 
  
}
function fn_goToPage(pageNo){
	document.searchForm.Page.value = pageNo;
	document.searchForm.submit();
}

function showFullImage(arg){
	var strImagePath = arg;
	//alert(strImagePath);
	window.open(strImagePath,'','')
}
function validationForm(){
	
	
	if(document.shippingForm.strEmail.value==''){document.shippingForm.strEmail.focus();alert('please input email');return false}
	
	
	document.shippingForm.submit();
}
function fn_reset(){ 
	
	    document.quickSearchForm.sector.selectedIndex='0';
	    document.quickSearchForm.JobTitle.selectedIndex='0';
		 document.quickSearchForm.Discipline.selectedIndex='0';
	
		document.quickSearchForm.Location.selectedIndex='0';
		document.quickSearchForm.Employment.selectedIndex='0';

	}


	
	function fn_changeClass(id, class1, class2){
//get the id of the element you wish to change
	identity=document.getElementById(id);
	//check what the current class is and swap it for the alternate class
	if(identity.className==class1){
		className=class2;
	}else{
		className=class1;
	};

	identity.className=className;
	
	
		
}
