
// Quick function for opening auxiliary information windows

   var sub = 0;

   function tip (url, name, w, h)
   {
//	alert (sub); alert (sub.closed);
     if (sub!=0 && !sub.closed) {
//       alert ("opening in old window");
       sub.open (url, name, '');}
       {sub=window.open(url, name, 'personalbar=no,toolbar=yes,status=no,scrollbars=yes,resizable=yes,menubar=no,width='+w+',height='+h);}
     sub.focus();
   }



// Return the version number times 1000. This means that version
// 2.02 would yield 2020, and version 3.0 would yield 3000.
// We multiply because Navigator versions 2.0x convert numbers like
// 2.02 to strings like "2.0199999999875".
function _get_version() {
        return Math.round(parseFloat(navigator.appVersion) * 1000);
}

function _get_IE_version() {

           var pos = navigator.appVersion.indexOf("MSIE");
           var mystring = navigator.appVersion.substring(pos);

           return Math.round(parseFloat(mystring.substring(5,9)) * 1000);
}


function customize_style (base) {

// Setup array of verified version information

var style = new Array ();

style["MAC"] = new Array ();
style["WIN"] = new Array ();
style["UNIX"] = new Array ();
style["UNKNOWN"] = new Array ();

// if version information changes, this is the place to put it. 

style["MAC"]["Netscape"] = "ns";
style["MAC"]["MSIE"] = "ie";
style["MAC"]["Other"] = "ns";

style["WIN"]["Netscape"] = "ns";
style["WIN"]["MSIE"] = "ie";
style["WIN"]["Other"] = "ns";

style["UNIX"]["Netscape"] = "ux";
style["UNIX"]["MSIE"] = "ie";
style["UNIX"]["Other"] = "ns";

style["UNKNOWN"]["Netscape"] = "ns";
style["UNKNOWN"]["MSIE"] = "ie";
style["UNKNOWN"]["Other"] = "ns";


// Create and initialize the object we'll use to store the version information.
var browser = new Object();

if (navigator.appVersion.indexOf("Win") > 0) browser.os = "WIN";
   else if (navigator.appVersion.indexOf("Mac") > 0) browser.os = "MAC";
   else if (navigator.appVersion.indexOf("X11") > 0) browser.os = "UNIX";
   else  browser.os = "UNKNOWN";

if (navigator.appName.indexOf("Internet Explorer") > -1)
  {browser.name = "MSIE";}
  else if (navigator.appName.indexOf("Netscape") > -1)
   {browser.name = "Netscape";}
   else {browser.name = "Other";}

if (browser.name == "MSIE")
  {browser.version = _get_IE_version();}
  else {browser.version = _get_version();}


document.write ("<LINK REL=stylesheet HREF=\"" + base + style[browser.os][browser.name] + ".css\" TYPE=\"text/css\">");




}

