function openPictureWindow(pictName, pictWidth, pictHeight) {
timeout=0;
var winl = (screen.width - pictWidth) / 2;
var wint = (screen.height - pictHeight) / 2;

//windowprops = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,screenX=10,screenY=10,left=10,top=10,width=" + pictWidth + ",height=" + pictHeight;
windowprops = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,screenX=10,screenY=10,left="+winl+",top="+wint+",width=" + pictWidth + ",height=" + pictHeight;

text = "<html><head><title>Mission Peak</title></head><body bgcolor='white' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'>";

text += "<table border='0' cellspacing='0' cellpadding='0' width='" + pictWidth + "'><tr><td><a href='javascript:window.close();'><img src='http://www.missionpeakco.com/webimages/floorplan/" + pictName + "' border='0' width='" + pictWidth +"' height='" + pictHeight +"'></a>";

text += "</td></tr></table></body></html>";

preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}


function openElevationWindow(pictName, pictWidth, pictHeight) {
timeout=0;
var winl = (screen.width - pictWidth) / 2;
var wint = (screen.height - pictHeight) / 2;

//windowprops = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,screenX=10,screenY=10,left=10,top=10,width=" + pictWidth + ",height=" + pictHeight;
windowprops = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,screenX=10,screenY=10,left="+winl+",top="+wint+",width=" + pictWidth + ",height=" + pictHeight;

text = "<html><head><title>Mission Peak</title></head><body bgcolor='white' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'>";

text += "<table border='0' cellspacing='0' cellpadding='0' width='" + pictWidth + "'><tr><td><a href='javascript:window.close();'><img src='http://www.missionpeakco.com/webimages/elevation/" + pictName + "' border='0' width='" + pictWidth +"' height='" + pictHeight +"'></a>";

text += "</td></tr></table></body></html>";

preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}

