// rollover script

if (document.images){

// homepage nav
        h_programson = new Image();
        h_programson.src = "/art/images/home/n-programs-on.gif";
        h_programsoff = new Image();
        h_programsoff.src = "/art/images/home/n-programs-off.gif";

        h_exhibitionson = new Image();
        h_exhibitionson.src = "/art/images/home/n-exhibitions-on.gif";
        h_exhibitionsoff = new Image();
        h_exhibitionsoff.src = "/art/images/home/n-exhibitions-off.gif";

        h_courseson = new Image();
        h_courseson.src = "/art/images/home/n-courses-on.gif";
        h_coursesoff = new Image();
        h_coursesoff.src = "/art/images/home/n-courses-off.gif";

        h_facultyon = new Image();
        h_facultyon.src = "/art/images/home/n-faculty-on.gif";
        h_facultyoff = new Image();
        h_facultyoff.src = "/art/images/home/n-faculty-off.gif";

        h_studentson = new Image();
        h_studentson.src = "/art/images/home/n-students-on.gif";
        h_studentsoff = new Image();
        h_studentsoff.src = "/art/images/home/n-students-off.gif";

        h_alumnion = new Image();
        h_alumnion.src = "/art/images/home/n-alumni-on.gif";
        h_alumnioff = new Image();
        h_alumnioff.src = "/art/images/home/n-alumni-off.gif";

// homepage sub nav
        hs_paintingon = new Image();
        hs_paintingon.src = "/art/images/home/ns-painting-on.gif";
        hs_paintingoff = new Image();
        hs_paintingoff.src = "/art/images/home/ns-painting-off.gif";

        hs_sculptureon = new Image();
        hs_sculptureon.src = "/art/images/home/ns-sculpture-on.gif";
        hs_sculptureoff = new Image();
        hs_sculptureoff.src = "/art/images/home/ns-sculpture-off.gif";

        hs_designon = new Image();
        hs_designon.src = "/art/images/home/ns-design-on.gif";
        hs_designoff = new Image();
        hs_designoff.src = "/art/images/home/ns-design-off.gif";

        hs_artedon = new Image();
        hs_artedon.src = "/art/images/home/ns-arted-on.gif";
        hs_artedoff = new Image();
        hs_artedoff.src = "/art/images/home/ns-arted-off.gif";

        hs_arthiston = new Image();
        hs_arthiston.src = "/art/images/home/ns-arthist-on.gif";
        hs_arthistoff = new Image();
        hs_arthistoff.src = "/art/images/home/ns-arthist-off.gif";

        hs_studioon = new Image();
        hs_studioon.src = "/art/images/home/ns-studio-on.gif";
        hs_studiooff = new Image();
        hs_studiooff.src = "/art/images/home/ns-studio-off.gif";

        hs_mfaon = new Image();
        hs_mfaon.src = "/art/images/home/ns-mfa-on.gif";
        hs_mfaoff = new Image();
        hs_mfaoff.src = "/art/images/home/ns-mfa-off.gif";

        hs_facilitieson = new Image();
        hs_facilitieson.src = "/art/images/home/ns-facilities-on.gif";
        hs_facilitiesoff = new Image();
        hs_facilitiesoff.src = "/art/images/home/ns-facilities-off.gif";

        hs_vrlon = new Image();
        hs_vrlon.src = "/art/images/home/ns-vrl-on.gif";
        hs_vrloff = new Image();
        hs_vrloff.src = "/art/images/home/ns-vrl-off.gif";

        hs_safetyon = new Image();
        hs_safetyon.src = "/art/images/home/ns-safety-on.gif";
        hs_safetyoff = new Image();
        hs_safetyoff.src = "/art/images/home/ns-safety-off.gif";

        hs_galleryon = new Image();
        hs_galleryon.src = "/art/images/home/ns-gallery-on.gif";
        hs_galleryoff = new Image();
        hs_galleryoff.src = "/art/images/home/ns-gallery-off.gif";

        hs_courseson = new Image();
        hs_courseson.src = "/art/images/home/ns-courses-on.gif";
        hs_coursesoff = new Image();
        hs_coursesoff.src = "/art/images/home/ns-courses-off.gif";

        hs_upcomingon = new Image();
        hs_upcomingon.src = "/art/images/home/ns-upcoming-on.gif";
        hs_upcomingoff = new Image();
        hs_upcomingoff.src = "/art/images/home/ns-upcoming-off.gif";

        hs_artslinkon = new Image();
        hs_artslinkon.src = "/art/images/home/ns-artslink-on.gif";
        hs_artslinkoff = new Image();
        hs_artslinkoff.src = "/art/images/home/ns-artslink-off.gif";

        hs_guestartistson = new Image();
        hs_guestartistson.src = "/art/images/home/ns-guestartists-on.gif";
        hs_guestartistsoff = new Image();
        hs_guestartistsoff.src = "/art/images/home/ns-guestartists-off.gif";

        hs_facultyshowson = new Image();
        hs_facultyshowson.src = "/art/images/home/ns-facultyshows-on.gif";
        hs_facultyshowsoff = new Image();
        hs_facultyshowsoff.src = "/art/images/home/ns-facultyshows-off.gif";

        hs_studentshowson = new Image();
        hs_studentshowson.src = "/art/images/home/ns-studentshows-on.gif";
        hs_studentshowsoff = new Image();
        hs_studentshowsoff.src = "/art/images/home/ns-studentshows-off.gif";

        hs_elliotton = new Image();
        hs_elliotton.src = "/art/images/home/ns-elliott-on.gif";
        hs_elliottoff = new Image();
        hs_elliottoff.src = "/art/images/home/ns-elliott-off.gif";

        hs_weatherspoonon = new Image();
        hs_weatherspoonon.src = "/art/images/home/ns-weatherspoon-on.gif";
        hs_weatherspoonoff = new Image();
        hs_weatherspoonoff.src = "/art/images/home/ns-weatherspoon-off.gif";

        hs_facultyon = new Image();
        hs_facultyon.src = "/art/images/home/ns-faculty-on.gif";
        hs_facultyoff = new Image();
        hs_facultyoff.src = "/art/images/home/ns-faculty-off.gif";

        hs_visitingon = new Image();
        hs_visitingon.src = "/art/images/home/ns-visiting-on.gif";
        hs_visitingoff = new Image();
        hs_visitingoff.src = "/art/images/home/ns-visiting-off.gif";

        hs_advisingon = new Image();
        hs_advisingon.src = "/art/images/home/ns-advising-on.gif";
        hs_advisingoff = new Image();
        hs_advisingoff.src = "/art/images/home/ns-advising-off.gif";

        hs_opportunitieson = new Image();
        hs_opportunitieson.src = "/art/images/home/ns-opportunities-on.gif";
        hs_opportunitiesoff = new Image();
        hs_opportunitiesoff.src = "/art/images/home/ns-opportunities-off.gif";

        hs_salon = new Image();
        hs_salon.src = "/art/images/home/ns-sal-on.gif";
        hs_saloff = new Image();
        hs_saloff.src = "/art/images/home/ns-sal-off.gif";

        hs_studentartson = new Image();
        hs_studentartson.src = "/art/images/home/ns-studentarts-on.gif";
        hs_studentartsoff = new Image();
        hs_studentartsoff.src = "/art/images/home/ns-studentarts-off.gif";

        hs_financialaidon = new Image();
        hs_financialaidon.src = "/art/images/home/ns-financialaid-on.gif";
        hs_financialaidoff = new Image();
        hs_financialaidoff.src = "/art/images/home/ns-financialaid-off.gif";

        hs_featuredalumon = new Image();
        hs_featuredalumon.src = "/art/images/home/ns-featuredalum-on.gif";
        hs_featuredalumoff = new Image();
        hs_featuredalumoff.src = "/art/images/home/ns-featuredalum-off.gif";

        hs_contactinfoon = new Image();
        hs_contactinfoon.src = "/art/images/home/ns-contactinfo-on.gif";
        hs_contactinfooff = new Image();
        hs_contactinfooff.src = "/art/images/home/ns-contactinfo-off.gif";

        hs_artscapeon = new Image();
        hs_artscapeon.src = "/art/images/home/ns-artscape-on.gif";
        hs_artscapeoff = new Image();
        hs_artscapeoff.src = "/art/images/home/ns-artscape-off.gif";

// uncg nav
        prospon = new Image();
        prospon.src = "/art/images/nu-prospective-on.gif";
        prospoff = new Image();
        prospoff.src = "/art/images/nu-prospective-off.gif";

        currenton = new Image();
        currenton.src = "/art/images/nu-current-on.gif";
        currentoff = new Image();
        currentoff.src = "/art/images/nu-current-off.gif";

        facultyon = new Image();
        facultyon.src = "/art/images/nu-faculty-on.gif";
        facultyoff = new Image();
        facultyoff.src = "/art/images/nu-faculty-off.gif";

        communityon = new Image();
        communityon.src = "/art/images/nu-community-on.gif";
        communityoff = new Image();
        communityoff.src = "/art/images/nu-community-off.gif";

        alumnion = new Image();
        alumnion.src = "/art/images/nu-alumni-on.gif";
        alumnioff = new Image();
        alumnioff.src = "/art/images/nu-alumni-off.gif";


}

function swapem(iname, gname) {
if (document.images){
        iname.src = gname.src;
}}

//FROM HERE DOWN IS HOMEPAGE PULLDOWNS

// cheesy off switch for menus

function allOff(){
  hideLayer('menu1');
  hideLayer('menu2');
  hideLayer('menu3');
  hideLayer('menu4');
  hideLayer('menu5');
  hideLayer('menu6');
}

// generic layer visibility switch

var closeIt;

function showLayer(layerName){
  allOff();
    clearTimeout(closeIt);
  
  if (document.layers) {
    var page = eval('document.'+layerName);
  } else if (document.getElementById) {
    var page= eval("document.getElementById(layerName).style");
  } else if (document.all) {
    var page = eval('document.all.'+layerName+'.style');
  }
 
    page.visibility="visible";
}
        
function hideLayer(layerName){
  if (document.layers) {
    var page = eval('document.'+layerName);
  } else if (document.getElementById) {
    var page= eval("document.getElementById(layerName).style");
  } else if (document.all) {
    var page = eval('document.all.'+layerName+'.style');
  }
    page.visibility="hidden";
}

function hideDelay(which) {
  closeIt = setTimeout('hideLayer("'+which+'")',200);
}


// find window dimensions and draw page

var winHeight; 
var winWidth; 

function myWinHeight(thisWindow) {
  if(document.all) {
    return thisWindow.document.body.clientHeight;
  } else {
    return thisWindow.innerHeight;
  }
}

function myWinWidth(thisWindow) {
  if(document.all) {
    return thisWindow.document.body.clientWidth;
  } else {
    return thisWindow.innerWidth;
  }
}

// for home page

function divMaker(name, vert) {
  
  winWidth = myWinWidth(self);
  cellWidth = winWidth/2 - 420;
  if(document.layers) {
    howID = 'name';
  } else {
    howID = 'id';
  }
  
  divLeft = (cellWidth + 445);
  document.write('<div '+howID+'="'+name+'" class="menu" style="position: absolute; left: 617px; top: '+vert+'px; visibility: hidden; z-index: 15">');
 
}

//fixing Netscape resize bug, dammit

NS4=(document.layers);
IE4=(document.all);
ver4=(NS4 || IE4);

if (!IE4) onload = setResize;

function setResize(){
	setTimeout('window.onresize=reDo;',500);
}

function reDo(){
    window.location.reload()
}

//-->


