// AGENT Pop Window Functions //
function Access(Lpage)
{
var product = navigator.appName
var browser = navigator.appVersion
var which=browser.substring(22,25)
var pwidth = (screen.availWidth - (screen.availWidth/3));
var pheight = (screen.availHeight - (screen.availHeight/3));

var PopWindow = window.open(Lpage,'PopWin','width='+pwidth+',height='+pheight+',left=150,top=10,toolbar=no,location=no,directories=no,status=1,menubar=no,scrollbars=yes,resizable=yes,');
    if((product == "Microsoft Internet Explorer") && (which >= 5)){
    PopWindow.focus()
    }
}


function AccessSmall(Lpage)
{
var product = navigator.appName
var browser = navigator.appVersion
var which=browser.substring(22,25)

var RemaxWindow = window.open(Lpage,'Remax','width=400,height=100,toolbar=0,location=0,directories=0,status=0,menubar=no,scrollbars=yes,resizable=yes,');
    if((product == "Microsoft Internet Explorer") && (which >= 5)){
    RemaxWindow.focus()
    }
}

function mlslisting(url)
{
	poplist = open(url,'mlslist','width=500,height=500,left=180,top=200,location=no,menu=no,scrollbars=yes,resizable=yes,titlebar=no,toolbar=no')
}

if(document.getElementById) { // IE 5 and up, NS 6 and up
var upLevel = true;
}
else if(document.layers) { // Netscape 4
var ns4 = true;
}
else if(document.all) { // IE 4
var ie4 = true;
}

function showObject(obj) {
if (ns4) {
	obj.visibility = "show";
	}
else if (ie4 || upLevel) {
	obj.style.visibility = "visible";
	}
}
function hideObject(obj) {
if (ns4) {
	obj.visibility = "hide";
	}
if (ie4 || upLevel) {
	obj.style.visibility = "hidden";
	}
}
function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 
