function sniffBrowsers() {
	ns4		= document.layers;
	op5		= (navigator.userAgent.indexOf("Opera 5")!=-1) || (navigator.userAgent.indexOf("Opera/5")!=-1);
	op6		= (navigator.userAgent.indexOf("Opera 6")!=-1) || (navigator.userAgent.indexOf("Opera/6")!=-1);
	agt		= navigator.userAgent.toLowerCase();
	mac		= (agt.indexOf("mac")!=-1);
	ie		= (agt.indexOf("msie") != -1);
	mac_ie	= mac && ie;
}
function getElementHeight(Elem) {
	if (ns4) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.height;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all) {
			var elem = document.all[Elem];
		}
		if (op5) {
			xPos = elem.style.pixelHeight;
		} else {
			xPos = elem.offsetHeight;
		}
		return xPos;
	}
}
function getObjNN4(obj,name) {
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++) {
		if (x[i].id == name)
			foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}
function fixMid(obj,mp) {
	var ht	= getElementHeight(obj);
	if(ht > mp) {
		var newht = (Math.ceil(ht / mp) * mp);
	}
	else {
		var newht = mp;
	}
	if(newht >= 1) {
		if(ns4) {
			var elem = getObjNN4(document, obj);
			elem.clip.height = newht+"px";
		}
		else {
			if(document.getElementById) {
				var elem = document.getElementById(obj);
			}
			else if(document.all) {
				var elem = document.all[obj];
			}
			if(op5) {
				elem.style.pixelHeight = newht+"px";
			}
			else {
				elem.style.height = newht+"px";
			}
		}
		//alert(ht+" - "+newht+" - "+getElementHeight(obj));
	}
}
function boxRotate(bcur) {
	bnex = bcur + 1;
	bele1 = document.getElementById("rbox"+bcur);
	bele2 = document.getElementById("rbox"+bnex);
	if(!bele2) {
		bnex = 1;
		bele2 = document.getElementById("rbox"+bnex);
	}
	Effect.Fade(bele1, {duration: 0.50});
	setTimeout('new Effect.Appear(bele2, {duration: 0.50})',600);
	setTimeout('boxRotate(bnex)',7700);
}

PositionX = 100;
PositionY = 100;
defaultWidth  = 1000;
defaultHeight = 1000;
var AutoClose = false;
if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}
var optNN='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=yes,width=150,height=100,left='+PositionX+',top='+PositionY;
var optNN2='scrollbars=no,width=500,height=150,left='+PositionX+',top='+PositionY;
var optIE2='scrollbars=no,width=500,height=150,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
	if (isNN){imgWin=window.open('about:blank','Sedona Lakes - Map',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	with (imgWin.document){
		writeln('<html><head><title>Loading...</title><style>body{margin:0;}</style>');writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(300,300);');
		writeln('width=300-(document.body.clientWidth-document.images[0].width);');
		writeln('height=300-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor="#000000" onload="reSizeToImage();doTitle();self.focus()">')
		else writeln('</head><body bgcolor="#000000" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
		writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
		close();		
	}
}
function popWindow(URL) {
	if(isNN) { imgWin=window.open(URL,'Sedona Lakes - Map Mailer',optNN2); }
	if(isIE) { imgWin=window.open(URL,'',optIE2); }
	if(window.focus) { imgWin.focus(); }
	return false;
}




