

sfHover = function() {
 var sfEls = document.getElementById("nav").getElementsByTagName("LI");
 for (var i=0; i<sfEls.length; i++) {
  sfEls[i].onmouseover=function() {
   this.className+=" sfhover";
  }
  sfEls[i].onmouseout=function() {
   this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
  }
 }
}



if (window.attachEvent) window.attachEvent("onload", sfHover);

window.name = 'mainwindow';
var popUpWin = null;
function KillPopUpWindow (){
 if (popUpWin != null && popUpWin.open) popUpWin.close();
 if (infoWin != null && infoWin.open) infoWin.close();
}
function PopUpWindow(url, imgwidth, imgheight, showcontrols){
 imgwidth += 80;
 imgheight += 100;
 if (showcontrols) {
  popUpWin = window.open('','PhotoWindow','menubar=yes,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=5,screenY=5,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable,scrollbars');
 }
 else {
  popUpWin = window.open('','PhotoWindow','menubar=no,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=5,screenY=5,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable,scrollbars');
 }
 popUpWin.location.replace(url);
}

var infoWin = null;
function InfoWindow(url){
 var width = 300;
 var height = 230;
 var x = 0 + (screen.width / 2) - (width / 2);
 var y = 0 + (screen.height / 2) - (height / 2);
 infoWin = window.open('','InfoWindow','menubar=no,status=no,titlebar=no,toolbar=no,left='+x+',top='+y+',dependent,screenX='+x+',screenY='+y+',location=no,directories=no,width='+width+',height='+height+',resizable,scrollbars');
 infoWin.location.replace(url);
}
window.onfocus = KillPopUpWindow;


function HomePopUp(Number) {
	if(Number == "ONE") {
		window.open('../feature/feature_popup.html','popup','scrollbars=1,width=350,height=500');
	} else if (Number == "TWO"){
		window.open('../feature/feature_popup_TWO.html','popup','scrollbars=1,width=350,height=500');
	} else if(Number == "THREE") {
		 window.open('../feature/feature_popup_THREE.html','popup','scrollbars=1,width=350,height=500');
	}
}



var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
html += headTags[0].innerHTML;
}

html += '\n</HEAD>\n<BODY>\n';

var printReadyElem = document.getElementById("innerbody");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BODY>\n</HTML>';

var printWin = window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("The print ready feature is only available if you are using a newer browser. Please update your browser.");
}
}


function PopUpTimelineWindow(){
url="../timeline/timeline.html";
 imgwidth = 801;
 imgheight = 601;
 //if (imgwidth>=800){imgwidth=750;}
 //if (imgheight>=600){imgheight=550;}
 //if (imgheight<425){imgheight=425;}
  popUpTimelineWin = window.open('','TimelineWindow','menubar=no,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=0,screenY=0,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable=no,scrollbars=no');
 popUpTimelineWin.location.replace("/timeline/timeline.html");
}



function PopUpSurveyWindow(){
url="http://columbia.qualtrics.com/SE/?SID=SV_0HPeF59can09C28&SVID=Prod";
 imgwidth = 700;
  imgheight = 500;
   //if (imgwidth>=800){imgwidth=750;}
    //if (imgheight>=600){imgheight=550;}
     //if (imgheight<425){imgheight=425;}
       popUpTimelineWin = window.open('','TimelineWindow','menubar=no,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=0,screenY=0,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable=yes,scrollbars=yes');
        popUpTimelineWin.location.replace("http://columbia.qualtrics.com/SE/?SID=SV_0HPeF59can09C28&SVID=Prod");
	}



function PopUpAmericanChroniclesWindow(){
url="../american_chronicles/AC.html";
 imgwidth = 999;
  imgheight = 1300;
   //if (imgwidth>=800){imgwidth=750;}
    //if (imgheight>=600){imgheight=550;}
     //if (imgheight<425){imgheight=425;}
       popUpTimelineWin = window.open('','TimelineWindow','menubar=no,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=0,screenY=0,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable=no,scrollbars=no');
        popUpTimelineWin.location.replace("/american_chronicles/AC.html");
	}


function PopUpQTVRWindow(whichView){
if(whichView == '1') {
	popupUrl = '../images/PANORAMA/Panorama2.html';
} else {
	popupUrl = "../images/PANORAMA/corner/Panorama2.html";
}
 imgwidth = 640;
   imgheight =600;
   popUpTimelineWin = window.open('','TimelineWindow','menubar=no,status=no,titlebar=no,toolbar=no,left=5,top=5,dependent,screenX=0,screenY=0,location=no,directories=no,width=' + imgwidth + ',height=' + imgheight + ',resizable=no,scrollbars=no');
   popUpTimelineWin.location.replace(popupUrl);

     
}

  
