<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function go(url) { 
opener.location.href = url;
}

function MM_closeBrWindow() { //v2.0
window.close();
}

// Some variables used by ODJ_flipImage(), ODJ_preloadImages(), and ODJ_establishYourVariables()
d=document;			
validPage='no';			// default
here=self.location.href; 	// current read of the url string
path=self.location.pathname;
split=here.split('/');		
site=split[3];
section=split[4];		
if (split[6]) file=split[6];			


function ODJ_establishYourVariables() {

if (homepage && imageAppendix && roll) { //  set in the site specific script
if ((section=='')||(path==homepage)) {
section='index';			//  section variable if on the index page
}
if (swapSections.indexOf(section) != -1) {	// check to see if one of the sections we need to work
validPage='yes';		// if the section is on the list, change validPage to yes
}
}
}

function ODJ_flipImage() {					// Finds an image on the page and changes the src based upon a set array and the url string
if ((section)&&(validPage=='yes')&&(split[5] != 'Home')) {
var hereFrame;
var filenameshort;
var hereFrameFile;
if (site == 'Navigation') {
hereFrame = parent.location.href;
hereFrameFile = hereFrame.split('/');
file = hereFrameFile[6];
}

filenameSplit = file.split('.');
filenameshort = filenameSplit[0];

if (eval('d.'+filenameshort)) {
imageobject = eval('d.'+filenameshort+'.src');
imageobjectSplit = imageobject.split('/');
imagename = imageobjectSplit[8];
imagenamelength = imagename.length;
imagenameSplit = imagename.split('.');
imagenameshort = imagenameSplit[0];
if (imagenameshort.indexOf('_over') != -1) {  // cut off the over
imagenameshort = imagenameshort.substring(0,imagenameshort.length-5);
}
imageobject = imageobject.substring(0,imageobject.length-imagenamelength);
imagenameSelected = imagenameshort+imageAppendix;
eval('d.'+filenameshort).src = imageobject + imagenameSelected;
}
}
}

function ODJ_preloadImages(xtraSection) {	// Preload all of the rollover images necessary for a section
if (d.images) {		
if (xtraSection) {section=xtraSection;}		//use the passed section if there is one
if ((section)&&(preloadSections.indexOf(section)!=-1)) {					// Make sure section is not undefined
for (i=0; i<eval(section+'Img').length; i++) {		// Arrays are defined in a site specific script
namefromlist=eval(section+'Img['+i+']');
imagepath='/Assets/Images/Navigation/'+section+'/'+siteFolder+'/'+namefromlist;
eval("Img"+i+"=new Image(1,1)"); eval("Img"+i+".src=imagepath");
}
}
}
}

function ODJ_preloadImagesIntro() {	// Figures out which (and how many) ways to call the preloader
past=d.referrer;
hostPast=past.split('/');		// Hostname of the page that referred 
if (past.indexOf(section)==-1) {	// It referrer was in a differnet section than current
ODJ_preloadImages();			// Do the standard preload for current section
}
if (hostPast[2]!=self.location.hostname) {	//if the referrer is other than current, preload the top
ODJ_preloadImages('top');	
}
if ((path==homepage)||(path=='')) {			// if homepage,
if (hostPast[2]!=self.location.hostname) {
ODJ_preloadImages('index');	
}
}
}

//-->

