var agt=navigator.userAgent.toLowerCase(); 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
var is_nav2 = (is_nav && (is_major == 2)); 
var is_nav3 = (is_nav && (is_major == 3)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
var is_ie   = (agt.indexOf("msie") != -1); 
var is_ie4up  = (is_ie  && (is_major >= 4)); 
var is_mac    = (agt.indexOf("mac")!=-1);
 
if ((agt.indexOf("msie") != -1) && (agt.indexOf("mac") == -1)) {
 var newwindow;
}
 
function centerPopUpWin(textlink,ht,wd) {
 if ((agt.indexOf("msie") != -1) && (agt.indexOf("mac") == -1)) {
  if (newwindow != null) { newwindow.close(); }
 }
 newwindow = window.open(textlink,'popup',config='height=' + ht + ',width=' + wd + ',scrollbars=yes,toolbar=no,copyhistory=no,resizable=yes,directories=no,menubar=no,status=no,location=no');
 newwindow.moveTo( (screen.availWidth-wd)/2, (screen.availHeight-ht)/2 );
 newwindow.focus();
}

var baseDir = "";
if (document.images) {
	find_off = new Image();
	find_off.src = baseDir + "images/nav_find_home.gif";
	find_on = new Image();
	find_on.src = baseDir + "images/nav_find_home_mo.gif";

	buy_off = new Image();
	buy_off.src = baseDir + "images/nav_buying.gif";
	buy_on = new Image();
	buy_on.src = baseDir + "images/nav_buying_mo.gif";

	design_off = new Image();
	design_off.src = baseDir + "images/nav_design.gif";
	design_on = new Image();
	design_on.src = baseDir + "images/nav_design_mo.gif";

	build_off = new Image();
	build_off.src = baseDir + "images/nav_building.gif";
	build_on = new Image();
	build_on.src = baseDir + "images/nav_building_mo.gif";



}




function openwindow(url) {
msg=open(url,'contact','width=520,height=500,toolbar=no,copyhistory=no,scrollbars=yes,resizable=no,directories=no,menubar=no,status=no,location=no');
}
function signup(url) {
msg=open(url,'signup','width=475,height=700,toolbar=no,copyhistory=no,scrollbars=yes,resizable=no,directories=no,menubar=no,status=no,location=no');
}

ar1 = new doswap();


//  Function: randomNumber
//	Input:	n1, n2, n3, n4 - These are the lower and upper limit 
function randomNumber(n1, n2, n3)
{
	//Declarations
	var returnValue
	
	//With Block -- Math Object
	with (Math)
	{
		returnValue = round(n1 + ( n3 - n1 ) * random())
	}
//	alert(returnValue);
	return returnValue
}

function doswap() {
  this.imagenum = randomNumber(1, 2, 3)
}
