//  popup script

function openWindow(url, name) {

  var l = openWindow.arguments.length;

  var w = "";

  var h = "";

  var features = "";



  for (i=2; i<l; i++) {

    var param = openWindow.arguments[i];

    if ( (parseInt(param) == 0) ||

      (isNaN(parseInt(param))) ) {

      features += param + ',';

    } else {

      (w == "") ? w = "width=" + param + "," :

       h = "height=" + param;

    }

  }



  features += w + h;

  var code = "popupWin = window.open(url, name";

  if (l > 2) code += ", '" + features;

  code += "')";

  eval(code);

  }

//  end popup script

  

  

  

//  bs: css and browser check

bName = navigator.appName;

if (bName == "Microsoft Internet Explorer" ) ver = "IE";

else if (bName == "Netscape") ver = "NS";

if (ver == "IE") {document.write('<style>.bg {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; background-color: #FFFFCC; background-image: url(/gilderlehrman/images/big_bg.jpg);}</style>')}

if (ver == "NS") {document.write('<style>.bg {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; background-color: #FFFFCC;}</style>')}

// end css and browser check





// drop down menu

function gotosite(site) {            

        if (site != "") {                    

                self.location=site; 

        }

}



//javascript browser/OS sniffer/print



MSIE    = (navigator.appName.indexOf('Microsoft Internet Explorer')!=-1); 

 Opera   = (navigator.userAgent.indexOf('Opera')!=-1); 

 Nav     = ((navigator.appName.indexOf('Netscape')!=-1) && (!Opera)); 

 Nav4    = (document.layers); 

 MSIE4   = (document.all); 

 Win     = (navigator.userAgent.indexOf("Win")!=-1); 

 Mac     = (navigator.userAgent.indexOf("mac")!=-1)  || (navigator.userAgent.indexOf("Mac")!=-1); 

 OS2     = (navigator.userAgent.indexOf("os/2")!=-1) || (navigator.userAgent.indexOf("OS/2")!=-1); 

 Linux   = (navigator.userAgent.indexOf("inux")!=-1); 

 Other   = (!Win && !Mac && !OS2 && !Linux); 

 version = parseFloat(navigator.appVersion) 



/*MSIE5*/ if (MSIE4) { 

            x = navigator.userAgent.lastIndexOf("MSIE"); 

           version = parseFloat(navigator.userAgent.substring(x+5,x+10)); } 

 /*Opera*/ if ((Opera) && (navigator.userAgent.lastIndexOf(") ")!=-1)) { 

            x = navigator.userAgent.lastIndexOf(") "); 

           version = parseFloat(navigator.userAgent.substring(x+2,x+10)); } 

        if ((Opera) && (version==0)) { 

            x = navigator.userAgent.lastIndexOf("Opera"); 

           version = parseFloat(navigator.userAgent.substring(x+6,x+12)); } 

 /*MSIE3*/ if ((MSIE) && (version == 2)) { version = 3.0 } 



 if (Nav)   { CSS = Nav4;           goodCSS = (version>4.99); CSSP = CSS;            } 

 if (MSIE)  { CSS = (version>2.99); goodCSS = (version>3.99); CSSP = goodCSS;        } 

 if (Opera) { CSS = (version>3.49); goodCSS = CSS;            CSSP = (version>3.99); } 





function print_onclick() { 

if (Win) 

{ 

 if (window.print) 

 { 

   if (document.layers && parent.focus) parent.focus() 

   window.print(); 

   if (document.layers && window.focus) window.focus("printen"); 

 } 

 else if (document.all) 

   { 

   WebBrowser1.ExecWB(6, 2);

   } 

 else 

   alert("Your Browser does not support this feature.\nPlease use the print button on your browser.") 

} 

else if (Mac && MSIE) 

 alert("Please press APPLE + P to print this page.") 

else 

  alert("Your Browser does not support this feature.\nPlease use the print button on your browser.") 

} 


// document.write('<a name=\"top\">');

