<!--
// set browser detection variable is_4 to true or false
// use this variable to prevent non 4.0 browser errors for dropdowns

var is_4 = false;
var check_major = parseInt(navigator.appVersion);
if (check_major >= 4){is_4 = true;}


var agt = navigator.userAgent.toLowerCase();

//CHECK FOR OS
var is_mac = (agt.indexOf("mac")!=-1);
var is_pc = ((agt.indexOf("win")!=-1) || (agt.indexOf("winnt")!=-1) || (agt.indexOf("windows")!=-1));

//CHECK FOR BROWSER

//NETSCAPE CHECKS
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('compatible') == -1));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_nav5up = (is_nav && (is_major >= 5));
var is_nav6 = ((agt.indexOf('netscape6')!=-1) || (agt.indexOf('netscape/6')!=-1));
var is_nav7 = ((agt.indexOf('netscape7')!=-1) || (agt.indexOf('netscape/7')!=-1));

//IE CHECKS
var is_ie = (agt.indexOf("msie") != -1); 
var is_ie4 = (is_ie && (is_major == 4));
// EVALUATES OS & BROWSER THEN SETS VARIABLES FOR STYLE SHEET FONT SIZES
if (is_pc) {
   if (is_nav4 || is_nav4up && !is_ie) {
       strSmFontSize = 10;
       formtextfieldFontSize = 10;	   
       strFontSize = 12;
       strLgFontSize = 13;
   } else if (is_ie) {
       strSmFontSize = 10;
       formtextfieldFontSize = 11;		   
       strFontSize = 11;
       strLgFontSize = 13;
   } else {
       strSmFontSize = 10;
	   formtextfieldFontSize = 10;   
       strFontSize = 11;
       strLgFontSize = 13;
   }
} else if (is_mac) {
   if (is_nav4 || is_nav4up && !is_ie) {
       strSmFontSize = 10;
	   formtextfieldFontSize = 10;
       strFontSize = 11;
       strLgFontSize = 13;
   } else if (is_ie) {
       strSmFontSize = 10;
	   formtextfieldFontSize = 10;
       strFontSize = 11;
       strLgFontSize = 13;
   } else {
       strSmFontSize = 10;
	   formtextfieldFontSize = 10;
       strFontSize = 11;
       strLgFontSize = 13;
   }
} else {
   strSmFontSize = 10;
   formtextfieldFontSize = 10;
   strFontSize = 11;
   strLgFontSize = 13;
} 


//WRITE OUT CASCADING STYLE SHEETS

if (is_major >= 4) {
document.write(
'<style type="text/css">\n' +
'form {font-size: ' + formtextfieldFontSize +'px;}\n'+
'form.tb {font-size: ' + formtextfieldFontSize +'px;}\n'+
'a.menuhead:link,a.menuhead:hover,a.menuhead:active,a.menuhead:visited {font-size: '+strFontSize +'px;}\n'+
'a.menulink:link,a.menulink:hover,a.menulink:active,a.menulink:visited {font-size: '+strFontSize +'px;}\n'+
'.date {font-size: '+strSmFontSize +'px;}\n'+
'.grayBreadCrumb {font-size: '+ strFontSize +'px;}\n'+
'.footerLink {font-size: ' + strSmFontSize +'px;}\n'+
'.footerTextGray { font-size: ' + strSmFontSize +'px;}\n'+
'.footerText {font-size: ' + strSmFontSize +'px;}\n'+
'input {font-size: ' + formtextfieldFontSize +'px;}\n'+
'select { font-size: ' + formtextfieldFontSize +'px;}\n'+
'textarea { font-size: ' + formtextfieldFontSize +'px;}\n'+
'.controlForm {font-size: ' + formtextfieldFontSize +'px;}\n'+
'</style>\n');
}

// Global rollover image functions


if (document.images) {
  image1on = new Image();
  image1on.src = "/assets/images/top_nav/heath_system_home_onT.gif";
  
  image1off = new Image();
  image1off.src = "/assets/images/top_nav/heath_system_home_offT.gif";

  image2on = new Image();
  image2on.src = "/assets/images/top_nav/site_index_onT.gif";
  
  image2off = new Image();
  image2off.src = "/assets/images/top_nav/site_index_offT.gif";

  image2bon = new Image();
  image2bon.src = "/assets/images/top_nav/search_for_onT.gif";

  image2boff = new Image();
  image2boff.src = "/assets/images/top_nav/search_for_offT.gif";
  
  image3on = new Image();
  image3on.src = "/assets/images/top_nav/go_on.gif";
  
  image3off = new Image();
  image3off.src = "/assets/images/top_nav/go_off.gif";

  image4on = new Image();
  image4on.src = "/assets/images/top_nav/uva_home_on.gif";
  
  image4off = new Image();
  image4off.src = "/assets/images/top_nav/uva_home_off.gif";

  image5on = new Image();
  image5on.src = "/assets/images/top_nav/news_pubs_on.gif";
  
  image5off = new Image();
  image5off.src = "/assets/images/top_nav/news_pubs_off.gif";

  image6on = new Image();
  image6on.src = "/assets/images/top_nav/maps_directions_on.gif";
  
  image6off = new Image();
  image6off.src = "/assets/images/top_nav/maps_directions_off.gif";

  image7on = new Image();
  image7on.src = "/assets/images/top_nav/jobs_on.gif";
  
  image7off = new Image();
  image7off.src = "/assets/images/top_nav/jobs_off.gif";

  image8on = new Image();
  image8on.src = "/assets/images/top_nav/library_on.gif";
  
  image8off = new Image();
  image8off.src = "/assets/images/top_nav/library_off.gif";

  image9on = new Image();
  image9on.src = "/assets/images/top_nav/gift_on.gif";
  
  image9off = new Image();
  image9off.src = "/assets/images/top_nav/gift_off.gif";

}
 
function turnOn(imageName) {
  if (document.images) {
    document[imageName].src =
      eval(imageName + 'on.src');
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src =
      eval(imageName + 'off.src');
  }
}


  // this function for opening the site-guide menu
function hspopwin(){
   theIndex=window.open('http://www.hsc.virginia.edu/home/site-guide.html','_sitewin','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=300,height=450');
}

 // this function for popups as needed
function popit(heading,body_text,winheight)
{

var newW;
newW = window.open("", "newW", "resizable=yes,width=400,height="+winheight);
newW.document.writeln('<html><head><title>information</title><link rel="STYLESHEET" href="http://www.hsc.virginia.edu/assets/ssi/css/hsc_global.css" type="text/css"></head><body bgcolor="#FFFFFF" onBlur="timer=setTimeout(\'window.close()\',300)" ><div align="center"><h3 align="center">'+heading+'</h3></div>'+body_text+'<p align="center"><font size="2"><a href="javascript: self.close();">close this window</a></font></p></body></html>');
newW.document.close();
newW.focus();

}

// this is for the js date on internet templates
var months = new Array("",
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
);

var today = new Date(); // today
var mon = months[today.getMonth() + 1]; // month
var day = today.getDate(); // day
var year = y2k(today.getYear()); // year

function dateMsg() {

return(mon + " " + day + ", " + year); // returns default
}

// Y2K Fix Function
function y2k(year) {
if (year < 2000)
year = year + 1900;
return year;
}


// this function to be used for universal onload events
function whenload(){}
//-->