//UDMv3.51

//*** DO NOT EDIT THIS LINE *****
var menuReadyState=0;var exclude=1; var agt=navigator.userAgent.toLowerCase();var win=0;var mac=0;var lin=1;if(agt.indexOf('win')!=-1){win=1;lin=0;}if(agt.indexOf('mac')!=-1){mac=1;lin=0;}var lnx=0;if(lin){lnx=1;}var ice=0;var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;var op5=0;var op6=0;var op7=0;var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;if(typeof navigator.vendor!="undefined"){if (navigator.vendor=="KDE"){var thisKDE=agt;var splitKDE=thisKDE.split("konqueror/");var aKDE=splitKDE[1].split("; ");var KDEn=parseFloat(aKDE[0]);if(KDEn>=2.2){kde=1;ns6=1;exclude=0;}}}if(typeof navigator.__ice_version!="undefined"){exclude=0;ice=1;ie=1;ie4=1;}else if(agt.indexOf('webtv')!=-1){exclude=1;}else if(typeof window.opera!="undefined"){exclude=0;if(agt.indexOf("opera/5")!=-1||agt.indexOf("opera 5")!=-1){op5=1;}if(agt.indexOf("opera/6")!=-1||agt.indexOf("opera 6")!=-1){op6=1;}if(/opera[\/ ][7-9]/.test(agt)){op7=1;}}else if(typeof document.all!="undefined"&&!kde){exclude=0;ie=1;if(typeof document.getElementById!="undefined"){ie5=1;if(agt.indexOf("msie 6")!=-1){ie6=1;dcm=document.compatMode;if(dcm!="BackCompat"){com=1;}}}else{ie4=1;}}else if(typeof document.getElementById!="undefined"){exclude=0;if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}if(agt.indexOf("safari")!=-1){mz7=0;saf=1;}}else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){exclude=0;ns4=1;if(typeof navigator.mimeTypes['*']=="undefined"){exclude=1;ns4=0;}}if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){ns6=1;ns7=0;mz7=0;win=0;mac=1;saf=1;}if(agt.indexOf('icab')!=-1){exclude=1;ie=0;ie5=0;}var mu="mu";var m=0;var sm=0;var cm=0;var sp=0;var mI=new Array;var sP=new Array;var sI=new Array;var cP=new Array;var rcP=new Array;var cI=new Array;var relPad;var mainRel=0;var subRel=0;function MI(ma,mb,mc,md,me,mf,mg,mh,mi,mj,mk,ml,mm){addMainItem(ma,mb,mc,md,me,mf,mg,mh,mi,mj,mk,ml,mm);}function addMainItem(ma,mb,mc,md,me,mf,mg,mh,mi,mj,mk,ml,mm){sm=0;if(menuALIGN=="virtual"){ma="";mb="";mc=10;md="";me="";mf="";mg=0;mh=0;mi="";mj="";mk="";ml="";mm="";}else{if(!mb||mb==""){mb="&nbsp;";}while(mb.indexOf('<BR>')!=-1){mb=mb.replace('<BR>','<br>');}while(mb.indexOf('<Br>')!=-1){mb=mb.replace('<Br>','<br>');}while(mb.indexOf('<br />')!=-1){mb=mb.replace('<br />','<br>');}while(mb.indexOf('<br/>')!=-1){mb=mb.replace('<br/>','<br>');}if(!mc||mc==""){mc="left";}if(!md||md==""){md="left";}if(!me||me==""){me="_self";}if((win&&ie5)&&(typeof fSIZE=="string")&&menuALIGN!="free"){while(mb.indexOf('<br>')!=-1){mb=mb.replace('<br>',' ');}mainRel=1;if(m==0){relPad='<span style="width:'+(tINDENT*2)+'px">';if(com){relPad+='<img width='+(tINDENT*2)+' height=1 alt="" border=0>';}relPad+='</span>';}if(md=="left"){mb=mb+relPad;}if(md=="right"){mb=relPad+mb;}if(md=="center"){mb=relPad+mb+relPad;}}if(!mf||mf==""){mf="none";if(ie5){mf="";}}if(!mg){mg=0;}if(!mh){mh=0;}if(!mi||mi==""||mi=="c"||mi=="C"){mi="-";}if(mi!="-"){mi=mi.toLowerCase();}if(!mj){mj="";}if(!mk){mk="";}if(!ml){ml="";}if(!mm){mm="";}}mI[m]=new Array(ma,mb,mc,md,me,mf,mg,mh,mi,mj,mk,ml,mm);m++;};function SP(spa,spb,spc,spd,spe,spf,spg,sph,spi,spj,spk,spl,spm){defineSubmenuProperties(spa,spb,spc,spd,spe,spf,spg,sph,spi,spj,spk,spl,spm);}function defineSubmenuProperties(spa,spb,spc,spd,spe,spf,spg,sph,spi,spj,spk,spl,spm){if(!ie5){spa+=(sbSIZE*2);}if(!spb||spb==""){spb="left";}if(!spc||spc==""){spc="left";}if(!spd){spd=0;}if(!spe){spe=0;}if(!spf){spf="";}if(!spg){spg="";}if(!sph){sph="";}if(!spi){spi="";}if(!spj){spj="";}if(!spk){spk="";}if(!spl){spl="";}if(!spm){spm="";}sP[(m-1)]=new Array(spa,spb,spc,spd,spe,spf,spg,sph,spi,spj,spk,spl,spm);if(sm==0){sI[(m-1)]=new Array; cP[(m-1)]=new Array; rcP[(m-1)]=new Array; cI[(m-1)]=new Array;}};function SI(sma,smb,smc,smd){addSubmenuItem(sma,smb,smc,smd);}function addSubmenuItem(sma,smb,smc,smd){cm=0;var sme=1;if(sme&&sma=="~"){sme=0;if(!ie&&!ns6&&!mz7&&!op5&&!op7){sma="";}smc="";}if(!sma||sma==""){sma="#";}if(!smb||smb==""){smb="&nbsp;";}while(smb.indexOf('<BR>')!=-1){smb=smb.replace('<BR>','<br>');}while(smb.indexOf('<Br>')!=-1){smb=smb.replace('<Br>','<br>');}while(smb.indexOf('<br />')!=-1){smb=smb.replace('<br />','<br>');}while(smb.indexOf('<br/>')!=-1){smb=smb.replace('<br/>','<br>');}if(((win&&ie5)||mz7||ns6)&&(typeof sfSIZE=="string")&&menuALIGN!="free"){if(m==1&&sm==0){subRel=1;relPad='<span style="width:'+(stINDENT*3)+'px">';if(com||mz7||ns6){relPad+='<img width='+(stINDENT*3)+' height=1 alt="" border=0>';}relPad+='</span>';}if(sP[(m-1)][2]=="left"){smb=smb+relPad;}if(sP[(m-1)][2]=="right"){smb=relPad+smb;}if(sP[(m-1)][2]=="center"){smb=relPad+smb+relPad;}}if(!smc||smc==""){smc="_self";}if(sma=="#"||sma=="~"){smc="_self";}if(!smd||smd==""){smd="none";if(ie5){smd="";}}sI[(m-1)][sm]=new Array(sma,smb,smc,smd,sme);sm++;};function CP(cpa,cpb,cpc,cpd,cpe,cpf,cpg,cph,cpi,cpj,cpk,cpl,cpm){defineChildmenuProperties(cpa,cpb,cpc,cpd,cpe,cpf,cpg,cph,cpi,cpj,cpk,cpl,cpm);}function defineChildmenuProperties(cpa,cpb,cpc,cpd,cpe,cpf,cpg,cph,cpi,cpj,cpk,cpl,cpm){if(!ie5){cpa+=(sbSIZE*2);}if(!cpb||cpb==""){cpb="left";}if(!cpc||cpc==""){cpc="left";}if(!cpd){cpd=0;}if(!cpe){cpe=0;}if(!cpf){cpf="";}if(!cpg){cpg="";}if(!cph){cph="";}if(!cpi){cpi="";}if(!cpj){cpj="";}if(!cpk){cpk="";}if(!cpl){cpl="";}if(!cpm){cpm="";}cP[(m-1)][(sm-1)]=new Array(cpa,cpb,cpc,cpd,cpe,cpf,cpg,cph,cpi,cpj,cpk,cpl,cpm);rcP[(m-1)][(sm-1)]=new Array(cpa,cpb,cpc,cpd,cpe,cpf,cpg,cph,cpi,cpj,cpk,cpl);cI[(m-1)][(sm-1)]=new Array;};function CI(cma,cmb,cmc,cmd){addChildmenuItem(cma,cmb,cmc,cmd);}function addChildmenuItem(cma,cmb,cmc,cmd){var cme=1;if(cma&&cma=="~"){cme=0;if(!ie&&!ns6&&!mz7&&!op5&&!op7){cma="";}cmc="";}if(!cma||cma==""){cma="#";}if(!cmb||cmb==""){cmb="&nbsp;";}while(cmb.indexOf('<BR>')!=-1){cmb=cmb.replace('<BR>','<br>');}while(cmb.indexOf('<Br>')!=-1){cmb=cmb.replace('<Br>','<br>');}while(cmb.indexOf('<br />')!=-1){cmb=cmb.replace('<br />','<br>');}while(cmb.indexOf('<br/>')!=-1){cmb=cmb.replace('<br/>','<br>');}if(((win&&ie5)||mz7||ns6)&&(typeof sfSIZE=="string")&&menuALIGN!="free"){if(cP[(m-1)][(sm-1)][2]=="left"){cmb=cmb+relPad;}if(cP[(m-1)][(sm-1)][2]=="right"){cmb=relPad+cmb;}if(cP[(m-1)][(sm-1)][2]=="center"){cmb=relPad+cmb+relPad;}}if(!cmc||cmc==""){cmc="_self";}if(cma=="#"||cma=="~"){cmc="_self";}if(!cmd||cmd==""){cmd="none";if(ie5){cmd="";}}cI[(m-1)][(sm-1)][cm]=new Array(cma,cmb,cmc,cmd,cme);cm++;}var keepSubLIT=1;var chvOFFSET=0;var chhOFFSET=-5;var openTIMER=0;var openChildTIMER=0;var closeTIMER=330;var cellCLICK=1;var aCURSOR="hand";var remoteTRIGGERING=0;var altDISPLAY="";var allowRESIZE=1;var redGRID=0;var gridWIDTH=0;var gridHEIGHT=0;var documentWIDTH=0;var hideSELECT=0;var allowForSCALING=0;var allowPRINTING=0;var arrWIDTH=0;var arrHEIGHT=0;var arrHOFFSET=0;var arrVOFFSET=0;var arrVALIGN="";var arrLEFT="";var arrLEFT_ROLL="";var arrRIGHT="";var arrRIGHT_ROLL="";function activateMenu(){};function deactivateMenus(){};
//*******************************
/////////////////////////////////
// custom window opening function
var nUrl,nW,nH;
var nWin=new Array;
var nw=0;
function openWindow(nUrl,nW,nH){
nWin[nw] = open(nUrl, "","width="+nW+",height="+nH+",status=yes,scrollbars=no,scrolling=no,toolbar=no,menubar=no,location=no,resizable=yes");
nw++;
}
/////////////////////////////////
function mouseOverpoints()
{
document.points.src ="./images/partnership2.gif"
}
function mouseOutpoints()
{
document.points.src ="./images/partnership.gif"
}

function mouseOverdownload()
{
document.download.src ="./images/download2.gif"
}
function mouseOutdownload()
{
document.download.src ="./images/download.gif"
}

function mouseOverflyer()
{
document.download.src ="./images/flyer/dlbutton2.gif"
}
function mouseOutflyer()
{
document.download.src ="./images/flyer/dlbutton.gif"
}

function mouseOverdownload1()
{
document.download1.src ="./images/download2.gif"
}
function mouseOutdownload1()
{
document.download1.src ="./images/download.gif"
}

function mouseOverdownload2()
{
document.download2.src ="./images/download2.gif"
}
function mouseOutdownload2()
{
document.download2.src ="./images/download.gif"
}

function mouseOverdownload3()
{
document.download3.src ="./images/download2.gif"
}
function mouseOutdownload3()
{
document.download3.src ="./images/download.gif"
}

function mouseOverdownload4()
{
document.download4.src ="./images/download2.gif"
}
function mouseOutdownload4()
{
document.download4.src ="./images/download.gif"
}

function mouseOverdownload5()
{
document.download5.src ="./images/download2.gif"
}
function mouseOutdownload5()
{
document.download5.src ="./images/download.gif"
}


//<script language="JavaScript">
function CheckWindow() {
	if (!top)
		document.location="default.htm"
	else if (!top.Econtent)
		document.location="default.htm"
}
var imageCount=12
var imageID = 1
var LastImage = 0
function GetItem(name,winid) {
	if (!winid)
		winid = window
	if (document.getElementById)
		return winid.document.getElementById(name)
	else if (document.all)
		return winid.document.all[name]
	else
		return winid.document.imagelist[name]
}
function LoadImage(id) {
	if (id < 1) {
		id = imageCount
	}
	if (id > imageCount) {
		id = 1
	}
	// GetItem("picframe").src="./images/flyer/page" + id + ".jpg"
	imageID = id
	crossfade(GetItem("picframe"), "./images/flyer/page"+id+".jpg", '1', '')
	// crosswipe(GetItem("picframe"), './images/flyer/page'+id+'.jpg', '1', 'rl', '')
	GetItem("pagetext").innerHTML = "Page " + id
	LastImage = id
}
function getParams() {
	var idx = document.URL.indexOf('?');
	var params = new Array();
	if (idx != -1) {
		var pairs = document.URL.substring(idx+1,document.URL.length).split('&');
		for (var i=0; i<pairs.length; i++) {
			nameVal = pairs[i].split('=');
			params[nameVal[0]] = nameVal[1];
		}
	}
	return params;
}
//</script>
//<script>
var ixf = { 'clock' : null, 'count' : 1 }
/*******************************************************



/*****************************************************************************
 List the images that need to be cached
*****************************************************************************/

ixf.imgs = ['page1.jpg','page2.jpg','page3.jpg','page4.jpg','page5.jpg','page6.jpg','page7.jpg','page8.jpg','page9.jpg','page10.jpg','page11.jpg','page12.jpg']

/*****************************************************************************
*****************************************************************************/



//cache the images
ixf.imgsLen = ixf.imgs.length;
ixf.cache = [];
for(var i=0; i<ixf.imgsLen; i++)
{
	ixf.cache[i] = new Image;
	ixf.cache[i].src = ixf.imgs[i];
}


//crossfade setup function
function crossfade()
{
	//if the timer is not already going
	if(ixf.clock == null)
	{
		//copy the image object 
		ixf.obj = arguments[0];
		
		//copy the image src argument 
		ixf.src = arguments[1];
		
		//store the supported form of opacity
		if(typeof ixf.obj.style.opacity != 'undefined')
		{
			ixf.type = 'w3c';
		}
		else if(typeof ixf.obj.style.MozOpacity != 'undefined')
		{
			ixf.type = 'moz';
		}
		else if(typeof ixf.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf.type = 'khtml';
		}
		else if(typeof ixf.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			ixf.type = (ixf.obj.filters.length > 0 && typeof ixf.obj.filters.alpha == 'object' && typeof ixf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
		}
		else
		{
			ixf.type = 'none';
		}
		
		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf.obj.alt = arguments[3];
		}
		
		//if any kind of opacity is supported
		if(ixf.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf.newimg.className = 'idupe';
			
			//set src to new image src
			ixf.newimg.src = ixf.src

			//move it to superimpose original image
			// ixf.newimg.style.left = ixf.getRealPosition(ixf.obj, 'x') + 'px';
			// ixf.newimg.style.top = ixf.getRealPosition(ixf.obj, 'y') + 'px';
			
			//copy and convert fade duration argument 
			//ixf.length = parseInt(arguments[2], 10) * 100;
			
			//create fade resolution argument as 20 steps per transition
			//ixf.resolution = parseInt(arguments[2], 10) * 2;
			ixf.resolution = 5
			
			//start the timer
			ixf.clock = setInterval('ixf.crossfade()', 1);
		}
		
		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf.obj.src = ixf.src;
		}
		
	}
};


//crossfade timer function
ixf.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf.count -= (1 / ixf.resolution);
	
	//if the counter has reached the bottom
	if(ixf.count < (1 / ixf.resolution))
	{
		//clear the timer
		clearInterval(ixf.clock);
		ixf.clock = null;
		
		//reset the counter
		ixf.count = 1;
		
		//set the original image to the src of the new image
		ixf.obj.src = ixf.src;
	}
	
	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf.type)
	{
		case 'ie' :
			ixf.obj.filters.alpha.opacity = ixf.count * 100;
			ixf.newimg.filters.alpha.opacity = (1 - ixf.count) * 100;
			break;
			
		case 'khtml' :
			ixf.obj.style.KhtmlOpacity = ixf.count;
			ixf.newimg.style.KhtmlOpacity = (1 - ixf.count);
			break;
			
		case 'moz' : 
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf.obj.style.MozOpacity = (ixf.count == 1 ? 0.9999999 : ixf.count);
			ixf.newimg.style.MozOpacity = (1 - ixf.count);
			break;
			
		default : 
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf.obj.style.opacity = (ixf.count == 1 ? 0.9999999 : ixf.count);
			ixf.newimg.style.opacity = (1 - ixf.count);
	}
	
	//now that we've gone through one fade iteration 
	//we can show the image that's fading in
	ixf.newimg.style.visibility = 'visible';
	
	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf.newimg.style.left = ixf.getRealPosition(ixf.obj, 'x') + 'px';
	ixf.newimg.style.top = ixf.getRealPosition(ixf.obj, 'y') + 'px';
	
	//if the counter is at the top, which is just after the timer has finished
	if(ixf.count == 1)
	{
		//remove the duplicate image
		ixf.newimg.parentNode.removeChild(ixf.newimg);
	}
};



//get real position method
ixf.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}
	
	return this.pos;
};

//</script>
