function showmenu(layerID){
	var oLayer;
	oLayer = document.getElementById(layerID);
	oLayer.style.visibility = 'visible';
}

function hidemenu(layerID,layerID2,layerID3,layerID4){
	var i;
	var oLayer;
	for (i = 0; i < arguments.length;i++){
		oLayer = document.getElementById(arguments[i])
		oLayer.style.visibility = 'hidden';
	}
}


function breakout_of_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}



 
function openNewWindow(URLtoOpen, windowName, windowFeatures) 
 {
  newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
 }
		function highlight(me,istat) {
			if (istat == 1) { 
				me.style.backgroundColor = '#FFFCA2';
		} else {
			me.style.backgroundColor = '#FFFFFF';
		}
	}
  
function forceMin()
{
 myIntValue=document.resubmit.max.value;
  if (myIntValue>=1000000)
 {
  mypct=50;
 }
 else
 {
  mypct=20;
 }  
 myNewValue=(myIntValue*mypct)/100;
 myNewValue=myIntValue-myNewValue;
 document.resubmit.min.value=myNewValue
}

    
function f_open_window_max( aURL, aWinName )
    {
       
       var wOpen;
       var sOptions;
       var windowwidth;
       var availableMargin;
       var leftPosition;

       sOptions = 'status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,location=no';
       //sOptions = ''; 
       sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
       sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
       sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0'; 

       wOpen = window.open('', aWinName, sOptions );
       if (wOpen)
       {
        wOpen.location = aURL;
        wOpen.focus();
        windowwidth = screen.availWidth;
        availableMargin = Math.floor(screen.availWidth-756);
        leftPosition = Math.floor(availableMargin / 2);   
        wOpen.resizeTo( 756 , screen.availHeight );
        wOpen.moveTo( leftPosition, 0 );
       }
       return wOpen;
    }


    function openElite(code)

    {
        //alert(code);
        // Open the test popup window for popup blocking detection
        var w = f_open_window_max('/eliteproperty.asp?code='+code,'eliteprop');
        if(!w)
        {
            //w.close();
            alert('You have a Popup Blocker configured for Buyowner.com.\r\nPlease allow Popups to Buyowner.com in order to view Elite properties.\r\nThank you.');        
        }
        
        return false;
    }



