	var xmlHttp;
	function createXMLHttpRequest(){
		if(window.ActiveXObject){
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}else if(window.XMLHttpRequest){
					xmlHttp = new XMLHttpRequest();
				}
	}
	
	///////////////////////// Ajax Check User /////////////////////////////////////////////////////
	function startRequest(objEid,Elang){
		if(objEid == "")
		{
			alert("Please insert your Easy Property ID");
			objEid.focus();
			return false;
		}
		if(objEid.length <= 5)
		{
			alert("Please insert your Easy Property ID between 6-20 characters");
			objEid.focus();
			return false;
		}
		createXMLHttpRequest();

			xmlHttp.open("GET","include/chk.func.php?avai=true&eid="+objEid,true);
			xmlHttp.onreadystatechange = handleStateChange;
			xmlHttp.send(null);
	}

	function handleStateChange(){
		if(xmlHttp.readyState == 1){
			document.getElementById("chkavai").innerHTML = "<img src='images/loading19.gif' border='0'>";
		}else if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
					document.getElementById("chkavai").innerHTML = xmlHttp.responseText;
				}
	}
	
	//////////////////////////////// Regist /////////////////////////////////////////////////////////////
	function Action_regist(vuser,vpwd,vname,vfname,vgender,vbday,vbmonth,vbyear,vcountry,vemail)
	{
		alert("Yes Yes Yes");
		createXMLHttpRequest();
		objPostVar = "easy_id="+vuser+"&easy_pwd="+vpwd+"&easy_name="+vname+"&easy_fname="+vfname+"&gender="+vgender+"&b_day="+vbday+"&b_month="+vbmonth+"&b_year="+vbyear+"&r_country="+vcountry+"&email="+vemail;
		xmlHttp.open("GET","../include/register_action.php?"+objPostVar,true);
		//xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttp.onreadystatechange = handleAction_regist;
		xmlHttp.send(null);

	}
	function handleAction_regist(){
		if(xmlHttp.readyState == 4){
			document.getElementById("Loading_regist").innerHTML = "<img src='images/loading19.gif' border='0'>";
		}else if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
					document.getElementById("Loading_regist").innerHTML = xmlHttp.responseText;
				}
	}
	

///////////////////////// end Ajax ////////////////////////////////////////////////////////////////////////////////////////
function SelectLanguage()
{
	document.getElementById('lang_choose').style.display = 'block'; 
	document.getElementById('lang_current').style.display = 'none';
}

function ChkRegist()
{
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var email = document.getElementById('email').value;

	if(document.getElementById('easy_id').value == "")
	{
		alert("Please insert Easy Property ID");
		document.getElementById('easy_id').focus();
		return false;
	}
	else if(document.getElementById('easy_id').value.length <= 5)
	{
		alert("Please type Easy Property ID between 6-20 characters");
		document.getElementById('easy_id').focus();
		return false;
	}
	else if(document.getElementById('easy_pwd').value == "")
	{
		alert("Please insert Password");
		document.getElementById('easy_pwd').focus();
		return false;
	}
	else if(document.getElementById('easy_pwd').value.length <= 5)
	{
		alert("Please type password between 6-20 characters");
		document.getElementById('easy_pwd').focus();
		return false;
	}
	else if(document.getElementById('re_easy_pwd').value == "")
	{
		alert("Please re-type passowrd");
		document.getElementById('re_easy_pwd').focus();
		return false;
	}
	else if(document.getElementById('easy_pwd').value != document.getElementById('re_easy_pwd').value)
	{
		alert("Password and Re-type Password is not match!");
		document.getElementById('easy_pwd').focus();
		return false;
	}
	else if(document.getElementById('easy_name').value == "")
	{
		alert("Please insert your name");
		document.getElementById('easy_name').focus();
		return false;
	}
	else if(document.getElementById('easy_fname').value == "")
	{
		alert("Please insert your family name");
		document.getElementById('easy_fname').focus();
		return false;
	}
	else if(document.getElementById('company_name').value == "")
	{
		alert("Please insert you company name");
		document.getElementById('company_name').focus();
		return false;
	}
	else if(document.getElementById('address').value == "")
	{
		alert("Please insert you address");
		document.getElementById('address').focus();
		return false;
	}
	
	else if(document.getElementById('phone').value == "")
	{
		alert("Please insert you phone number ");
		document.getElementById('phone').focus();
		return false;
	}
	
	else if(document.getElementById('email').value == "")
	{
		alert("Please insert you email");
		document.getElementById('email').focus();
		return false;
	}
	else if(reg.test(email) == false)
	{
		alert("Invalid email address!");
		document.getElementById('email').focus();
		return false;
	}

	else if(document.getElementById('security').value == "")
	{
		alert("Please type security code.");
		document.getElementById('security').focus();
		return false;
	}
	else if(document.getElementById('agree').checked == false)
	{
		alert("Please read and agree the Easy Property Terms and Conditions");
		document.getElementById('agree').focus();
		return false;
	}
	return true;
}

function changeShowCase(objGallery,objGalleryLang){
	if(objGalleryLang != 'en')
	{
	document.getElementById('showGallery').innerHTML = '<img src="../property_images/'+objGallery+'" border="0" />';
	}else{
	document.getElementById('showGallery').innerHTML = '<img src="property_images/'+objGallery+'" border="0" />';
	}
}


function chklogin()
{
	if(document.getElementById('easy_id').value == "")
	{
		alert("Please insert your Easy Property ID.");
		document.getElementById('easy_id').focus();
		return false;
	}
	else if(document.getElementById('easy_pwd').value == "")
	{
		alert("Please insert your password.");
		document.getElementById('easy_pwd').focus();
		return false;
	}
	return true;
	
}

function my_profile_pwd()
{
		document.getElementById('easy_pwd').value = '';
		document.getElementById('chgPwd').style.display = "block";
		document.getElementById('chgPwdBtn').innerHTML = '';
	
}

function ProfileChk()
{
	var regp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var emailp = document.getElementById('email').value;

	if(document.getElementById('easy_pwd').value != document.getElementById('re_easy_pwd').value)
	{
		alert("New password and Re-type password is not match.");
		document.getElementById('re_easy_pwd').focus();
		return false;
	}
	else if(document.getElementById('easy_name').value == "")
	{
		alert("Please insert your name");
		document.getElementById('easy_name').focus();
		return false;
	}
	else if(document.getElementById('easy_fname').value == "")
	{
		alert("Please insert your family name");
		document.getElementById('easy_fname').focus();
		return false;
	}
	
	else if(document.getElementById('company_name').value == "")
	{
		alert("Please insert you company name");
		document.getElementById('company_name').focus();
		return false;
	}
	else if(document.getElementById('address').value == "")
	{
		alert("Please insert you address");
		document.getElementById('address').focus();
		return false;
	}
	
	else if(document.getElementById('phone').value == "")
	{
		alert("Please insert you phone number ");
		document.getElementById('phone').focus();
		return false;
	}
	
	else if(document.getElementById('email').value == "")
	{
		alert("Please insert you email");
		document.getElementById('email').focus();
		return false;
	}
	else if(regp.test(emailp) == false)
	{
		alert("Invalid email address!");
		document.getElementById('email').focus();
		return false;
	}
	else if(document.getElementById('security').value == "")
	{
		alert("Please type security code.");
		document.getElementById('security').focus();
		return false;
	}
	return true;
}


/////////////////////////////////////////// My Property add ///////////////////////////////////////////////////////////////////
function showPrice(objPtype)
{
	if(objPtype == "rent")
	{
		document.getElementById('p_n').innerHTML = 'Price per night :';
		
		document.getElementById('p_w').style.display = "block";
		document.getElementById('p_m').style.display = "block";
		document.getElementById('p_l').style.display = "block";
		document.getElementById('p_wt').style.display = "block";
		document.getElementById('p_mt').style.display = "block";
		document.getElementById('p_lt').style.display = "block";
	}
	else if(objPtype == "sale")
	{
		document.getElementById('p_n').innerHTML = 'Property Price :';
		
		document.getElementById('p_w').style.display = "none";
		document.getElementById('p_m').style.display = "none";
		document.getElementById('p_l').style.display = "none";
		document.getElementById('p_wt').style.display = "none";
		document.getElementById('p_mt').style.display = "none";
		document.getElementById('p_lt').style.display = "none";
		
		document.getElementById('p_w').value = "";
		document.getElementById('p_m').value = "";
		document.getElementById('p_l').value = "";
		document.getElementById('p_wt').value = "";
		document.getElementById('p_mt').value = "";
		document.getElementById('p_lt').value = "";
	}
}
function showPriceEdit(objPtype, objpricenight, objpriceonly)
{
	if(objPtype == "rent")
	{
		document.getElementById('p_n').innerHTML = objpricenight+' :';
		
		document.getElementById('p_w').style.display = "block";
		document.getElementById('p_m').style.display = "block";
		document.getElementById('p_l').style.display = "block";
		document.getElementById('p_wt').style.display = "block";
		document.getElementById('p_mt').style.display = "block";
		document.getElementById('p_lt').style.display = "block";
	}
	else if(objPtype == "sale")
	{
		document.getElementById('p_n').innerHTML = objpriceonly+' :';
		
		document.getElementById('p_w').style.display = "none";
		document.getElementById('p_m').style.display = "none";
		document.getElementById('p_l').style.display = "none";
		document.getElementById('p_wt').style.display = "none";
		document.getElementById('p_mt').style.display = "none";
		document.getElementById('p_lt').style.display = "none";
		
		document.getElementById('p_w').value = "";
		document.getElementById('p_m').value = "";
		document.getElementById('p_l').value = "";
		document.getElementById('p_wt').value = "";
		document.getElementById('p_mt').value = "";
		document.getElementById('p_lt').value = "";
	}
}
function showMore(objNo,objmoreid)
{
	if(objNo >= 11)
	{
		document.getElementById(objmoreid).style.display = "block";	
		document.getElementById(objmoreid).value = '';
	}
	else
	{
		document.getElementById(objmoreid).style.display = "none";
	}
}

function chkNumber(objmore)
{
	if(isNaN(document.getElementById(objmore).value))
	{
		alert("Please type number only!");
		document.getElementById(objmore).focus();
	}
}

function  chkAdd1()
{
	if(document.getElementById('p_type').value == "")
	{
		alert("Please choose property type.");
		document.getElementById('p_type').focus();
		return false;
	}
	else if(document.getElementById('p_cate').value == "")
	{
		alert("Pleaes choose property category.");
		document.getElementById('p_cate').focus();
		return false;
	}
	else if(document.getElementById('p_name').value == "")
	{
		alert("Please choose property name.");
		document.getElementById('p_name').focus();
		return false;
	}
	else if(document.getElementById('chknamevalue').value == "")
	{
		alert("Property Name not available");
		document.getElementById('chknamevalue').focus();
		return false;
	}
	else if(document.getElementById('country').value == "")
	{
		alert("Please choose property country.");
		document.getElementById('country').focus();
		return false;
	}
	else if(document.getElementById('currency').value == "")
	{
		alert("Please choose currency.");
		document.getElementById('currency').focus();
		return false;
	}
/*	else if(document.getElementById('p_night').value == "")
	{
		alert("Please input property price.");
		document.getElementById('p_night').focus();
		return false;
	}
*/	else if(isNaN(document.getElementById('p_night').value))
	{
		alert("Please type only number for property price!");
		document.getElementById('p_night').focus();
		return false;
	}
	else if(isNaN(document.getElementById('p_week').value))
		{
			alert("Please type only number for price per week!");
			document.getElementById('p_week').focus();
			return false;
		}
	else if(isNaN(document.getElementById('p_month').value))
		{
			alert("Please type only number for price per month!");
			document.getElementById('p_month').focus();
			return false;
		}
		else if(isNaN(document.getElementById('p_long').value))
		{
			alert("Please type only number for long term price!");
			document.getElementById('p_long').focus();
			return false;
		}
	else if(document.getElementById('property_desc').value == "")
	{
		alert("Please insert property descripton.");
		document.getElementById('property_desc').focus();
		return false;
	}
	else
	{
		var list = ['p_night', 'p_week', 'p_month', 'p_long'];
		var count = 0;
		for( var i in list)
		{
			var boo = parseInt(document.getElementById(list[i]).value);
			if(boo > 0 && boo != NaN) count++;
		}
		if(count == 0)
		{
			alert("Please insert price.");
			return false;
		}
		
	}
	
	return true;
}

function chkAdd2()
{
	if(document.getElementById('photo_1').value == "")
	{
		alert("Please select your property photo.");
		document.getElementById('photo_1').focus();
		return false;
	}
	return true;
}

function open_option(objOpen)
{
	var objOpen2 = objOpen+"_chk";
	if(document.getElementById(objOpen2).checked == true)
	{
		if(objOpen2 == "sale_other_chk")
		{
			document.getElementById('sale_other_detail').disabled = false;	
		}else if(objOpen2 == "rent_other_chk")
		{
			document.getElementById('rent_other_detail').disabled = false;	
		}
		document.getElementById(objOpen).disabled = false;
	}
	else if(document.getElementById(objOpen2).checked == false)
	{
		if(objOpen2 == "sale_other_chk")
		{
			document.getElementById('sale_other_detail').value = "";
			document.getElementById('sale_other_detail').disabled = true;
		}
		else if(objOpen2 == "rent_other_chk")
		{
			document.getElementById('rent_other_detail').value = "";
			document.getElementById('rent_other_detail').disabled = true;
		}
		document.getElementById(objOpen).value = "";
		document.getElementById(objOpen).disabled = true;
	}
}

function showMap(objMap)
{
	if(objMap == "google")
	{
		document.getElementById('googlemap').style.display = "block";
		document.getElementById('map').style.display = "none";
	}
	else if(objMap == "map_picture")
	{
		document.getElementById('map').style.display = "block";
		document.getElementById('googlemap').style.display = "none";
	}
}

function confirmDel(objpropertyname,delobjlang)
{
		if(confirm(delobjlang+" "+objpropertyname+"?"))
		{
			return true;	
		}else{
			return false;
		}
}

function show_page(objPage,objcate,objtype,objlang)
{
	if(objcate==''){
		window.location.href="/property-listing-all/"+objlang+"/"+objPage+"/1/";
	}else{
		window.location.href="/property-listing/"+objcate+"-for-"+objtype+"/"+objlang+"/"+objPage+"/1/";		
	}
	/*window.location.href="/property-listing/"+objcate+"-for-"+objtype+"/"+objlang+"/"+objPage+"/1/"    .html?lang="+objlang+"&per_page="+objPage+"&cate="+objcate+"&type="+objtype;*/

}
function show_page2(objPage,objcate,objtype,objlang)
{
	window.location.href="property-search.php?lang="+objlang+"&per_page="+objPage+"&cate="+objcate+"&type="+objtype;

}
function show_page3(objPage,objcountry,objlang)
{
	window.location.href="property-top-destination.php?lang="+objlang+"&Country="+objcountry+"&per_page="+objPage+"&Page=1";

}

function chkGLat()
{
	var objglat = document.getElementById('glat').value;
	var objglat2 = objglat.replace("\(","");
	var objglat3 = objglat2.replace("\)","");
	document.getElementById('glat').value = objglat2;
}
function chkGlng()
{
	var objglng = document.getElementById('glng').value;
	var objglng2 = objglng.replace("\(","");
	var objglng3 = objglng2.replace("\)","");
	document.getElementById('glng').value = objglng3;
}

function chkCompare(searchLang)
{
	var objnum_compare = '';
	var sum_chk = eval(document.getElementById('sum_chk').value);
	for(var i = 1;i<=sum_chk;i++)
	{
		var obj_compare = "compare_"+i;
		if(document.getElementById(obj_compare).checked == true)
		{
			objnum_compare += document.getElementById(obj_compare).value;
			objnum_compare += ",";
		}
	}
	if(objnum_compare == "")
	{
		alert('No item choose');
	}else{
		//window.open('compare.php?idselect='+objnum_compare,'Compare Property','status=0,location=0,scroolbars=0,width=550,height=700');
		window.location.href='/compare.php?unitcompare='+objnum_compare;
	}
}


function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
	  theForm[z].checked = theElement.checked;
	  }
     }
    }

function chkforgot()
{
		var regf = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var emailf = document.getElementById('email').value;

	
	if(document.getElementById('easy_username').value == "")
	{
		alert("Please insert your Easy Property ID.");
		document.getElementById('easy_username').focus();
		return false;
	}
	else if(document.getElementById('email').value == "")
	{
		alert("Please insert your Email.");
		document.getElementById('email').focus();
		return false;
	}
	else if(regf.test(emailf) == false)
	{
		alert("Invalid email address!");
		document.getElementById('email').focus();
		return false;
	}
	return true;
}
/*------------------Start Tell your friend and Link exchange--------------------------*/
/*Start English*/
function openWindowLink(bid,paytype) { 
			var theURL = "link/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell(url) {
	var theURLtell = "tell-friend/index.php?url=http://www.easypropertyworld.com/index.php";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End English*/
/*Start Thai*/
function openWindowLink_th(bid,paytype) { 
			var theURL = "link-th/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_th(url) {
	var theURLtell = "tell-friend-th/index.php?url=http://www.easypropertyworld.com/index.php?lang=th";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Thai*/
/*Start German*/
function openWindowLink_de(bid,paytype) { 
			var theURL = "link-de/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_de(url) {
	var theURLtell = "tell-friend-de/index.php?url=http://www.easypropertyworld.com/index.php?lang=de";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End German*/
/*Start Danish*/
function openWindowLink_dk(bid,paytype) { 
			var theURL = "link-dk/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_dk(url) {
	var theURLtell = "tell-friend-dk/index.php?url=http://www.easypropertyworld.com/index.php?lang=dk";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Danish*/
/*Start French*/
function openWindowLink_fr(bid,paytype) { 
			var theURL = "link-fr/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_fr(url) {
	var theURLtell = "tell-friend-fr/index.php?url=http://www.easypropertyworld.com/index.php?lang=fr";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End French*/
/*Start Iranian*/
function openWindowLink_ir(bid,paytype) { 
			var theURL = "link-ir/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_ir(url) {
	var theURLtell = "tell-friend-ir/index.php?url=http://www.easypropertyworld.com/index.php?lang=ir";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Iranian*/
/*Start Italian*/
function openWindowLink_it(bid,paytype) { 
			var theURL = "link-it/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_it(url) {
	var theURLtell = "tell-friend-it/index.php?url=http://www.easypropertyworld.com/index.php?lang=it";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Italian*/
/*Start Dutch*/
function openWindowLink_nl(bid,paytype) { 
			var theURL = "link-nl/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_nl(url) {
	var theURLtell = "tell-friend-nl/index.php?url=http://www.easypropertyworld.com/index.php?lang=nl";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Dutch*/
/*Start Filipino*/
function openWindowLink_ph(bid,paytype) { 
			var theURL = "link-ph/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_ph(url) {
	var theURLtell = "tell-friend-ph/index.php?url=http://www.easypropertyworld.com/index.php?lang=ph";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Filipino*/
/*Start Russian*/
function openWindowLink_ru(bid,paytype) { 
			var theURL = "link-ru/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_ru(url) {
	var theURLtell = "tell-friend-ru/index.php?url=http://www.easypropertyworld.com/index.php?lang=ru";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Russian*/
/*Start Swedish*/
function openWindowLink_se(bid,paytype) { 
			var theURL = "link-se/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_se(url) {
	var theURLtell = "tell-friend-se/index.php?url=http://www.easypropertyworld.com/index.php?lang=se";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Swedish*/
/*Start Swedish*/
function openWindowLink_cn(bid,paytype) { 
			var theURL = "link-cn/index.php"
			popme = window.open(theURL,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
			popme.focus();
}
function openWindowTell_cn(url) {
	var theURLtell = "tell-friend-cn/index.php?url=http://www.easypropertyworld.com/index.php?lang=cn";
	popmetell = window.open(theURLtell,'paypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=680');
	popmetell.focus();
}
/*End Swedish*/
function getHost() {
	var url = window.location.href;
	return (url);
}
/*------------------End Tell your friend and Link exchange-------------------------*/

function chkPhoto(aContent)
{
	if(document.getElementById('photo').value == "")
	{
		alert(aContent);
		document.getElementById('photo').focus();
		return false;
	}
	return true;
}

function showpriceranges(bf,bn,bw,bm,blong,bless,bmore,btype)
{
		var selbox = document.search.price;
		 
		selbox.options.length = 0;
		if (btype == "") {
		selbox.options[selbox.options.length] = new Option(bf,'');
		}
		if (btype == "rent") {
		selbox.options[selbox.options.length] = new Option(bf,'');
		selbox.options[selbox.options.length] = new Option(bn+' '+bless+' 1,000','n-1000');
		selbox.options[selbox.options.length] = new Option(bn+' 1,001 - 10,000','n-10000');
		selbox.options[selbox.options.length] = new Option(bn+' 10,001 - 50,000','n-50000');
		selbox.options[selbox.options.length] = new Option(bn+' '+bmore+' 50,000','n-50001');
		selbox.options[selbox.options.length] = new Option(bw+' '+bless+' 1,000','w-1000');
		selbox.options[selbox.options.length] = new Option(bw+' 1,001 - 10,000','w-10000');
		selbox.options[selbox.options.length] = new Option(bw+' 10,001 - 50,000','w-50000');
		selbox.options[selbox.options.length] = new Option(bw+' '+bmore+' 50,000','w-50001');
		selbox.options[selbox.options.length] = new Option(bm+' '+bless+' 1,000','m-1000');
		selbox.options[selbox.options.length] = new Option(bm+' 1,001 - 10,000','m-10000');
		selbox.options[selbox.options.length] = new Option(bm+' 10,001 - 50,000','m-50000');
		selbox.options[selbox.options.length] = new Option(bm+' '+bmore+' 50,000','m-50001');
		selbox.options[selbox.options.length] = new Option(blong+' '+bless+' 1,000','l-1000');
		selbox.options[selbox.options.length] = new Option(blong+' 1,001 - 10,000','l-10000');
		selbox.options[selbox.options.length] = new Option(blong+' 10,001 - 50,000','l-50000');
		selbox.options[selbox.options.length] = new Option(blong+' '+bmore+' 50,000','l-50001');
		}
		if (btype == "sale") {
		selbox.options[selbox.options.length] = new Option(bf,'');
		selbox.options[selbox.options.length] = new Option(bless+' 500,000','500000');
		selbox.options[selbox.options.length] = new Option('500,001 - 1,000,000','1000000');
		selbox.options[selbox.options.length] = new Option('1,000,001 - 3,000,000','3000000');
		selbox.options[selbox.options.length] = new Option('3,000,001 - 5,000,000','5000000');
		selbox.options[selbox.options.length] = new Option(bmore+' 5,000,000','5000001');
		
		}
}

