//------redirect to state page based on country id---
	var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;//to check date
	var emailPat = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;//to check email
	var phonePat=/^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/;//to check phone number in US format
//------redirect to state page based on country id---

function funSubmit(formName,action)
{
	doc=eval("document."+formName);
	doc.action=action;
	doc.submit();
}
function funSubmit1(formName,url)
{
	doc=eval("document."+formName);

	//"singleUnit.php?act=Add&drpCountry="+document.frmProperties.drpCountry.value+"& drpState="+document.frmProperties.drpState.value+"&drpState="+document.frmProperties.drpState.value+"&drpCity="+document.frmProperties.drpCity.value+"&drpProptype="+document.frmProperties.drpCity.value+"&firstName="+document.frmProperties.firstName.value

	//doc=eval("document."+formName);
	doc.action="singleUnit.php?drpCountry="+trim(doc.drpCountry.value)+"&drpState="+trim(doc.drpState.value)+"&drpState="+trim(doc.drpState.value)+"&drpProptype="+trim(doc.drpProptype.value)+url;
	doc.submit();
}

/* function is used to validate member login form(login.php)*/
function validateLogin(frm)
{

	frmName=eval("document."+frm);
	if(frmName.username.value=="")
	{
		alert("Please enter username");
		frmName.username.focus();
		return false;
	}
	else if(frmName.password.value=="")
	{
		alert("Please enter password");
		frmName.password.focus();
		return false;
	}	
	else
	{
		if(frm=="frmHome")
			frmName.action="propOwner/logincheck.php";
		else
			frmName.action="logincheck.php";
		frmName.submit();
		
	}
		
}
function funKeySrchO(e,frmName)
{
	if(e.keyCode==13)	
	{
		validateLogin(frmName);	
	}
}
/* function ends */

/* function ends */
function makeNull()
{
	document.frmHome.username.value="";
	document.frmHome.password.value="";
	return true;
}
//---------properties page------//

//property State pass value
function getPropState(url, pg)
{ 
	var url  = url+"?"+"pg="+pg+"&drpCountry="+document.frmProperties.drpCountry.value;
	passvaluee(url,"../images");
}
function getPropStateNew(divid,url, pg)
{ 
	var url  = url+"?"+"pg="+pg+"&drpCountry="+document.frmProperties.drpCountry.value;	
	new_passvalue1(divid,url,"../images");
}
	
// properties page link(region.php)
function propertiesLinkList(url, pg,index,type,so)
{ 
	var url  = url+"?"+"pg="+pg+"&type="+type+"&so="+so+"&index="+index+"&drpState="+document.frmProperties.drpState.value+"&drpCountry="+document.frmProperties.drpCountry.value+"&drpProptype="+document.frmProperties.drpProptype.value;	
	passvalue(url,"../images");
}
// properties page link
function propertiesLinkListNew(url, pg,index,type,so)
{	

	var url  = url+"?"+"pg="+pg+"&type="+type+"&so="+so+"&index="+index+"&drpState="+document.frmProperties.drpState.value+"&drpCountry="+document.frmProperties.drpCountry.value+"&drpProptype="+document.frmProperties.drpProptype.value;
	
	new_passvalue("div_results",url,"../images");
}
	

/*---------------------Add propeorty- page 1 --------------------*/

function doAddress(from){
//find point to plot in the google map based on address entered	
	var geocoder = new GClientGeocoder();
	
	//get region selected text
	//var w = document.frmSingleUnit.drpRegion.selectedIndex;
	//var selected_textRegion = document.frmSingleUnit.drpRegion.options[w].text;
	
	//get city selected text
	var c = document.frmSingleUnit.drpCity.selectedIndex;
	var selected_textCity = document.frmSingleUnit.drpCity.options[c].text;
	
	//get state selected text
	var s = document.frmSingleUnit.drpState.selectedIndex;
	var selected_textState = document.frmSingleUnit.drpState.options[s].text;
	
	//get state selected text
	var co = document.frmSingleUnit.drpCountry.selectedIndex;
	var selected_textCountry = document.frmSingleUnit.drpCountry.options[co].text;
	
	//selected_textRegion
	var property_address=trim( document.frmSingleUnit.txtAddress.value)+","+trim(selected_textCity)+","+trim(selected_textState)+","+trim(selected_textCountry);//document.write(property_address);
  	geocoder.getLatLng(property_address,function(point){ //alert(point);
  	if(!point){
  		alert("Your details are not correct. Please enter Address,City and Zip Code correctly");
  		 return false;
  	}else{
		document.frmSingleUnit.hidPoint.value=point;
		//alert(point);
		document.frmSingleUnit.action="singleUnit1.php?from="+from;
		document.frmSingleUnit.submit();
	}
    });
}
//--------validate Single Unit-------
function validateSingleUnit(from)
{
	if(trim(document.frmSingleUnit.txtPropertyName.value)=="")	
	{
		alert("Please enter a property name.");	
		document.frmSingleUnit.txtPropertyName.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.txtPropertyCode.value)=="")	
	{
		alert("Please enter a property code.");	
		document.frmSingleUnit.txtPropertyCode.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.cmbPropertyType.value)=="0")	
	{
		alert("Please select a property type.");	
		document.frmSingleUnit.cmbPropertyType.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.cmbPtyCategory.value)=="0")	
	{
		alert("Please select a property category.");	
		document.frmSingleUnit.cmbPtyCategory.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.txtShortDescription.value)=="")	
	{
		alert("Please enter a short description.");	
		document.frmSingleUnit.txtShortDescription.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.txtAmenities.value)=="")	
	{
		alert("Please enter property details.");	
		document.frmSingleUnit.txtAmenities.focus();
		return false;
	}/**/
	if(trim(document.frmSingleUnit.txtAddress.value)=="")	
	{
		alert("Please enter address.");	
		document.frmSingleUnit.txtAddress.focus();
		return false;
	}
	if(document.frmSingleUnit.drpCountry.value==0)	
	{
		alert("Please select a country.");	
		document.frmSingleUnit.drpCountry.focus();
		return false;
	}
	if(document.frmSingleUnit.drpState.value==0)	
	{
		alert("Please select a state.");	
		document.frmSingleUnit.drpState.focus();
		return false;
	}
	if(document.frmSingleUnit.drpCity.value==0)	
	{
		alert("Please select a city.");	
		document.frmSingleUnit.drpCity.focus();
		return false;
	}
	if(document.frmSingleUnit.txtZip.value=="")
	{
		alert("Please enter zip code.");	
		document.frmSingleUnit.txtZip.focus();
		return false;
	}
	if(trim(document.frmSingleUnit.phone.value)=="")
	{
		alert("Please enter phone no.");
		document.frmSingleUnit.phone.focus();
		return false;
	}
	/*if(document.frmSingleUnit.phone.value!="" && !phonePat.test(document.frmSingleUnit.phone.value))
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
	  document.frmSingleUnit.phone.focus();
      return false;

   }*/
	doAddress(from);
}
//ajax function to get  state
function getStateListPr(countryId)
{
	var url  = "ajax_getStateListPr.php?"+"countryId="+countryId;
	passvalue(url,"../images");	
}
//ajax function to get  city
function getCityList(stateId)
{ 
	var url  = "ajax_getCityList.php?"+"stateId="+stateId;
	passvaluee(url,"../images");	
}

function getRegionList(cityId)
{ 
	var url  = "ajax_getRegion.php?drpCity="+cityId;
	passvalue3(url,"../images");
}

/*--------------------images.php----------*/
function funAddImages(from)
{
	var pageNo=document.frmAddImage.hidPage.value;
	

	if(document.frmAddImage.hidAction.value=="Add")
	{
		if(pageNo==0)
		{
			if(document.frmAddImage.filePrtyImage1.value=="")
			{
				alert("Please select an image");	
				document.frmAddImage.filePrtyImage1.focus();
				return false;
			}
			if(document.frmAddImage.filePrtyImage2.value=="")
			{
				alert("Please select an image");	
				document.frmAddImage.filePrtyImage2.focus();
				return false;
			}
		}
	}
	
	for(i=1;i<6;i++)
	{
		var fil=eval("document.frmAddImage.filePrtyImage"+i);
		var filval=fil.value.toLowerCase();		
		if(filval!="")
		{
			if((filval.lastIndexOf(".jpg")==-1) &&(filval.lastIndexOf(".JPG")==-1) &&(filval.lastIndexOf(".gif")==-1)&&(filval.lastIndexOf(".GIF")==-1)&&(filval.lastIndexOf(".PJPEG")==-1) &&(filval.lastIndexOf(".pjpeg")==-1)&&(filval.lastIndexOf(".JPEG")==-1)																																																													  &&(filval.lastIndexOf(".jpeg")==-1)&&(filval.lastIndexOf(".png")==-1)&& (filval.lastIndexOf(".PNG")==-1))
			{
				alert("Please select a valid image file.");
				fil.focus();
				return false;
			}		
		}
	}
	
	
	document.frmAddImage.action="images1.php?from="+from;
	document.frmAddImage.submit();
}

function delPImage(propertyImageId)
{
	if(confirm("Do you want to delete this image?"))	
	{
		//url="ajax_delpImage.php?pImgId="+propertyImageId;
		//passvalue(url);
		document.frmAddImage.action="ajax_delpImage.php?pImgId="+propertyImageId;
		document.frmAddImage.submit();
	}
	
}

/*------------------rates.php-------------------*/
//get rate season description
function getPropRate(rateSeasonId)
{
	var propertyId=document.frmRates.hidPid.value;
	document.getElementById("div_combo").innerHTML="";
	var url  = "ajax_propRate.php?"+"rateSeasonId="+rateSeasonId+"&propertyId="+propertyId;
	
	passvalueFCK(url,"../images");
}

//update rate season
function updatePropRateSeason()
{
	var propertyId=document.frmRates.hidPid.value;
	var rateSeasonId=document.frmRates.cmbRateSeason.value;
	var description=FCKeditorAPI.__Instances['txtContent'].GetHTML();
	if(rateSeasonId==0)
	{
		alert("Please select a season");
		document.frmRates.cmbRateSeason.focus();
		return false;
	}
	if(trim(description)=="")
	{
		alert("Please enter description.");
		document.frmRates.txtContent.focus();
		return false;
	}
	
	var url  = "ajax_updatePropRate.php?"+"rateSeasonId="+rateSeasonId+"&propertyId="+propertyId+"&desc="+description;
	passvaluee(url,"../images");	
}
//update rates

function validateRate()
{
	/*if(document.frmRates.txtSpEventRate.value!="")	
	{
		if(checkprice(document.frmRates.txtSpEventRate.value)==false)	
		{
			alert("Please enter a valid price.");	
			document.frmRates.txtSpEventRate.focus();
			return false;
		}
	}
	if(document.frmRates.txtBonusOffer.value!="")	
	{
		if(checkprice(document.frmRates.txtBonusOffer.value)==false)	
		{
			alert("Please enter a valid price.");	
			document.frmRates.txtBonusOffer.focus();
			return false;
		}
	}
	if(document.frmRates.txtSpDiscounts.value!="")	
	{
		if(checkprice(document.frmRates.txtSpDiscounts.value)==false)	
		{
			alert("Please enter a valid price.");	
			document.frmRates.txtSpDiscounts.focus();
			return false;
		}
	}*/
	var rateDetail=FCKeditorAPI.__Instances['txtRateDetail'].GetHTML();
	if(trim(rateDetail)=="" && (trim(document.frmRates.txtMinRate.value)=="" && trim(document.frmRates.txtMaxRate.value)=="") )
	{
		alert("Please enter either ratedetail or minimum and maximum rate.");
		document.frmRates.txtRateDetail.focus();
		return false;
	}
	if(trim(document.frmRates.txtMinRate.value)=="" && trim(document.frmRates.txtMaxRate.value)!="")
	{
		alert("Please enter minimum rate.");	
		document.frmRates.txtMinRate.focus();
		return false;
	}
	if(trim(document.frmRates.txtMinRate.value)!="" && checkprice(document.frmRates.txtMinRate.value)==false)
	{
		alert("Please enter a valid minimum price.");	
		document.frmRates.txtMinRate.focus();
		return false;
	}
	if(trim(document.frmRates.txtMinRate.value)!="" && trim(document.frmRates.txtMaxRate.value)=="")
	{
		alert("Please enter maximum rate.");	
		document.frmRates.txtMaxRate.focus();
		return false;
	}
	if(trim(document.frmRates.txtMaxRate.value)!="" && checkprice(document.frmRates.txtMaxRate.value)==false)
	{
		alert("Please enter a valid maximum price.");	
		document.frmRates.txtMaxRate.focus();
		return false;
	}
	if(trim(document.frmRates.txtMaxRate.value)!="" && trim(document.frmRates.txtMinRate.value)!="" )
	{
		var minRate=parseInt(document.frmRates.txtMinRate.value);
		var maxRate=parseInt(document.frmRates.txtMaxRate.value);
		if(minRate>maxRate)
		{
			alert("Please enter maximum price greater than minimum price.");	
			document.frmRates.txtMaxRate.focus();
			return false;	
		}
	}
	document.frmRates.action="rates1.php";
	document.frmRates.submit();
}

/*--------------------roomImages.php----------*/
function funAddRoomImages(from)
{
	var pageNo=document.frmAddRoomImage.hidPage.value;
	
	if(document.frmAddRoomImage.hidAction.value=="Add")
	{
		if(pageNo==0)
		{
			if(document.frmAddRoomImage.fileRoomImage1.value=="")
			{
				alert("Please select an image");	
				document.frmAddRoomImage.fileRoomImage1.focus();
				return false;
			}
			if(document.frmAddRoomImage.fileRoomImage2.value=="")
			{
				alert("Please select an image");	
				document.frmAddRoomImage.fileRoomImage2.focus();
				return false;
			}
		}
	}
	
	for(i=1;i<6;i++)
	{
		var fil=eval("document.frmAddRoomImage.fileRoomImage"+i);
		var filval=fil.value.toLowerCase();		
		if(filval!="")
		{
			if((filval.lastIndexOf(".jpg")==-1) &&(filval.lastIndexOf(".gif")==-1) &&(filval.lastIndexOf(".ico")==-1)&&(filval.lastIndexOf(".swf")==-1)&&(filval.lastIndexOf(".bmp")==-1)&&(filval.lastIndexOf(".jpeg")==-1)&&(filval.lastIndexOf(".pjpeg")==-1))
			{
				alert("Please select a valid image file.");
				fil.focus();
				return false;
			}		
		}
	}
	
	
	document.frmAddRoomImage.action="roomImages1.php?from="+from;
	document.frmAddRoomImage.submit();
}

function delRoomImage(roomImageId)
{
	if(confirm("Do you want to delete this image?"))	
	{
		document.frmAddRoomImage.action="ajax_delRoomImage.php?rImgId="+roomImageId;
		document.frmAddRoomImage.submit();
	}
	
}

/*-----------------------------Property Mata----------------------------------------*/
function funRoom(from)
{
	document.frmMeta.action="propertyMeta1.php?from="+from;
	document.frmMeta.submit();
}
//------------------------------------------------------//
//ajax function to get room name
function getRoomName(room)
{
	document.getElementById("div_combocity").innerHTML="";
	var url = "ajax_getRoom.php?"+"&room="+room;
	passvalue3(url,"../images");
}

//Add a room
function funAddRoom(from)
{
	if(trim(document.frmAddRooms.txtRoomName.value)=="")
	{
		alert("Please enter room name.");
		document.frmAddRooms.txtRoomName.focus();
		return false;
	}
	if(document.frmAddRooms.cmbPtyCategory.value=="0")
	{
		alert("Please choose a room category.");
		document.frmAddRooms.cmbPtyCategory.focus();
		return false;
	}
	/*if(trim(document.frmAddRooms.txtMinRate.value)=="")
	{
		alert("Please enter minimum rate.");	
		document.frmAddRooms.txtMinRate.focus();
		return false;
	}*/
	if(trim(document.frmAddRooms.txtMinRate.value)!="")
	{
		if(checkprice(document.frmAddRooms.txtMinRate.value)==false)
		{
			alert("Please enter a valid minimum price.");	
			document.frmAddRooms.txtMinRate.focus();
			return false;
		}
	}
	/*if(trim(document.frmAddRooms.txtMaxRate.value)=="")
	{
		alert("Please enter maximum rate.");	
		document.frmAddRooms.txtMaxRate.focus();
		return false;
	}*/
	if(trim(document.frmAddRooms.txtMaxRate.value)!="")
	{
		if(checkprice(document.frmAddRooms.txtMaxRate.value)==false)
		{
			alert("Please enter a valid maximum price.");	
			document.frmAddRooms.txtMaxRate.focus();
			return false;
		}
	}
	var minRate=parseInt(document.frmAddRooms.txtMinRate.value);
	var maxRate=parseInt(document.frmAddRooms.txtMaxRate.value);
	if(minRate>maxRate)
	{
		alert("Please enter maximum price greater than minimum price.");	
		document.frmAddRooms.txtMaxRate.focus();
		return false;	
	}
	document.frmAddRooms.action="addRoom1.php?from="+from;
	document.frmAddRooms.submit();		
}
//get room rate season description
function getRoomRate(rateSeasonId)
{
	document.getElementById("div_combo").innerHTML="";
	if(trim(document.frmAddRooms.txtRoomName.value)=="")
	{
		alert("Please enter room name.");
		document.frmAddRooms.txtRoomName.focus();
		return false;
	}
	var roomId=document.frmAddRooms.drpRoom.value;
	var url  = "ajax_roomRate.php?"+"rateSeasonId="+rateSeasonId+"&roomId="+roomId;
	passvalueFCK(url,"../images");	
}
function updateRoomRateSeason()
{
	var roomId=document.frmAddRooms.drpRoom.value;
	var rateSeasonId=document.frmAddRooms.cmbRateSeason.value;
	var description=FCKeditorAPI.__Instances['txtContent'].GetHTML();
	if(trim(document.frmAddRooms.txtRoomName.value)=="")
	{
		alert("Please enter room name.");
		document.frmAddRooms.txtRoomName.focus();
		return false;
	}
	if(trim(document.frmAddRooms.hidRoomId.value)=="")
	{
		alert("Please choose a room.");
		document.frmAddRooms.drpRoom.focus();
		return false;
	}
	if(rateSeasonId==0)
	{
		alert("Please select a season");
		document.frmAddRooms.cmbRateSeason.focus();
		return false;
	}
	if(trim(description)=="")
	{
		alert("Please enter description.");
		document.frmAddRooms.txtContent.focus();
		return false;
	}
	
	var url  = "ajax_updateRoomRate.php?rateSeasonId="+rateSeasonId+"&roomId="+roomId+"&desc="+description;
	passvaluee(url,"../images");		
}

/*--------------user profile----------------------------------*/

function getStateByCtryId(countryId)
{
	url="ajax_getStateByCtryId.php?countryId="+countryId;	
	passvalue(url,"../images");
}
function getCityByStateId(stateId)
{
	url="ajax_getCityByStateId.php?stateId="+stateId;	
	passvaluee(url,"../images");
}
function funUserProfile()
{
	
if(document.frmJoin.txtFirstName.value=="")
	{
		alert("Please enter your first name.");	
		document.frmJoin.txtFirstName.focus();
		return false;
	}
	if(document.frmJoin.txtLastName.value=="")
	{
		alert("Please enter your last name.");	
		document.frmJoin.txtLastName.focus();
		return false;
	}
	if(document.frmJoin.txtAddress.value=="")
	{
		alert("Please enter your address.");	
		document.frmJoin.txtAddress.focus();
		return false;
	}
	if(document.frmJoin.txtCountry.value=="")
	{
		alert("Please enter your country.");	
		document.frmJoin.txtCountry.focus();
		return false;
	}
	if(document.frmJoin.txtState.value=="")
	{
		alert("Please enter your  province/state.");	
		document.frmJoin.txtState.focus();
		return false;
	}
	if(document.frmJoin.txtCity.value=="")
	{
		alert("Please enter your city.");	
		document.frmJoin.txtCity.focus();
		return false;
	}
/*	
	if(document.frmJoin.drpCountry.value=="0")
	{
		alert("Please select a country.");	
		document.frmJoin.drpCountry.focus();
		return false;
	}
	if(document.frmJoin.drpState.value=="0")
	{
		alert("Please select a state.");	
		document.frmJoin.drpState.focus();
		return false;
	}
	if(document.frmJoin.drpCity.value=="0")
	{
		alert("Please select a city.");	
		document.frmJoin.drpCity.focus();
		return false;
	}
*/
	if(document.frmJoin.txtZip.value=="")
	{
		alert("Please enter zip code.");	
		document.frmJoin.txtZip.focus();
		return false;
	}
	if(document.frmJoin.txtLogin.value=="")
	{
		alert("Please enter login name.");	
		document.frmJoin.txtLogin.focus();
		return false;
	}
	if(document.frmJoin.txtPass.value=="")
	{
		alert("Please enter password.");	
		document.frmJoin.txtPass.focus();
		return false;
	}
	/* if(checkint(document.frmJoin.txtZip.value)==false)
	{
	    alert("Please enter valid zip.");
	    document.frmJoin.txtZip.value="";
	    document.frmJoin.txtZip.focus();
	    return false;
	}	*/
	if(document.frmJoin.txtEmail.value=="")
	{
		alert("Please enter email id.");	
		document.frmJoin.txtEmail.focus();
		return false;
	}
	/*if(!emailPat.test(document.frmJoin.txtEmail.value))
	{
	  	alert("Invalid email address.");
	  	document.frmJoin.txtEmail.focus();
	  	 return false;
	}*/
	if(document.frmJoin.txtWorkphone.value=="")
	{
		alert("Please enter work phone.");	
		document.frmJoin.txtWorkphone.focus();
		return false;
	}
	
	/*if(document.frmJoin.txtWorkphone.value!="" && !phonePat.test(document.frmJoin.txtWorkphone.value))
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
	  document.frmJoin.txtWorkphone.focus();
      return false;
   }*/
	if(document.frmJoin.txtHomephone.value=="")
	{
		alert("Please enter Home Phone.");
		document.frmJoin.txtHomephone.focus();
		return false;
	}
		//check if home phone is valid
    
 	/*if(document.frmJoin.txtHomephone.value!="" && !phonePat.test(document.frmJoin.txtHomephone.value))
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
	  document.frmJoin.txtHomephone.focus();
      return false;
   }*/
	if(document.frmJoin.txtCellphone.value=="")
	{
		alert("Please enter CellPhone.");
		document.frmJoin.txtCellphone.focus();
		return false;
	}
	//check if cell is valid
   /*	if(document.frmJoin.txtCellphone.value!="" && !phonePat.test(document.frmJoin.txtCellphone.value))
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
	  document.frmJoin.txtCellphone.focus();
      return false;
   }*/
	/*if(document.frmJoin.txtFax.value=="")
	{
		alert("Please enter fax number.");
		document.frmJoin.txtFax.focus();
		return false;
	}*/
	//check if cell is valid
   /*	if(document.frmJoin.txtFax.value!="" && !phonePat.test(document.frmJoin.txtFax.value))
   {
      alert("The fax number you entered is not valid.\r\nPlease enter a fax number with the format xxx-xxx-xxxx.");
	  document.frmJoin.txtFax.focus();
      return false;
   }*/
   
   prFlag=0
   for(i=0;i<4;i++)
   { 
	   if(document.frmJoin.rdPreferred[i].checked)
	   {
		   prFlag=1;
		   break;
	   }
   }
   if(prFlag==0)
   {
	  alert("Please select your preferred phone.");
      return false;
   }

	document.frmJoin.action="userProfile1.php";
	document.frmJoin.submit();
}

//----------------listRoom.php------------------//
//add rooms
function funLisRoomAdd(prtyId)
{
	document.frmListRooms.action="addRooms.php?propertyId="+prtyId+"&act=Edit";
	document.frmListRooms.submit();
}
//delete room
function delRoom(roomId,type,so,propertyId)
{
	if(confirm("Do you want to delete this room?"))	
	{
		passvalue("ajax_listRooms.php?rId="+roomId+"&type="+type+"&so="+so+"&propertyId="+propertyId);
	}
	
}
