// JavaScript Document

function openwind(theURL){
	window.open(theURL,'','scrollbars,resizable,height=340,width=600');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+"services.php?cmb_service="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu1(targ,selObj,restore){ //v3.0
eval(targ+".location='"+"cottage.php?cmb_cottage="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu2(targ,selObj,restore){ //v3.0
eval(targ+".location='"+"gallery.php?cmb_cottage="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function users_validation()
{
	var error;
	error='false';
	if(document.getElementById("username").value==''){
		error='true';
	}
	if(document.getElementById("password").value==''){
		error='true';
	}
	if(error=='true'){
		document.getElementById("errmsg").style.display='block';
	}else{
		document.getElementById("errmsg").style.display='none';
	}	
}




function openwindmap(theURL){
	window.open(theURL,'','scrollbars,resizable,height=723,width=800');
}
<!--
function valNew() {
	
   obj=document.forms['contact'];
   strError="";
   if (obj.txt_name.value    == "") strError += "  - Name\n";
   if (obj.txt_sub.value   == "") strError += "  - Subject\n";
	if (obj.message.value   == "") strError += "  - Message\n";
	if (obj.txt_tel.value   == "") strError += "  - Telephone\n";
	if (obj.txt_email.value.indexOf("@") < 0 || obj.txt_email.value.indexOf(".") <0 || obj.txt_email.value   == "") strError += "  - Invalid Email\n";
	if (obj.txt_email.value!= obj.txt_cmail.value || obj.txt_cmail.value   == "") strError += "  - Confirm Email\n";
   if (strError!="") {
      alert("You must complete the following fields :\n\n" + strError);
      return false;
   } 
   else return true;
}


function frm_validate() {
   obj=document.forms['enquire'];
   strError="";
   
   if (obj.txt_name.value    == "") strError += "  - Name\n";
   if (obj.txt_email.value   != obj.txt_email_con.value) strError += "  -Please confirm your email\n";
    if (obj.txt_tele.value   == "") strError += "  - Telephone\n";
	 if (obj.txt_fromdate.value   == "Click here") strError += "  - From date\n";
	  if (obj.txt_todate.value   == "Click here") strError += "  - To date\n";
	  var pattern = new RegExp(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/); 
   if(obj.txt_fromdate.value.match(pattern))
   {
	     
   		var date_array = obj.txt_fromdate.value.split('/');
     	var day = date_array[0];
		var month = date_array[1] - 1;
     	 var year = date_array[2];
		source_date = new Date(year,month,day);

      	if((year != source_date.getFullYear()) || (month != source_date.getMonth()) || (day != source_date.getDate()))
      	{
         
      	alert("Invalid From date");
		return false;
		}
      	
 }
   
   
   
   if(obj.txt_todate.value.match(pattern))
   {
	   
   var date_array = obj.txt_todate.value.split('/');
     	var day = date_array[0];
		var month = date_array[1] - 1;
     	 var year = date_array[2];
		source_date = new Date(year,month,day);

      	if((year != source_date.getFullYear()) || (month != source_date.getMonth()) || (day != source_date.getDate()))
      	{
         
      	alert("Invalid To date");
		return false;
		}
   
}
	
	
	
	if (Date.parse(obj.txt_fromdate.value) > Date.parse(obj.txt_todate.value))
	{
	alert("Please enter a valid date");
	return false;
	}

if (strError!="") {
      alert("You must complete the following fields :\n\n" + strError);
      return false;
   } 
else if (obj.txt_email.value.indexOf("@") < 0 || obj.txt_email.value.indexOf(".") <0) 
	{
      alert("You have entered an invalid email address");
      return false;
   } else return true;
   
}



/*******/




//function validate_gallery()
//{
//	if(document.getElementById("txt_teaser1").value==""){
//		document.getElementById("err_msg").style.display='block';
//		return false;
//	}
//
//}
//
//function gallery_delete(sl_no,cmb_cottage)
//{
//window.location.href="gallery_delete.php?sl_no="+sl_no+"&cmb_cottage="+cmb_cottage;
//}
//-->
