<!--

//::: Global javascript variables ::://

var g_initColHeight; // this page's initial div column height


//::: Functions ::://

function getBrowserCss() {
         if (navigator.appName.indexOf('Internet Explorer') != -1) {
             document.write('<link href="/Css/ie.css" rel="styleSheet" type="text/css" />'); 
         }
         else {
	     document.write('<link href="/Css/mozilla.css" rel="styleSheet" type="text/css" />');
         }
}


function setPageMargin() {
         var xWidth;
         
         if (document.getElementById||(document.all && !(document.getElementById))){
             xWidth = (screen.availWidth - 780) / 2;
             document.getElementById("page").style.marginLeft = (xWidth - 18) + "px";
         }
}


function setColumnHeight() {
         var minHeight;
         var yPixels;

         var yScroll = document.body.scrollHeight;
         var yOffset = document.body.offsetHeight;

         if (yScroll > yOffset) {
             //::: all but Explorer Mac ::://
	     yPixels = document.body.scrollHeight;
         }
         else {
             // Explorer Mac;
             // would also work in Explorer 6 Strict, Mozilla and Safari

  	     yPixels = document.body.offsetHeight;
         }

         //alert(yPixels);

         //::: Minimum column height ::://
         if (yPixels - 350 < 500) {
             minHeight = 500;
         }
         else {
             //::: Nothing is that big...shrink it a bit ::://
             minHeight = yPixels - 350;
         }            
         
         if (document.getElementById||(document.all && !(document.getElementById))){
             var left = document.getElementById("midLeft");
             var right = document.getElementById("midRight");
            
             //::: See if the columns are larger than the default column value ::://
             left.style.height = minHeight + "px"; 
             right.style.height = minHeight + "px";
             
             //::: Set in the initial page height ::://
             g_initColHeight = minHeight;            

             //alert(minHeight);
         }
}


function winPop(link) {
         var xPos;
         var yPos;
         var xWin;
         var yWin;
         var remote;
      
         //::: The popup window dimensions ::://
         xWin = screen.availWidth - 200;
         yWin = screen.availHeight - 200;

         //::: Position of the window ::://
         xPos = 100;
         yPos = 100;

         remote = window.open(link,'popUp','menubar=no,scrollbars=yes,resizable=yes,width=' + xWin + ',height=' + yWin + ',left=' + xPos + ',screenX=' + xPos + ',top=' + yPos +',screenY=' + yPos);

         if (window.focus) {
             remote.focus();
         }

         if (remote.opener==null) remote.opener = window;    
}


function popupGeneric(url) {
         genericWin = window.open(url, 'popupGeneric', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=375,left=166,screenX=166,top=145,screenY=145');
         genericWin.focus();
}


function mapPop(link) {
         var xPos;
         var yPos;
         var xWin = 800;
         var yWin = 625;
         var remote;
      
         //::: The popup window dimensions ::://
         //xWin = screen.availWidth - 200;
         //yWin = screen.availHeight - 200;

         //::: Position of the window ::://
         xPos = 100;
         yPos = 100;

         remote = window.open(link,'popUp','menubar=no,scrollbars=yes,resizable=yes,width=' + xWin + ',height=' + yWin + ',left=' + xPos + ',screenX=' + xPos + ',top=' + yPos +',screenY=' + yPos);

         if (window.focus) {
             remote.focus();
         }

         if (remote.opener==null) remote.opener = window;    
}


function resetColumnHeight() {
         var mid = document.getElementById("middle");
         var left = document.getElementById("midLeft");
         var right = document.getElementById("midRight");

         right.style.height = "auto";

         //::: Check g_initColHeight...if it's too large, reset it to 500px ::://

         //if (g_initColHeight > 800) g_initColHeight = 500;

         //::: Check the offsetHeight and reset our columns ::://
              
         if (right.offsetHeight < g_initColHeight) {
             left.style.height = g_initColHeight + "px";
             right.style.height = g_initColHeight + "px";
         }
         else {
             left.style.height = right.offsetHeight + "px";
             right.style.height = right.offsetHeight + "px";
         }
}



//::: String.startsWith prototype function :::/

String.prototype.startsWith = function(str) {
       return (0 == this.indexOf(str));
}

//-->