

function ShowFlash(targ, width, heigth)
{
	if(document.all)
	{
		var so1 = new SWFObject(targ, "mymovie", width, heigth, "6"); 
		so1.addVariable("variable", "varvalue"); 
		so1.write("divFlashContent"); 
	}
	else
	{
		var obj = document.getElementById("tdFlashContent");
		var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + heigth + '">\n';
        str += '          <param name="movie" value="images/' + targ + '" />\n';
        str += '          <param name="quality" value="high" />\n';
        str += '          <embed src="images/' + targ + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + heigth + '"></embed>\n';
        str += '        </object>';
		obj.innerHTML=str;
	}
}
function PhoneField() 
		{
			e=window.event; 
			key=e.keyCode;			
			if(!(key>47&&key<58) && !(key==46) && !(key==32)) e.keyCode=""; 
		}

function ManageHomePage()
{
	//Resizing the table
	var tblMain = document.getElementById("tblMain");
	var divSale = document.getElementById("divSale");
	var divLet = document.getElementById("divLet");
	var width = screen.availWidth;
	//alert(typeof(divSale)+" "+divLet);
	if(divSale!=null && divLet!=null)
	if(width<801)
	{
		//Populate the screen for 800 Resolution
		tblMain.width="763";
		divSale.style.width = "509px";
		divSale.style.padding = "0 0 10px 0";
		divLet.style.width = "509px";
		divSale.style.float = "none";
		divLet.style.float = "none";
		ShowFlash("completion_topAnim509.swf", "509", "156");
	}
	else if(width>800 && width<1209)
	{
		//Populate the screen for 1024 Resolution
		tblMain.width="983";
		divSale.style.width = "360px";
		divLet.style.width = "360px";
		divSale.style.float = "left";
		divLet.style.float = "right";
		ShowFlash("completion_topAnim729.swf", "729", "225");
	}
	else
	{
		//Populate the screen for more than 1024 Resolution
		tblMain.width="1209";
		divSale.style.width = "473px";
		divLet.style.width = "473px";
		divSale.style.float = "left";
		divLet.style.float = "right";
		ShowFlash("completion_topAnim955.swf", "955", "225");
	}
}

function ManagePropertyHolder()
{
	//Resizing the table
	var tblMain = document.getElementById("tblMain");
	var divProperty = document.getElementById("divProperty");
	var width = screen.availWidth;
	//alert(typeof(divSale)+" "+divLet);
	if(divProperty!=null)
	if(width<801)
	{
		//Populate the screen for 800 Resolution
		tblMain.width="763";
		divProperty.style.width = "260px";
		divProperty.style.padding = "0px";
		divProperty.style.float = "none";
	}
	else if(width>800 && width<1209)
	{
		//Populate the screen for 1024 Resolution
		tblMain.width="983";
		divProperty.style.width = "360px";
		divProperty.style.padding = "0px";
		divProperty.style.float = "none";
	}
	else
	{
		//Populate the screen for more than 1024 Resolution
		tblMain.width="1209";
		divProperty.style.width = "473px";
		divProperty.style.padding = "0px";
		divProperty.style.float = "none";
	}
}

function ManageAllPage()
{
	//Resizing the table
	var tblMain = document.getElementById("tblMain");
	var width = screen.availWidth;
	if(width<801)
	{
		//Populate the screen for 800 Resolution
		tblMain.width="763";
	}
	else if(width>800 && width<1209)
	{
		//Populate the screen for 1024 Resolution
		tblMain.width="983";
	}
	else
	{
		//Populate the screen for more than 1024 Resolution
		tblMain.width="1209";
	}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function init() {
	document.completion.name.focus();
}
function calcMortgage() {
var princ=document.mortgageform.princ.value;
var ir=document.mortgageform.ir.value;
var term=document.mortgageform.term.value;

	var mi = ir/1200;
	var termmo = term*12;
	var payment=Math.round((princ*(mi/(1-Math.pow((1+mi), -(termmo)))))*100)/100;
	if(isNaN(payment))
	payment=0;
	mortpayment.innerHTML="<p><b>Your mortgage interest payments are calculated at:<br> £ "+payment+" per month</b></p>";
}

function spawnWindow(URL,name,features)
{
window.open(URL,name,features)
}

function mortgageWin(param)
{
open("mortgage.asp?price="+param,"mortgage","left=350,top=250,width=350,height=250")
}

function remove(imgname,imgno)
{
var n=parseInt(imgno);
	if(confirm("Are you sure you want to make "+imgname+" blank"))
	{
		switch(n)
 	{
 	 case 1: document.frm.txt_thumb.value="";
 	 break;
     case 2: document.frm.txt_full.value="";
	break;
	case 3: document.frm.txt_img1.value="";
	break;
	case 4: document.frm.txt_img2.value="";
	break;
	case 5: document.frm.txt_img3.value="";
	break;
	case 6: document.frm.txt_img4.value="";
	break;
	case 7: document.frm.txt_img5.value="";
	break;
	case 8: document.frm.txt_img6.value="";
	break;
	case 9: document.frm.txt_img7.value="";
	break;
	case 10: document.frm.txt_img8.value="";
	break;
	case 11: document.frm.txt_img9.value="";
	break;
	case 12: document.frm.txt_img10.value="";
	break;
	 	}
 	}
}
function callimage(x)
{
	vfile = "upload.asp?id="+x;
	mywin=window.open(vfile, "image", "left=250,top=150,width=500, height=400, toolbar=0, scrollbars=no");
	mywin.focus();
}

function validate()
{
var enq_name=document.contact.name.value
var enq_address=document.contact.address.value
var enq_mail=document.contact.mail.value

	if(enq_name.length==0)
	{
		alert("Please fill up your name.")
		document.contact.name.focus()
		return false
	}
	else if(enq_address.length==0)
	{
		alert("please fill your address")
		document.contact.address.focus()
		return false
	}
	else if(enq_mail.length==0)
	{
		alert("Please fill up your email ID.")
		document.contact.mail.focus()
		return false
	}
	else if(enq_mail.indexOf('@')==-1||enq_mail.indexOf('.')==-1)
	{
		alert("Your email address is in invalid format.\nPlease write in a proper format eg. xyz@email.com.")
		document.contact.mail.select()
		return false
	}
	
}		
function changePrice()
{

var prices_buy=new Array("All","< £ 100 k","£ 100k - £ 150 k","£ 150 k- £ 200 k","£ 200 k- £ 250 k","£ 250 k- £ 300 k","£ 300 k - £ 350 k","£ 350 k >");
var value_buy=new Array("0","100000","150000","200000","250000","300000","350000","350001");

var prices_let=new Array("All","< £ 100 pw","£ 100 - £ 150 pw","£ 150 - £ 200 pw","£ 200 - £ 250 pw","£ 250 - £ 300 pw","£ 300 - £ 350 pw","£ 350 pw >");
var value_let=new Array("0","100","150","200","250","300","350","351");

 var buy=document.completion.buy_let[0].checked;
   
   if(buy)
   {
   for(var i=0;i<=7;i++)
   		{
    	document.completion.price[i].text=prices_buy[i];
   		document.completion.price[i].value=value_buy[i];
		}
	}
   else
  {
  for(var i=0;i<=7;i++)
  	{
    document.completion.price[i].text=prices_let[i];
  	document.completion.price[i].value=value_let[i];
	}
  } 

}

function callimage(x)
{
	vfile = "upload.asp?id="+x;
	mywin=window.open(vfile, "image", "left=250,top=150,width=500, height=400, toolbar=0, scrollbars=no");
	mywin.focus();
}
function showPic(imageName)
{
	document.images.pic.src = "upimgs/" + imageName;
}

function LTrim(str)
        
        {
                var whitespace = new String(" \t\n\r");
                var s = new String(str);

                if (whitespace.indexOf(s.charAt(0)) != -1) {
                    // We have a string with leading blank(s)...

                    var j=0, i = s.length;
                    while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
                        j++;
                    s = s.substring(j, i);
                }
                return s;
        }


function RTrim(str)
              {
                
                var whitespace = new String(" \t\n\r");
                var s = new String(str);

                if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
                    var i = s.length - 1;       // Get length of string
                 
                    while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
                        i--;
                   
                    s = s.substring(0, i+1);
                }

                return s;
        }



function Trim(str)
             {
                return RTrim(LTrim(str));
        }
		
function checkAll()
{
var val=document.frm.txtprice.value;
 var newval=parseInt(val);
// var seller=document.frm.txtID.value;
 
 var ad2=Trim(document.frm.txtaddr2.value);
 //var eml=document.frm.txtemail.value;
 var wphn=document.frm.txtworkphone.value;
 var hphn=document.frm.txthomephone.value;
 var mob=document.frm.txtmobile.value;
 var town=document.frm.txttown.value;
 
   if(val!=newval)
 {
 alert("Please enter numbers here");
 
 document.frm.txtprice.select();
 return false;
 }
 else if(ad2=="")
 {
 	alert("Please fill up address field");
	document.frm.txtaddr2.focus();
	return false;
 }
 else if(town=="")
 {
 	alert("Please fill up town field");
	document.frm.txttown.focus();
	return false;
 }
 
 /*else if(eml!="")
		{
			 if(eml.indexOf('@')==-1||eml.indexOf('.')==-1)
			{
			alert("The email address is in invalid format.\nPlease write in a proper format eg. xyz@email.com.");
			document.frm.txtemail.focus();
			return false;
			}
		}*/
	else if(wphn=="" && hphn=="" && mob=="")
	{
		alert("Please Enter either your Work Phone Number or Home Phone Number or Mobile Number");
		document.frm.txtworkphone.focus();
		return false;
	}
	else
	{
	 if (checkInternationalPhone(wphn)==false && wphn!=""){
			alert("Please Enter a Valid Work Phone Number");
			document.frm.txtworkphone.value="";
			document.frm.txtworkphone.focus();
			return false;
		}
	else if(checkInternationalPhone(hphn)==false && hphn!=""){
			alert("Please Enter a Valid Home Phone Number");
			document.frm.txthomephone.value="";
			document.frm.txthomephone.focus();
			return false;
		}
		else if(checkInternationalPhone(mob)==false && mob!=""){
			alert("Please Enter a Valid Mobile Number");
			document.frm.txtmobile.value="";
			document.frm.txtmobile.focus();
			return false;
		}
	}	
 }
function upper(args){
var x=args.value;
x=x.toUpperCase();
args.value=x;
}



// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()-, ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
//var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s));
//return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function calladd(param1)
		{
		document.frm.method = "post";
		document.frm.action = param1;
		document.frm.submit();
		}
		
function calledit(param2)
{	var s;
	var ml = document.frm;
	var len = ml.elements.length;
	total = 0;
	for (var i=0; i<len; i++)
	{	    
		var e = ml.elements[i];
		if (e.name == "sel" &&  e.checked) 
		{
			total = total + 1;
			s = e.value;
		}
	}
	if (total == 1)
	{
			if (confirm("Are you sure want to Edit this Record?"))
		{	  
			document.frm.method ="post";
			document.frm.action=param2;
			document.frm.submit();   
		}				
	}
	else
	{
		alert(" You must select atleast one Record to Edit");
	}
}

		
	function calldel(param3)
	{
		ml = document.frm;
		len = ml.elements.length;
		total = 0;
	
		for (i=0; i<len; i++)
		{	    
			e = ml.elements[i];
			if (e.name == "sel" &&  e.checked) 
			{
				total = total + 1;
				s = e.value;
			}
		}
		if ( total == 1)
		{
				if (confirm("Are you sure want to Delete this Record?"))
				{

					document.frm.method ="post";
					document.frm.action=param3+"?del=del";
					document.frm.submit();   
				}				
		}
		else
		{
			alert(" You must select One Record to Delete");
		}
	}
	
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}	

function mailForm()
{
var enq_name=Trim(document.completion.name.value)
var enq_mail=Trim(document.completion.mail.value)
var enq_tel=Trim(document.completion.telephone.value)
var enq_sub=Trim(document.completion.subject.value)
var enq_comment=Trim(document.completion.comment.value)

var flag=true
	if(enq_name.length==0)
	{
		alert("Please fill up your name.")
		document.completion.name.focus()
		flag=false
	}
	
	else if(enq_mail.length==0)
	{
		alert("Please fill up your email ID.")
		document.completion.mail.focus()
		flag=false
	}
	else if(enq_mail.indexOf('@')==-1||enq_mail.indexOf('.')==-1)
	{
		alert("Your email address is in invalid format.\nPlease write in a proper format eg. xyz@email.com.")
		document.completion.mail.select()
		flag=false
	}
	
	else if(checkInternationalPhone(enq_tel)==false && enq_tel!=""){
		alert("Please enter a valid telephone number");
		document.completion.telephone.value="";
		document.completion.telephone.select();
		flag=false;
	}
	else if(enq_sub.length==0)
	{
		alert("Please fill your subject")
		document.completion.subject.focus()
		flag=false
	}
	else if(enq_comment.length==0)
	{
		alert("Please fill your comments")
		document.completion.comment.focus()
		flag=false
	}
	if(flag)
	{
		document.completion.action="contact.asp";
		document.completion.method="post";
		document.completion.submit();
	}

}

function submitForm(param)
    {
	   enq_mail=Trim(document.completion.email.value);
	  
	    formObj = document.completion;
	   wphone=Trim(formObj.workphone.value);
		hphone=Trim(formObj.homephone.value);
		mobile=Trim(formObj.mobile.value);
		//bed=formObj.bedroom.value;
		//bed1=parseInt(bed);
		var ok=true;
		
        if (Trim(formObj.fname.value) == "")
        {
            alert("You have not filled in the name field.");
            formObj.fname.focus();
            ok=false;
        }
		else if(!specialCheck(formObj.fname.value))
		{
		 alert("Invalid entry in the name field");
 		 formObj.fname.select();
		 ok=false;
		}
		
		else if(wphone=="" && hphone=="" && mobile=="" )
    		{
		alert("Please Enter either your Work Phone Number or Home Phone Number or Mobile Number ");
		formObj.workphone.focus();
		ok=false;
		   }
		 
		else if((formObj.email.value!="")&&(enq_mail.indexOf('@')==-1||enq_mail.indexOf('.')==-1))
			{
			alert("Your email address is in invalid format.\nPlease write in a proper format eg. xyz@email.com.")
			formObj.email.select();
			ok=false;
			}
		
	else
	{
	 if (checkInternationalPhone(wphone)==false && wphone!=""){
			alert("Please Enter a Valid Work Phone Number");
			formObj.workphone.value="";
			formObj.workphone.focus();
			ok=false;
		}
	else if(checkInternationalPhone(hphone)==false && hphone!=""){
			alert("Please Enter a Valid Home Phone Number");
			formObj.homephone.value="";
			formObj.homephone.focus();
			ok=false;
		}
		else if(checkInternationalPhone(mobile)==false && mobile!=""){
			alert("Please Enter a Valid Mobile Phone Number");
			formObj.mobile.value="";
			formObj.mobile.focus();
			ok=false;
		}
		
	}

 	if(ok)
 	{
 		document.completion.action=param;
		document.completion.method="post";
		document.completion.submit();
	}
		
	
 /*   if(bed!="" && bed!=bed1)
	{
	alert("Please enter numbers here only");
	formObj.bedroom.select();
	return false;
	}
	else if(bed1<0)
	{
	alert("Invalid entry.No negative numbers allowed");
	formObj.bedroom.select();
	return false;
	}*/	
}


function specialCheck(xField)
{
var i, check;
	check = true;
	i = xField.length;
	
	for( j =0;j<=i;j++ )
	{
		pos = xField.charAt(j);
		if ( pos == "~" || pos == "'" || pos == "!" || pos == "$" )
		{
		check = false;
		}
		else if ( pos == "@" || pos == "#" || pos == "%" || pos == "^")
		{
		check = false;
		}
		else if ( pos == "*" || pos == "{" || pos == "}" || pos == ";")
		{
		check = false;
		}
		else if ( pos == ":" ||  pos == "|" || pos == "<")
		{
		check = false;
		}
		else if ( pos == "1" || pos == "2" || pos == "3" || pos == "4")
		{
		check = false;
		}
		else if ( pos == "5" ||  pos == "6" || pos == "7")
		{
		check = false;
		}
		else if ( pos == "8" ||  pos == "9" || pos == "0")
		{
		check = false;
		}
	}
return check;		
}	

function compValid() {

var Name=Trim(document.comp_form.Name.value);
var Email=Trim(document.comp_form.Email.value);
var Tel=Trim(document.comp_form.Telephone.value);
var ok=true;

 if(Name.length==0)
 {
 alert("Please fill up your name.");
 document.comp_form.Name.focus();
 ok=false;
 }
 else if(Email.length==0)
 {
 alert("Please fill up your Email Id.");
 document.comp_form.Email.focus();
 ok=false;
 }
 else if(Email.indexOf('@')==-1||Email.indexOf('.')==-1)
 {
 alert("Your email address is in invalid format.\nPlease write in a proper format eg. myname@email.com.");
 document.comp_form.Email.value="";
document.comp_form.Email.select();
 ok=false;
 }
	else if(Tel.length==0)
	{
		alert("Please fill your phone number");
		document.comp_form.Telephone.focus();
		ok=false;
	}
	else if(checkInternationalPhone(Tel)==false && Tel!=""){
		alert("Please enter a valid telephone number");
		document.comp_form.Telephone.value="";
		document.comp_form.Telephone.select();
		ok=false;
	
	}
return ok;
}


function validate()
{
var enq_name=Trim(document.completion.name.value);
var enq_mail=Trim(document.completion.mail.value);
var phone=Trim(document.completion.phone.value);
var ok=true;

	if(enq_name.length==0)
	{
		alert("Please fill up your name.");
		document.completion.name.focus();
		 ok=false;
	}
	else if(!specialCheck(enq_name))
		{
		 alert("Invalid entry in the name field");
 		 document.completion.name.select();
		 ok=false;
		}
	else if(enq_mail.length==0)
	 {
	 alert("Please fill up your Email Id.");
	 document.completion.mail.focus();
	 ok=false;
	 }
	 else if(enq_mail.indexOf('@')==-1||enq_mail.indexOf('.')==-1)
	 {
	 alert("Your email address is in invalid format.\nPlease write in a proper format eg. myname@email.com.");
	document.completion.mail.select();
	 ok=false;
	 }
	else if(phone.length==0)
	{
		alert("Please fill your phone number");
		document.completion.phone.focus();
		ok=false;
	}
	else if(checkInternationalPhone(phone)==false && phone!=""){
		alert("Please enter a valid telephone number");
		document.completion.phone.value="";
		document.completion.phone.focus();
		ok=false;
	}
	else
		ok=true;
return ok;
}

function checkForm(urlname)
{
  if(validate())
  {
   document.completion.action=urlname;
   document.completion.method="post";
   document.completion.submit();
  }
}

function showLayer(layername) {
	for(var n=1;n<16;n++){
		MM_showHideLayers(layername,'','show');
		MM_showHideLayers('layer'+n,'','hide');
		}
	}
	
	function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}

function checkPass()
{
var pass=document.frm.pass.value;
var passnew1=document.frm.passnew1.value;
var passnew2=document.frm.passnew2.value;

if(Trim(pass)=="")
{
	alert("Please enter your old password");
	document.frm.pass.focus();
	return false;
}
else if(Trim(passnew1)=="")
{
	alert("Please enter your new password");
	document.frm.passnew1.focus();
	return false;
}
else if(Trim(passnew1).length<5)
 {
 alert("Your password should be minimum five character");
  document.frm.passnew1.select();
  return false;
 }
 else if(!checkSpaces(Trim(passnew1)))
 {
 alert("The password should not contain any spaces.Please re-enter the new password");
  document.frm.passnew1.select();
  return false;
 }
 
 else if(passnew1!=passnew2)
 {
 alert("Your password did not match.Please retype.");
 document.frm.passnew2.select();
 return false;
 }
 else
 {
	return true;
 }
}

function checkSpaces(str)
{

var l=str.length;
var found=false;
 	for(var i=0;i<l;i++)
 	{
  	if(str.charAt(i)==" ")
  		{
   		found=false;
   		break;
  		}
  else 
  		found=true;
 	}
 return found;
}



// New Added By Sanjoy - 23-07-2009

function Check_pcm_pw(param)
{
	//alert(param);
	if(param=="none")
	{
		//document.getElementById("pwd_pm_M").checked = true;
		document.getElementById("PriceLowBuy").style.display = "block";
		document.getElementById("PriceLowRentWeek").style.display = "none";
		document.getElementById("PriceLowRentMonth").style.display = "none";
		
		document.getElementById("PriceHighBuy").style.display = "block";
		document.getElementById("PriceHighRentWeek").style.display = "none";
		document.getElementById("PriceHighRentMonth").style.display = "none";	
		
	}
	else
	{
		//document.getElementById("pwd_pm_M").checked = true;
		document.getElementById("PriceLowBuy").style.display = "none";
		document.getElementById("PriceLowRentWeek").style.display = "none";
		document.getElementById("PriceLowRentMonth").style.display = "block";
		
		document.getElementById("PriceHighBuy").style.display = "none";
		document.getElementById("PriceHighRentWeek").style.display = "none";
		document.getElementById("PriceHighRentMonth").style.display = "block";	
	}
	document.getElementById("tab_pcm_pw").style.display = param;
	forMapPageCotent(param);
}

function forMapPageCotent(param)
{    
    var fileName = UrlFile();
    if(fileName=="map")
    {
    // ctl00_ContentPlaceHolder1_
        var active = document.getElementById("ctl00_ContentPlaceHolder1_hdChange").value;
        if(active=="1")
        {
             if(param=="none")
             {      
                document.getElementById("ctl00_ContentPlaceHolder1_FlashBuy").style.display="block";   
                document.getElementById("ctl00_ContentPlaceHolder1_FlashRent").style.display="none";
             }
             else
             {
                document.getElementById("ctl00_ContentPlaceHolder1_FlashRent").style.display="block"; 
                document.getElementById("ctl00_ContentPlaceHolder1_FlashBuy").style.display="none";                               
             }
             var himg = document.getElementById("ctl00_ContentPlaceHolder1_imgMap").style.backgroundImage;            
             var hcon = document.getElementById("ctl00_ContentPlaceHolder1_lblContents").innerHTML;
            // alert(himg);
             document.getElementById("ctl00_ContentPlaceHolder1_imgMap").style.backgroundImage = document.getElementById("ctl00_ContentPlaceHolder1_hdimage").value;
             document.getElementById("ctl00_ContentPlaceHolder1_lblContents").innerHTML = document.getElementById("ctl00_ContentPlaceHolder1_hdcontent").value;
             document.getElementById("ctl00_ContentPlaceHolder1_hdimage").value = himg;
             document.getElementById("ctl00_ContentPlaceHolder1_hdcontent").value=hcon;
        }
        else
        {
           // alert();
            document.getElementById("ctl00_ContentPlaceHolder1_hdChange").value="1";
        }
    }
}

function CheckMonhtWeek(param)
{
   // alert(param);
	if(param=="M")
	{
		document.getElementById("PriceLowRentWeek").style.display = "none";
		document.getElementById("PriceLowRentMonth").style.display = "block";
		
		document.getElementById("PriceHighRentWeek").style.display = "none";
		document.getElementById("PriceHighRentMonth").style.display = "block";	
	}
	else
	{
		document.getElementById("PriceLowRentWeek").style.display = "block";
		document.getElementById("PriceLowRentMonth").style.display = "none";
		
		document.getElementById("PriceHighRentWeek").style.display = "block";
		document.getElementById("PriceHighRentMonth").style.display = "none";	
	}
}


function price_field()
{	e=window.event;
	key=e.keyCode;
	if(!((key>47&&key<58)||key==46)) e.keyCode="";
}

function number_field()
{	e=window.event;
	key=e.keyCode;
	if(!(key>47&&key<58)) e.keyCode="";
}

function phone_field()
{	e=window.event;
	key=e.keyCode;
	if(!((key>47&&key<58)||key==43)) e.keyCode="";
}

function name_field()
{	e=window.event;
	key=e.keyCode;
	if(!((key>64&&key<91)||(key>96&&key<123)||key==32)) e.keyCode="";
}
function name_field1()
{	e=window.event;
	key=e.keyCode;
	if(!((key>64&&key<91)||(key>96&&key<123))) e.keyCode="";
}
function email_field()
{	e=window.event;
	key=e.keyCode;
	if(!((key>64&&key<91)||(key>96&&key<123)||(key>47&&key<58)||key==64||key==46)) e.keyCode="";
}