
var available_height;
var varSize;


var isNav4;
var isIE4;
var available_width;

	if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
		 isNav4	= (navigator.appName == "Netscape") ? true : false;
		 isIE4 	= (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
	}

	function preLoad() 
	{
     	     if(isNav4) {
          	available_width  = innerWidth;
          	available_height = innerHeight;
	     } else  if(isIE4) {
		available_width  = document.body.clientWidth;
		available_height = document.body.clientHeight;}  

	if (available_width > 800)
		{parent.document.location.href="Index1024.html";
		}
		else
		{parent.document.location.href="Index800.html";
		}
	}

function showmenu(opt)
{
	if (parseInt(navigator.appVersion.charAt(0)) >= 4) 
        {
		 isNav4	 	= (navigator.appName == "Netscape") ? true : false;
		 isIE4 		= (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
	}
 	if(isNav4) 
        {	    
            available_width	= innerWidth;
            available_height	= innerHeight;
        } 
	if(isIE4) 
        {
            available_width	= document.body.clientWidth;
            available_height	= document.body.clientHeight;
        }
        if (available_width > 800)
        {
           varSize = 2;         
        } 
        else
        {
           varSize = 1; 
        }
    switch(varSize)
       {
       case 1:
         switch(opt)
         {
           case 1:
             parent.document.location.href="WildwoodRealtors.asp?ppg=20&psz=1";
             break;
           case 2:
             parent.document.location.href="WildwoodRealtors.asp?ppg=2&psz=1";
             break;
           case 3:
             parent.document.location.href="WildwoodRealtors.asp?ppg=3&psz=1";
             break;
           case 4:
             parent.document.location.href="WildwoodRealtors.asp?ppg=4&psz=1";
             break;
           case 5:
             parent.document.location.href="WildwoodRealtors.asp?ppg=5&psz=1";
             break;
           case 6:
             parent.document.location.href="WildwoodRealtors.asp?ppg=6&psz=1";
             break;
           case 7:
             parent.document.location.href="WildwoodRealtors.asp?ppg=7&psz=1";
             break;
           case 8:
             parent.document.location.href="WildwoodRealtors.asp?ppg=8&psz=1";
             break;
         }
         break;

       case 2:
         switch(opt)
         {
           case 1:             
             parent.document.location.href="WildwoodRealtors.asp?ppg=20&psz=2";
             break;
           case 2:
             parent.document.location.href="WildwoodRealtors.asp?ppg=2&psz=2";
             break;
           case 3:
             parent.document.location.href="WildwoodRealtors.asp?ppg=3&psz=2";
             break;
           case 4:
             parent.document.location.href="WildwoodRealtors.asp?ppg=4&psz=2";
             break;
           case 5:
             parent.document.location.href="WildwoodRealtors.asp?ppg=5&psz=2";
             break;
           case 6:
             parent.document.location.href="WildwoodRealtors.asp?ppg=6&psz=2";
             break;
           case 7:             
             parent.document.location.href="WildwoodRealtors.asp?ppg=7&psz=2";
             break;
           case 8:
             parent.document.location.href="WildwoodRealtors.asp?ppg=8&psz=2";
             break;
         }
         break;
       }


}

function openLinks( pageToLoad, winName, width, height, center) {

    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
      //  xposition = (screen.width - width) / 2;
     //   yposition = (screen.height - height) / 2;    }

     	xposition = 0;
      	yposition = 0;    }

    args = "width=" + width + ","     + "height=" + height + "," 
 //   args = "width=" + width + ","     + "height=" + height + "," 
    + "location=1,"     + "menubar=1,"    + "resizable=0,"    + "scrollbars=1,"
    + "status=1,"     + "titlebar=1,"    + "toolbar=1,"    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only
    window.open( pageToLoad,winName,args );}
