// 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 < 15; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/fm_top.jpg";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/po_top.jpg";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/sl_top.jpg";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/na_top.jpg";
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/aw_top.jpg";
	ImgArray[5].src = "/wgbh/amex/lincolns/subimages/wo_top.jpg";
	ImgArray[6].src = "/wgbh/amex/lincolns/subimages/tg_top.jpg";
	ImgArray[7].src = "/wgbh/amex/lincolns/subimages/fm_nav_over.gif";
	ImgArray[8].src = "/wgbh/amex/lincolns/subimages/po_nav_over.gif";
	ImgArray[9].src = "/wgbh/amex/lincolns/subimages/sl_nav_over.gif";
	ImgArray[10].src = "/wgbh/amex/lincolns/subimages/na_nav_over.gif";
	ImgArray[11].src = "/wgbh/amex/lincolns/subimages/aw_nav_over.gif";
	ImgArray[12].src = "/wgbh/amex/lincolns/subimages/wo_nav_over.gif";
	ImgArray[13].src = "/wgbh/amex/lincolns/subimages/tg_nav_over.gif";
  }
}


// Preload internal fm rollovers
function preload_site_fm_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 8; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/fm_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/fm_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/fm_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/fm_4_nav_over.gif";
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/fm_5_nav_over.gif";
	ImgArray[5].src = "/wgbh/amex/lincolns/subimages/fm_nav_off.gif";	
	ImgArray[6].src = "/wgbh/amex/lincolns/subimages/fm_nav_on.gif";	
  }
}


// Preload internal po rollovers
function preload_site_po_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 6; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/po_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/po_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/po_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/po_nav_off.gif";	
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/po_nav_on.gif";	
  }
}

// Preload internal sl rollovers
function preload_site_sl_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 7; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/sl_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/sl_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/sl_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/sl_4_nav_over.gif";
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/sl_nav_off.gif";	
	ImgArray[5].src = "/wgbh/amex/lincolns/subimages/sl_nav_on.gif";	
  }
}

// Preload internal na rollovers
function preload_site_na_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 6; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/na_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/na_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/na_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/na_nav_off.gif";	
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/na_nav_on.gif";	
  }
}

// Preload internal at rollovers
function preload_site_aw_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 7; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/aw_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/aw_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/aw_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/aw_4_nav_over.gif";
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/aw_nav_off.gif";
	ImgArray[5].src = "/wgbh/amex/lincolns/subimages/aw_nav_on.gif";	
  }
}

// Preload internal wo rollovers
function preload_site_wo_Internal() {
if(document.images) {
  var ImgArray = new Array();
  for (var i = 0; i < 6; i++) {
    ImgArray[i] = new Image();
  }    
	ImgArray[0].src = "/wgbh/amex/lincolns/subimages/wo_1_nav_over.gif";
	ImgArray[1].src = "/wgbh/amex/lincolns/subimages/wo_2_nav_over.gif";
	ImgArray[2].src = "/wgbh/amex/lincolns/subimages/wo_3_nav_over.gif";
	ImgArray[3].src = "/wgbh/amex/lincolns/subimages/wo_nav_off.gif";
	ImgArray[4].src = "/wgbh/amex/lincolns/subimages/wo_nav_on.gif";	
  }
}

// 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 = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav_over.gif'; 
  		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav_on.gif'; 
  		imgTurl = '/wgbh/amex/lincolns/subimages/top_off.jpg';
  		obj.src = imgRurl; 
   		document.roll_text_info.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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/subimages/' + imgName + '_top.jpg';
      		document.roll_text_info.src=imgTurl;      		      		
      		}
      	else if (thisNav == 'x') {
			clearTimeout(timeout_siteInternalId);
	  		objStr = 'document.m_' + imgName; obj = eval(objStr);
      		sec_objStr = 'document.m_' + thissection; sec_obj = eval(sec_objStr);      
      		imgRurl = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/subimages/' + imgName + '_top.jpg';
      		document.roll_text_info.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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav.gif';
      		obj.src = imgRurl;
      		timeout_siteInternalId = setTimeout("reset_RollText()",10);  		
	      	}	

// m_sub_sec added by Joe Bunik
      	else if (thisNav == 'm_sub_sec') {
	  		objStr = 'document.m_' + imgName;
	  		obj = eval(objStr);  
	  		sec_objStr = 'document.m_' + thissection;
	  		sec_obj = eval(sec_objStr);
	  		      		
      		sec_obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/subimages/' + 'top_off.jpg';
      		document.roll_text_info.src=imgTurl;

      		imgRurl = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_on.gif';
      		obj.src = imgRurl;	
      		}
      	 	   		     
	}
}


// 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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav_off.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_on.gif';
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_on.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		sec_imgRurl = '/wgbh/amex/lincolns/subimages/' + thissection + '_nav_off.gif';
      		sec_obj.src = sec_imgRurl;
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_over.gif';
      		obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_off.gif';
      		obj.src = imgRurl;
      		timeout_siteInternalId = setTimeout("reset_NavandRollText(\"" + thissection + "\")",10);  		
      		}

// m_sub_sec added by Joe Bunik
      	else if (thisNav == 'm_sub_sec') {
	  		objStr = 'document.m_' + imgName;
	  		obj = eval(objStr);  
	  		sec_objStr = 'document.m_' + thissection;
	  		sec_obj = eval(sec_objStr);
	  		      		
      		sec_obj.src = imgRurl;
      		imgTurl = '/wgbh/amex/lincolns/subimages/' + 'top_off.jpg';
      		document.roll_text_info.src=imgTurl;

      		imgRurl = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav_on.gif';
      		obj.src = imgRurl;	
      		}

      	else if (thisNav == 'sm') {  
	  		objStr = 'document.m_' + imgName;
      		obj = eval(objStr);      
      		imgRurl = '/wgbh/amex/lincolns/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 = '/wgbh/amex/lincolns/subimages/' + imgName + '_nav.gif';
      		obj.src = imgRurl;
      		timeout_siteInternalId = setTimeout("reset_RollText()",10);  		
      	}	
      	 	   		     
	}
}

