function RunFlashfix()
{
document.write('<OBJECT CLASSID="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" CODEBASE="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH="970" HEIGHT="220" ID="map" ALIGN="middle">');
document.write('<PARAM NAME="allowScriptAccess" VALUE="sameDomain" />');
document.write('<PARAM NAME="movie" VALUE="../flash/map.swf" />');
document.write('<PARAM NAME="quality" VALUE="high" />');
document.write('<PARAM NAME="wmode" VALUE="opaque" />');
document.write('<PARAM NAME="bgcolor" VALUE="#000000" />');
document.write('<EMBED SRC="../flash/map.swf" WMODE="opaque" QUALITY="high" BGCOLOR="#000000" WIDTH="970" HEIGHT="220" NAME="map" ALIGN="middle" allowScriptAccess="sameDomain" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" />');
document.write('</OBJECT>');
}
  
  /**
   * Function used to clear a text box, providing the default text is there. This is called in the code
   * from onFocus and onClick.
   * - Clears text box if default text is there
   */
function CheckClear(element)
{
    if (document.getElementById(element).value != ""){
	    document.getElementById(element).value = "";		
	
	}	
	document.getElementById(element).value = "";	
} 

function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function 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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function showHideLayers() { //v6.0
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'display':(v=='hide')?'none':v; }
    obj.display=v; }
}
 
//function ChangeImg(imgURL)
//{
//    document.getElementById('MainImg').src = imgURL;
//}

// REQURED TO CHANGE RENT AND LET PRICE VALUES IN SEARCH

function updatePriceCombo(form, type) 
{
    if (type=="buying") 
    {
	    document.getElementById('SearchBox_divBuy').style.display = 'block';
	    document.getElementById('SearchBox_divRent').style.display = 'none';
	    
	    /*document.getElementById('_ctl0_SearchBox_divBuy').style.display = 'block';
	    document.getElementById('_ctl0_SearchBox_divRent').style.display = 'none';*/
    }
	else 
	{
	    document.getElementById('SearchBox_divBuy').style.display = 'none';
	    document.getElementById('SearchBox_divRent').style.display = 'block';
	    
	    /*document.getElementById('_ctl0_SearchBox_divBuy').style.display = 'none';
	    document.getElementById('_ctl0_SearchBox_divRent').style.display = 'block';*/
	}
}