/***********************************************
* Form fields Validation Script
***********************************************/

function ValidateForm(f){

      with(f){
         if (isEmpty(_1_Name.value)) {
            alert("Please enter your Name");
            _1_Name.focus();
            return false;
         }

         if (isEmpty(_2_Email_From.value)) {
            alert("Please enter your Email Address");
            _2_Email_From.focus();
            return false;
         }

         if ( !isEmail(_2_Email_From.value) ) {
            alert("Please enter a valid Email Address.");
            _2_Email_From.focus();
            return false;
         }

         if (!isEmpty(_3_Phone.value)) {
	         if (!IsNumber(_3_Phone.value, true)) {
            	alert("Please enter only numbers for your Phone");
            	_3_Phone.focus();
            	return false;
         	}
         }
         if (!isEmpty(_4_Mobile.value)) {
         if (!IsNumber(_4_Mobile.value, true)) {
            	alert("Please enter only numbers for your Mobile Phone");
            	_4_Mobile.focus();
            	return false;
         	}
         }
		 if (!isEmpty(_5_Fax.value)) {
         if (!IsNumber(_5_Fax.value, true)) {
            	alert("Please enter only numbers for your Fax");
            	_5_Fax.focus();
            	return false;
         	}
         }
         if (isEmpty(_6_Comments.value)) {
            alert("Please enter your Enquiry");
            _6_Comments.focus();
            return false;
         }
   	}
   return true;
 }


/***********************************************
* Popup Pic Script
***********************************************/

function PopupPic() {
 if (arguments[1] == null || arguments[1].length == 0 || arguments[2] == null || arguments[2].length == 0) {
  window.open( "popup.asp?" + arguments[0], "", "resizable=1,HEIGHT=200,WIDTH=200"); 
 }
 else {
  window.open( "popup.asp?" + arguments[0], "", "resizable=1,HEIGHT=" + arguments[2] + ",WIDTH=" + arguments[1] + ""); 
 }
} 


/***********************************************
* Popup URL Script
***********************************************/

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=yes,resizable=0,width=440,height=600');");
}
