<!--//
function sweepDropdownsClosed(){
	sweepsubnavDropdownsClosed();
	//checkHomeFlashFeatured('visible');
  
    for (i=1;i<5;i++) {
    	str = "document.getElementById(\"menu" + i + "\").style.visibility = \"hidden\";";
		eval(str);   
    }
}
   
   function sweepsubnavDropdownsClosed() {
    
    for (i=1;i<2;i++) {
     str = "document.getElementById(\"submenu" + i + "\").style.visibility = \"hidden\";";
     eval(str);   
    }
   
        
   }   

 function offsetElementX(layerName) {
    
  if (layerName == "menu1") { seedX = 86; }
  if (layerName == "menu2") { seedX = 399; }
  if (layerName == "menu3") { seedX = 295; }
  if (layerName == "menu4") { seedX = 502; }
  
  if (navigator.appName=="Netscape") {
   windowWidth = window.innerWidth;
   windowHeight = window.innerHeight;
   }
   if (navigator.appName.indexOf("Microsoft")!=-1) {
     windowWidth = document.body.offsetWidth;
     windowHeight = document.body.offsetHeight;
   }
  
  elementY = 141;
  
  pageWidth = 732;
    
  elementX = ( ( windowWidth - pageWidth ) / 2 ) + seedX;
  
  //eval("document.getElementById(\"" + layerName + "\").moveTo(" + elementX + "," + elementY + ");");
  eval("document.getElementById(\"" + layerName + "\").style.left = " + elementX + ";");
   }
   
      function popupLayer(lay, mode) {
  
   offsetElementX(lay);
   
   sweepDropdownsClosed();
   theTimer();
   
         if (mode == "hide") {
           
     str = "document.getElementById(\"" + lay + "\").style.visibility = \"hidden\";";
     eval(str);
   
         } else {
           
     str = "document.getElementById(\"" + lay + "\").style.visibility = \"visible\";";
     eval(str);
   
         }
      }
   

   
      function popupsubMenu(lay, mode) {
  
   sweepsubnavDropdownsClosed();
           if (mode == "hide") {
             
       str = "document.getElementById(\"" + lay + "\").style.visibility = \"hidden\";";
       eval(str);
     
           } else {
             
       str = "document.getElementById(\"" + lay + "\").style.visibility = \"visible\";";
       eval(str);
     
           }
   
      }   
   
   
   var newTimer;
   
   function theTimer() {
   clearTimeout(newTimer);
   newTimer = setTimeout("sweepsubnavDropdownsClosed();sweepDropdownsClosed()",4000);
   }
   

//------------------------------------------------------------------------------------------


function WebId_Search()
{
  if (document.WebIdSearch.WebId.value == "")
  {
    alert("You need to enter Web Id")
    document.WebIdSearch.WebId.focus();
    return(false);
  }
  return true;    
}
//---------------------------------------------------------------------------------------------

function openMail(baseURL) {
 window.open(baseURL, "Contact", "width=400,height=500,left=0,top=0,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollbars=0");
}
//---------------------------------------------------------------------------------------------
function ContactInfo()
{
  var Email = '';
   URL = "+ComShare/User_Info.asp?Email="+Email+"&CompId=350&HomePath=";
    window.open(URL,"myPortFolio","width=320,height=430,resizable=yes,scrollbars=no");
}

//---------------------------------------------------------------------------------------------
function ChangeUser()
{
 URL = "+ComShare/GetEmail.asp?CompId=350&HomePath=";
 window.open(URL,"","width=400,height=220,top=250,left=250,resizable=yes");
} 
//---------------------------------------------------------------------------------------------
function Profile()
{
 if ('' == 'Y') {
    var Email = '';
    URL = "+ComShare/User_Info.asp?Email="+Email+"&CompId=350&HomePath=";
    window.open(URL,"myPortFolio","width=400,height=600,resizable=yes,scrollbars=yes");
 }
}
//----------------------------------------------------------------------------------------------


function SelectSearch()
{
  if (document.ShowListing.SearchName.selectedIndex != 0)
    document.ShowListing.submit();
}

//----------------------------------------------------------------------------------------------

function WebId_Search()
{
  if (document.WebIdSearch.WebId.value == "")
  {
    alert("You need to enter Web Id")
    document.WebIdSearch.WebId.focus;
    return(false)
  }
  return true;    
}

//----------------------------------------------------------------------------------------------

function Next_FProperty()
{
  top.window.location = "home.asp"
}
//----------------------------------------------------------------------------------------------

function ImageLoadFailed() {
 window.event.srcElement.style.display = "None";
}
//----------------------------------------------------------------------------------------------
function CheckUser()
{
  if ('' == '')
  {
    alert("Please sign in to MyPortFolio before creating alerts")
    return (false);
  }
}

//----------------------------------------------------------------------------------------------
//                Rollover Code
//----------------------------------------------------------------------------------------------

// Add Elements Here as Needed


myImages = new Array();
iCnt = 0

  
myImages[iCnt++] = "home";
myImages[iCnt++] = "property";
myImages[iCnt++] = "agents";
myImages[iCnt++] = "national";
myImages[iCnt++] = "company";
myImages[iCnt++] = "relocation";
myImages[iCnt++] = "resources";
myImages[iCnt++] = "contact";

myImages[iCnt++] = "openhouses";
myImages[iCnt++] = "searchrentals";
myImages[iCnt++] = "searchsales";
myImages[iCnt++] = "quicksearch";
myImages[iCnt++] = "joycemag";

myImages[iCnt++] = "myportfolio";
myImages[iCnt++] = "homevaluewatch";

myImages[iCnt++] = "openhousehome";
myImages[iCnt++] = "rentalshome";
myImages[iCnt++] = "saleshome";

myStates = new Array("on","off");

for (i=0;i<myImages.length;i++) {
 for (j=0;j<myStates.length;j++) {
 
  str =  myImages[i] + "_" + myStates[j] + " = new Image();";
  eval(str);
  str =  myImages[i] + "_" + myStates[j] + ".src = \'Images/top/" + myImages[i] + "_" + myStates[j] + ".gif\';";
  eval(str);
 }
}

function rollover(name,state) {
 str = "document." + name + ".src = " + name + "_" + state + ".src;";
 eval(str);
}


//-->