function showDiv(divid) {
	if (document.layers) document.layers[divid].visibility="show";
	else document.getElementById(divid).style.visibility="visible";
	document.getElementById(divid).style.display="block";
}
function hideDiv(divid) {
	if (document.layers) document.layers[divid].visibility="hide";
	else document.getElementById(divid).style.visibility="hidden";
	document.getElementById(divid).style.display="none";
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function loadUp () {
	var divLoftsMenu = document.getElementById("nav_lofts_menu");
	divLoftsMenu.onmouseout=new Function("hideDiv('nav_lofts_menu');");
	var navLofts = document.getElementById("nav_lofts");
	navLofts.onmouseover=new Function("showDiv('nav_lofts_menu');");
	navLofts.onmouseout=new Function("hideDiv('nav_lofts_menu');");
	document.getElementById("nav_lofts_floor").onmouseover=new Function("showDiv('nav_lofts_menu');");
	document.getElementById("nav_lofts_hoa").onmouseover=new Function("showDiv('nav_lofts_menu');");
	document.getElementById("nav_lofts_pricing").onmouseover=new Function("showDiv('nav_lofts_menu');");
	
	var divEmeryvilleMenu = document.getElementById("nav_emeryville_menu");
	divEmeryvilleMenu.onmouseout=new Function("hideDiv('nav_emeryville_menu');");
	var navLofts = document.getElementById("nav_emeryville");
	navLofts.onmouseover=new Function("showDiv('nav_emeryville_menu');");
	navLofts.onmouseout=new Function("hideDiv('nav_emeryville_menu');");
	document.getElementById("nav_emeryville_bmr").onmouseover=new Function("showDiv('nav_emeryville_menu');");
	document.getElementById("nav_emeryville_area").onmouseover=new Function("showDiv('nav_emeryville_menu');");
	MM_preloadImages('/img/over_gc_02.jpg','/img/over_gc_03.jpg','/img/over_gc_04.jpg','/img/over_gc_05.jpg','/img/over_gc_06.jpg');
	MM_preloadImages('/img/over_nav_lofts_09.jpg','/img/over_nav_lofts_10.jpg','/img/over_nav_lofts_11.jpg');
	MM_preloadImages('/img/over_nav_emeryville_01.jpg','/img/over_nav_emeryville_02.jpg');
	MM_preloadImages('/img/loft_nav_over_03.jpg','/img/loft_nav_over_04.jpg','/img/loft_nav_over_05.jpg','/img/loft_nav_over_06.jpg');
}

function goAlt(id){ 
 
   var table = document.getElementById(id);
   var rows = table.getElementsByTagName("tr");

   for(i = 0; i < rows.length; i++){           
     if(i % 2 == 0){ 
       rows[i].className = "trEven"; 
     }else{ 
       rows[i].className = "trOdd"; 
     }
   }
}


function loadVid () {
	var mainVid=document.getElementById("mainVid");
	mainVid.innerHTML = "<OBJECT name=\"vid\" id=\"vid\" width=\"400\" height=\"365\" CLASSID=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" type=\"application/x-oleobject\">" + "<PARAM NAME=\"URL\" VALUE=\"http://db.stellamedia.com/dunbar/?video=great_homes/video30&asf=1\">" + "<PARAM NAME=\"SendPlayStateChangeEvents\" VALUE=\"True\">" + "<PARAM NAME=\"AutoStart\" VALUE=\"true\">" + "<PARAM name=\"uiMode\" value=\"full\">" + "<PARAM name=\"volume\" value=\"100\">" + "<PARAM name=\"playcount\" value=\"100\">" + "<embed bgcolor=\"#ffffff\"" + "type=\"application/x-mplayer2\"" + "pluginspage=\"http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/\"" + "width=\"400\" height=\"345\" src=\"http://db.stellamedia.com/dunbar/?video=great_homes/video30&asf=1&file=file.asx\"" + "filename=\"http://db.stellamedia.com/dunbar/?video=great_homes/video30&asf=1&file=file.asx\" autostart=\"true\" " + "showcontrols=\"true\" showstatusbar=\"False\" volume=\"100\" playcount=\"100\"" + "showdisplay=\"False\" autorewind=\"True\" bgcolor=\"#ffffff\"> </embed>" + "</OBJECT>";
	var mainVid=document.getElementById("vid");
	vid.style.border = "5px solid black";
	mainVid.style.margintop="30px";
}

function clickIE4(){if (event.button==2){return false;}}
function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){return false;}}}
if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("return false");
