// JavaScript Document
function OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar) {
	if (windowName == "") windowName = "NewWindow";

	if (navigator.appName.indexOf("Microsoft")!=-1 && navigator.appVersion.indexOf("Mac")!=-1) {
		height -= 16;
		width -= 16;
	} else if (navigator.appName.indexOf("Netscape")!=-1 && navigator.appVersion.indexOf("Mac")!=-1) {
		height -= 2;
	}
	
	
	var winleft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	
	
		
	//alert(address)
	var externalWindow = window.open(address,windowName,"top=" + winUp + ",left=" + winleft + ",'toolbar=0,location=0,menubar=0,status="+status+",width="+width+",height="+height+",scrollbars="+scrolling+",resizable="+resizable+",toolbar="+toolbar+",location="+location+",menubar="+menubar);
	externalWindow.focus();
}


function Register(sType) {

	// SYNTAX: OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar)
	OpenWindow("register" + sType + ".asp",'960','330','NO','0','register','0','0','0','0');
}

function ContactUs() {
	// SYNTAX: OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar)
		OpenWindow('contact.asp','782','619','NO','NO','ContactUs','0','0','0','0');
}

function ShowEom() {
	// SYNTAX: OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar)
		OpenWindow('communitypopup.asp','782','500','NO','NO','ShowEom','0','0','0','0');
}

function ShowFloorPlan(sFloor) {
	// SYNTAX: OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar)
		OpenWindow('floorplans/default.asp?sFloor=' + sFloor,'782','500','NO','NO','sFloor','0','0','0','0');
}

function ShowPressRelease(sPressDate) {
	// SYNTAX: OpenWindow(address, width, height, resizable, scrolling, windowName, status, toolbar, location, menubar)
	OpenWindow('press/' + sPressDate +'.pdf','800','600','NO','NO','sFloor','0','0','0','0');
}


function RollOn(oImage){
	document[oImage].src = "images/" + oImage + "On.gif"
}
function RollOff(oImage){
	document[oImage].src = "images/" + oImage + "Off.gif"
}

function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}

