

if(document.images) {

//head nav

hed_nav1 = new Image()
hed_nav1.src = "/images/hed_nav1.gif"
hed_nav1_o = new Image()
hed_nav1_o.src = "/images/hed_nav1_o.gif"
hed_nav2 = new Image()
hed_nav2.src = "/images/hed_nav2.gif"
hed_nav2_o = new Image()
hed_nav2_o.src = "/images/hed_nav2_o.gif"
hed_nav3 = new Image()
hed_nav3.src = "/images/hed_nav3.gif"
hed_nav3_o = new Image()
hed_nav3_o.src = "/images/hed_nav3_o.gif"
hed_nav4 = new Image()
hed_nav4.src = "/images/hed_nav4.gif"
hed_nav4_o = new Image()
hed_nav4_o.src = "/images/hed_nav4_o.gif"


//home nav

nav_hm_academic = new Image()
nav_hm_academic.src = "/images/nav_hm_academic.gif"
nav_hm_academic_o = new Image()
nav_hm_academic_o.src = "/images/nav_hm_academic_o.gif"
nav_hm_diversity = new Image()
nav_hm_diversity.src = "/images/nav_hm_diversity.gif"
nav_hm_diversity_o = new Image()
nav_hm_diversity_o.src = "/images/nav_hm_diversity_o.gif"
nav_hm_event = new Image()
nav_hm_event.src = "/images/nav_hm_event.gif"
nav_hm_event_o = new Image()
nav_hm_event_o.src = "/images/nav_hm_event_o.gif"
nav_hm_exploring = new Image()
nav_hm_exploring.src = "/images/nav_hm_exploring.gif"
nav_hm_exploring_o = new Image()
nav_hm_exploring_o.src = "/images/nav_hm_exploring_o.gif"
nav_hm_faculty = new Image()
nav_hm_faculty.src = "/images/nav_hm_faculty.gif"
nav_hm_faculty_o = new Image()
nav_hm_faculty_o.src = "/images/nav_hm_faculty_o.gif"
nav_hm_news = new Image()
nav_hm_news.src = "/images/nav_hm_news.gif"
nav_hm_news_o = new Image()
nav_hm_news_o.src = "/images/nav_hm_news_o.gif"
nav_hm_research = new Image()
nav_hm_research.src = "/images/nav_hm_research.gif"
nav_hm_research_o = new Image()
nav_hm_research_o.src = "/images/nav_hm_research_o.gif"
nav_hm_student = new Image()
nav_hm_student.src = "/images/nav_hm_student.gif"
nav_hm_student_o = new Image()
nav_hm_student_o.src = "/images/nav_hm_student_o.gif"


//main nav

nav_academic = new Image()
nav_academic.src = "/images/nav_academic.gif"
nav_academic_o = new Image()
nav_academic_o.src = "/images/nav_academic_o.gif"
nav_diversity = new Image()
nav_diversity.src = "/images/nav_diversity.gif"
nav_diversity_o = new Image()
nav_diversity_o.src = "/images/nav_diversity_o.gif"
nav_event = new Image()
nav_event.src = "/images/nav_event.gif"
nav_event_o = new Image()
nav_event_o.src = "/images/nav_event_o.gif"
nav_exploring = new Image()
nav_exploring.src = "/images/nav_exploring.gif"
nav_exploring_o = new Image()
nav_exploring_o.src = "/images/nav_exploring_o.gif"
nav_faculty = new Image()
nav_faculty.src = "/images/nav_faculty.gif"
nav_faculty_o = new Image()
nav_faculty_o.src = "/images/nav_faculty_o.gif"
nav_news = new Image()
nav_news.src = "/images/nav_news.gif"
nav_news_o = new Image()
nav_news_o.src = "/images/nav_news_o.gif"
nav_research = new Image()
nav_research.src = "/images/nav_research.gif"
nav_research_o = new Image()
nav_research_o.src = "/images/nav_research_o.gif"
nav_student = new Image()
nav_student.src = "/images/nav_student.gif"
nav_student_o = new Image()
nav_student_o.src = "/images/nav_student_o.gif"


}



// -----------------------------------------------------------------
// -----------------------------------------------------------------

// rollover function
function rollOver(img1,ref1) {
    if (document.images) {
        document.images[img1].src = eval(ref1 + ".src")
    }
    }


// -----------------------------------------------------------------
//FLASH DETECTION SCRIPT
//------------------------------------------------------------------

//flash detection
// looks for version 6 or above

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
    x = navigator.plugins["Shockwave Flash"];
    if (x)
    {
        flashinstalled = 2;
        if (x.description)
        {
            y = x.description;
            //z = y.y.charAt(y.indexOf('.')-2) ;
            //if (z == 1)
            //{ 
            //	flashversion = 10;
            //}
            flashversion = y.charAt(y.indexOf('.')-1) ;
            if(flashversion < 6)
            { // Set desired flash version here
                flashinstalled = 1;
            }
        }
    }
    else
        flashinstalled = 1;
    if (navigator.plugins["Shockwave Flash 6.0"])
    {
        flashinstalled = 2;
        flashversion = 2;
    }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
    x = navigator.mimeTypes['application/x-shockwave-flash'];
    if (x && x.enabledPlugin)
        flashinstalled = 2;
    else
        flashinstalled = 1;
}
else
    MSDetect = "true";

// -----------------------------------------------------------------
// -----------------------------------------------------------------


// get browser window height to stretch drop-shadow layout 
// table the full height of the browser window.
// if for any reason this isn't working as expected, 
// make sure the doctype of your html pages are correct:
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
//        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

// Note: script does NOT work for: IE Mac, and IE 5/5.5 win.


var winH = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
   winH = window.innerHeight;
  } else {
    if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
      winH = document.documentElement.clientHeight;
    } else { if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
       
        winH = document.body.clientHeight;
      }
    }
  }
  
// un-comment the alert below for testing browser height:
//alert(winH);


//for cornell - to draw the footer table
var footH = 0;

footH = winH - 700;
//alert(footH);

// -----------------------------------------------------------------
// -----------------------------------------------------------------

function goto_URL(object) {
	var is_http = object.options[object.selectedIndex].value.indexOf('http://');

	if(is_http == -1)
		window.location.href = object.options[object.selectedIndex].value;
	else
		window.open(object.options[object.selectedIndex].value);
}



// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popFlash(url) {

popupWin = window.open(url, 'mainWindow' , 'width=740,height=550,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no');

}


// -----------------------------------------------------------------
// -----------------------------------------------------------------

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
        browser = "Konqueror";
        OS = "Linux";
}
else if (checkIt('safari')) browser = "safari"
else if (checkIt('omniweb')) browser = "omniweb"
else if (checkIt('opera')) browser = "opera"
else if (checkIt('webtv')) browser = "webtv";
else if (checkIt('icab')) browser = "icab"
else if (checkIt('msie')) browser = "ie"
else if (!checkIt('compatible'))
{
        browser = "netnav"
        version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
        if (checkIt('linux')) OS = "Linux";
        else if (checkIt('x11')) OS = "Unix";
        else if (checkIt('mac')) OS = "Mac"
        else if (checkIt('win')) OS = "Windows"
        else OS = "an unknown operating system";
}

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
} 
