<!------- find browser type & mouseover functions

// web browser detection
//isMac = (navigator.appVersion.indexOf("Mac") != -1);
//isWin = (navigator.appVersion.indexOf("Win") != -1);
//isUnix = (!isMac && !isWin);
// mouseover check
browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion); 
if (browser_name == "Netscape" && browser_version >= 3.0) { okMouse = true; }
else if (browser_name == "Microsoft Internet Explorer" && 
  browser_version >= 3.0) { okMouse = true; }
else if (browser_version >= 4.0) { okMouse = true; }
else { okMouse = false; }
// dHTML layer check
ns4 = (document.layers)?true:false; //netscape 4 or greater
ie4 = (document.all)?true:false;  //msie 4 or greater
ns6 = (document.getElementById)?true:false; //netscape 6 or greater

okMenu = (ns4 || ns6 || ie4)?true:false; 

function preload_img(image_array,flag) { // preload images
  // image file names stored in image_array (defined above)
  // called below (or can use with BODY onLoad
  if (okMenu || okMouse) {
    for (var loop in image_array) {
      var t = eval('preload_' + flag);
      t[loop] = new Image();
      t[loop].src = image_array[loop];
    }
  }
}

function msover(img,ref) { // mouse rollover function
  // img - name of the IMG statement
  // ref - new_imgs array name 
  if (!ref) { ref = img; } 
  if (okMenu || okMouse) {
    document.images[img].src = preload_on[ref].src;
    lastimg = img;  
    lastref = base_imgs[lastimg]; 
  }
}

function msout(img,ref) { // mouse rollout function
  // img - name of the IMG statement
  // ref - new_imgs array name 
  if (!ref) { ref = img; }
  if (okMenu || okMouse) { document.images[img].src = preload_off[ref].src;}
}

//function goto_url(form,what) {
//  var myindex=form[what].selectedIndex; // where to go from select
//  var str = "toolbar=yes,scrollbars=yes,location=yes";
//  window.open(form[what].options[myindex].value,"_parent",str);
//}

function promo(date,msg,height,width,movetox,movetoy) {
  // date - last day (month day, year) to display promo
  // msg - html file with promo
  // height = height of pop-window
  // width = width of pop-window
  // movetox - move this number of pixels to the right (x axis)
  // movetoy - move this number of pixels down (y axis)
  var winopt, today, end_date;
  if (!msg) { return; }
  if (!date) { remaining = 1; }
  else { 
    today = new Date();
    end_date = new Date(date); // month day, year
    milliseconds = (24 * 60 * 60 * 1000);
    remaining = ((end_date.getTime() - today.getTime()) / milliseconds); 
  }
  if (!movetox) { movetox = 0; }
  if (!movetoy) { movetoy = 0; }
  if (remaining >= 0) {  // pop-up window
    if (!height) { height = 400; }
    if (!width) { width = 400; }  
    // note: toolbar = yes to allow printing of pop-up window
    winopt = "toolbar=no,location=no,directories=no,";
    winopt += "menubar=no,resizable=no,";
    winopt += "scrollbars=yes,width=" + width + ",height=" + height;
    newWin=window.open(msg,"msg",winopt);
    newWin.moveTo(movetox,movetoy);
    return;
  }
  else { return; }
}

function status_line(string) { // status line message with mouseover
  if (okMouse) {
     if (leader) { window.status = leader + string; }
     else { window.status = string; }
  }
}

function CloseAndExectute(myform) {  
  // send form results back to opener window 
  // (named using window.name in its head)
  myform.target = window.opener.name;
  window.close(); 
} 

function CloseAndReturn(goto_htm) {  
  // oopen link (goto_htm) in opener window 
  window.opener.location = goto_htm;  
  window.close(); 
} 

//close off comment to hide this script from old browsers----------->
