// rollover for all Level 1 Internal Site // One JS file means that it will be cached for all of the site // // Timeoout Used to stop annoying Netscape flicker var timeout_siteInternalId; // Preload internal rollovers + descriptions function preload_siteInternal() { if(document.images) { var ImgArray = new Array(); for (var i = 0; i < 22; i++) { ImgArray[i] = new Image(); } ImgArray[0].src = "/wgbh/amex/pill/subimages/film_top.jpg"; ImgArray[1].src = "/wgbh/amex/pill/subimages/gallery_top.jpg"; ImgArray[2].src = "/wgbh/amex/pill/subimages/people_top.jpg"; ImgArray[3].src = "/wgbh/amex/pill/subimages/sfeat_top.jpg"; ImgArray[4].src = "/wgbh/amex/pill/subimages/teach_top.jpg"; ImgArray[5].src = "/wgbh/amex/pill/subimages/time_top.jpg"; ImgArray[6].src = "/wgbh/amex/pill/subimages/film_nav_over.gif"; ImgArray[7].src = "/wgbh/amex/pill/subimages/gallery_nav_over.gif"; ImgArray[8].src = "/wgbh/amex/pill/subimages/people_nav_over.gif"; ImgArray[9].src = "/wgbh/amex/pill/subimages/sfeat_nav_over.gif"; ImgArray[10].src = "/wgbh/amex/pill/subimages/teach_nav_over.gif"; ImgArray[11].src = "/wgbh/amex/pill/subimages/time_nav_over.gif"; ImgArray[12].src = "/wgbh/amex/pill/subimages/sf_1_nav_over.gif"; ImgArray[13].src = "/wgbh/amex/pill/subimages/sf_2_nav_over.gif"; ImgArray[14].src = "/wgbh/amex/pill/subimages/sf_3_nav_over.gif"; ImgArray[15].src = "/wgbh/amex/pill/subimages/sf_4_nav_over.gif"; ImgArray[16].src = "/wgbh/amex/pill/subimages/sf_5_nav_over.gif"; ImgArray[17].src = "/wgbh/amex/pill/subimages/sf_6_nav_over.gif"; ImgArray[18].src = "/wgbh/amex/pill/subimages/sfeat_nav_off.gif"; ImgArray[19].src = "/wgbh/amex/pill/subimages/sfeat_nav_on.gif"; } } // Preload internal Special Features rollovers function preload_siteSfeat_Internal() { if(document.images) { var ImgArray = new Array(); for (var i = 0; i < 10; i++) { ImgArray[i] = new Image(); } ImgArray[0].src = "/wgbh/amex/pill/subimages/sf_1_nav_over.gif"; ImgArray[1].src = "/wgbh/amex/pill/subimages/sf_2_nav_over.gif"; ImgArray[2].src = "/wgbh/amex/pill/subimages/sf_3_nav_over.gif"; ImgArray[3].src = "/wgbh/amex/pill/subimages/sf_4_nav_over.gif"; ImgArray[4].src = "/wgbh/amex/pill/subimages/sf_5_nav_over.gif"; ImgArray[5].src = "/wgbh/amex/pill/subimages/sf_6_nav_over.gif"; ImgArray[8].src = "/wgbh/amex/pill/subimages/sfeat_nav_off.gif"; ImgArray[9].src = "/wgbh/amex/pill/subimages/sfeat_nav_on.gif"; } } // Preload internal Filmand More rollovers function preload_siteFilm_Internal() { if(document.images) { var ImgArray = new Array(); for (var i = 0; i < 8; i++) { ImgArray[i] = new Image(); } ImgArray[0].src = "/wgbh/amex/pill/subimages/film_t_nav_over.gif"; ImgArray[1].src = "/wgbh/amex/pill/subimages/film_fr_nav_over.gif"; ImgArray[2].src = "/wgbh/amex/pill/subimages/film_nav_over.gif"; ImgArray[3].src = "/wgbh/amex/pill/subimages/film_fd_nav_over.gif"; ImgArray[4].src = "/wgbh/amex/pill/subimages/film_ps_nav_over.gif"; ImgArray[5].src = "/wgbh/amex/pill/subimages/film_nav_off.gif"; ImgArray[6].src = "/wgbh/amex/pill/subimages/film_nav_on.gif"; ImgArray[7].src = "/wgbh/amex/pill/subimages/film_a_nav_over.gif"; } } function popswap_on(rollNav, thisPop) { var rollStr, titleStr, thisPopStr, roll_obj, title_obj, thisPop_obj, roll_url, title_url, thisPop_url; if(document.images) { // clearTimeout(timeout_siteInternalId); rollStr = 'document.sf_attitudes_' + rollNav; roll_obj = eval(rollStr); titleStr = 'document.pop_attitudes_top'; title_obj = eval(titleStr); thisPopStr = 'document.sf_attitudes_' + thisPop; thisPop_obj = eval(thisPopStr); if (rollStr != thisPopStr){ roll_url = 'images/sf_attitudes_' + rollNav + '_over.jpg'; title_url = 'images/sf_attitudes_pop_' + rollNav + '_top.gif'; thisPop_url = 'images/sf_attitudes_' + thisPop + '.jpg'; roll_obj.src = roll_url; title_obj.src = title_url; thisPop_obj.src = thisPop_url; } } } function popswap_off(rollNav, thisPop) { var rollStr, titleStr, thisPopStr, roll_obj, title_obj, thisPop_obj, roll_url, title_url, thisPop_url; if(document.images) { // clearTimeout(timeout_siteInternalId); rollStr = 'document.sf_attitudes_' + rollNav; roll_obj = eval(rollStr); titleStr = 'document.pop_attitudes_top'; title_obj = eval(titleStr); thisPopStr = 'document.sf_attitudes_' + thisPop; thisPop_obj = eval(thisPopStr); if (rollStr != thisPopStr){ roll_url = 'images/sf_attitudes_' + rollNav + '.jpg'; title_url = 'images/sf_attitudes_pop_' + thisPop + '_top.gif'; thisPop_url = 'images/sf_attitudes_' + thisPop + '_over.jpg'; roll_obj.src = roll_url; title_obj.src = title_url; thisPop_obj.src = thisPop_url; } } } // On MOUSEOUT this function resets the nav bar to "thissecttion" and the // rollover info box to default (no text) // It is called from the off function with time out to avoid annoying flicker // Created by Daniel Bulli function reset_NavandRollText(thissection) { var imgTurl, obj, objStr, imgRurl; if(document.images) { objStr = 'document.m_' + thissection; obj = eval(objStr); imgRurl = '../subimages/' + thissection + '_nav_over.gif'; imgTurl = '../subimages/top_off.jpg'; obj.src = imgRurl; document.roll_text_info.src=imgTurl; } } // On MOUSEOUT this function resets the nav bar to "thissecttion" and the // rollover info box to default (no text) // It is called from the off function with time out to avoid annoying flicker // nb// this doesn't change rollover info function reset_Nav(thissection) { var imgTurl, obj, objStr, imgRurl; if(document.images) { objStr = 'document.m_' + thissection; obj = eval(objStr); imgRurl = '../subimages/' + thissection + '_nav_over.gif'; obj.src = imgRurl; } } // sections with sub_nav function reset_sub_NavandRollText(thissection) { var imgTurl, obj, objStr, imgRurl; if(document.images) { objStr = 'document.m_' + thissection; obj = eval(objStr); imgRurl = '../subimages/' + thissection + '_nav_on.gif'; imgTurl = '../subimages/top_off.jpg'; obj.src = imgRurl; document.roll_text_info.src=imgTurl; } } // special by Joe function reset_roller(thissection) { var imgTurl, obj, objStr, imgRurl; if(document.images) { objStr = 'document.m_' + thissection; obj = eval(objStr); imgRurl = '../subimages/' + thissection + '_nav.gif'; imgTurl = 'images/date_off.gif'; obj.src = imgRurl; document.roller.src=imgTurl; } } // sections with sub_nav function reset_sub_Nav(thissection) { var imgTurl, obj, objStr, imgRurl; if(document.images) { objStr = 'document.m_' + thissection; obj = eval(objStr); imgRurl = '../subimages/' + thissection + '_nav_on.gif'; obj.src = imgRurl; } } // On MOUSEOUT this function resets the nav bar to "thissecttion" and the // rollover info box to default (no text) // It is called from the off function with time out to avoid annoying flicker // nb// this ONLY rollover info function reset_RollText() { var imgTurl; if(document.images) { imgTurl = '../subimages/top_off.jpg'; document.roll_text_info.src=imgTurl; } } // Functions for onmouseover and mouseout.. // thisNav is there in case more rollovers are added to a page, that have different funtionality // imgName == current rollover, thissection == section that user is in // Created by Daniel Bulli function on_inav(thisNav, imgName, thissection) { var objStr,obj, sec_objStr, sec_obj, imgRurl, sec_imgRurl, imgTurl; if(document.images) { if (thisNav == 'm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'sm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = '../subimages/top_off.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'nm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'r') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = 'images/' + imgName + '_roll.gif'; document.roller.src=imgTurl; } } } // Functions for mouseout.. // thisNav is there in case more rollovers are added to a page, that have different funtionality // imgName == current rollover, thissection == section that user is in // Created by Daniel Bulli function off_inav(thisNav, imgName, thissection) { var objStr,obj, imgRurl, imgTurl; if(document.images) { if (thisNav == 'm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_NavandRollText(\"" + thissection + "\")",10); } else if (thisNav == 'sm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_Nav(\"" + thissection + "\")",10); } else if (thisNav == 'nm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_RollText()",10); } else if (thisNav == 'r') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_roller(\"" + thissection + "\")",10); } } } // Functions for onmouseover and mouseout.. (sections with subnav) // thisNav is there in case more rollovers are added to a page, that have different funtionality // imgName == current rollover, thissection == section that user is in // Created by Daniel Bulli function on_i_sub_nav(thisNav, imgName, thissection) { var objStr,obj, sec_objStr, sec_obj, imgRurl, sec_imgRurl, imgTurl; if(document.images) { if (thisNav == 'm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav_off.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'm_sub') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav_on.gif'; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'm_sub_sec') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_on.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'sm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; sec_imgRurl = '../subimages/' + thissection + '_nav_off.gif'; sec_obj.src = sec_imgRurl; obj.src = imgRurl; imgTurl = '../subimages/top_off.jpg'; document.roll_text_info.src=imgTurl; } else if (thisNav == 'nm') { clearTimeout(timeout_siteInternalId); objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav_over.gif'; obj.src = imgRurl; imgTurl = '../subimages/' + imgName + '_top.jpg'; document.roll_text_info.src=imgTurl; } } } // Functions for mouseout.. (sections with subnav) // thisNav is there in case more rollovers are added to a page, that have different funtionality // imgName == current rollover, thissection == section that user is in // Created by Daniel Bulli function off_i_sub_nav(thisNav, imgName, thissection) { var objStr,obj, imgRurl, imgTurl; if(document.images) { if (thisNav == 'm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_sub_NavandRollText(\"" + thissection + "\")",10); } else if (thisNav == 'm_sub') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav_off.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_NavandRollText(\"" + thissection + "\")",10); } else if (thisNav == 'sm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_sub_Nav(\"" + thissection + "\")",10); } else if (thisNav == 'nm') { objStr = 'document.m_' + imgName; obj = eval(objStr); imgRurl = '../subimages/' + imgName + '_nav.gif'; obj.src = imgRurl; timeout_siteInternalId = setTimeout("reset_RollText()",10); } } } function swap(srcName, imgName) { var objStr,obj, imgRurl, imgTurl; if(document.images) { objStr = 'document.' + srcName; obj = eval(objStr); imgTurl = imgName; obj.src=imgTurl; } }