//Fixes
//netscape refix
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//
//JNM functions
// script copyright www.wizzbang-designs.com
// you may use this script but this header must be left in place

// form validation 
function ValidateForm(FormName){

var PhoneNumcounter = 0;

	for (var i =0 ;i<= FormName.length-1; i++){

			switch (FormName[i].type) {
			
				case "select-one" :
				
					if (FormName[i].value =="0"){
						
						alert("Please select an option from the '"+ FormName[i].name +"' drop down list.")
						
						return false;
						}
					break;
									
				case "text" :
										
						
						if (FormName[i].name == "Home_Tel" || FormName[i].name == "Work_Tel" || FormName[i].name == "Mob_Tel" ) {
							
									if (FormName[i].value ==""){
											PhoneNumcounter ++;																
									}
							
						}else{
						
								if (FormName[i].value ==""){
								
									alert("Please fill in the '"+ FormName[i].name +"' field before clicking the Submit button")
																	
										return false;
									}
								}
						break;
					
					
					case "textarea" :
						
						if (FormName[i].value ==""){
						
						alert("Please fill in the '"+ FormName[i].name +"' field before clicking the Submit button")
						
						return false;
						}
						
						break;
					
					case "checkbox" :
						
						if (FormName[i].checked == false){
							alert("You must accept our 'Terms and Conditions' (See below) before clicking the submit button")
						
							return false;
						}
						
					break;
					
										
				default : 
			}

	}
	
	// make sure one phone number supplied
	
	if (PhoneNumcounter >= 3){
			alert("You must supply at least one contact number ")
		return false;
	}
	
	
}

//
//
	
	