var wsw=window.screen.width;var	hsw=window.screen.height;var	pageAspectRatio=wsw/hsw;var num=0;var AV=0;if (wsw >= 1600){MaxH=1.56*Hmax1024;MaxW=1.56*Wmax1024;Hmar=1.56*Hmar1024;}else if (wsw >= 1280){MaxH=1.25*Hmax1024;MaxW=1.25*Wmax1024;Hmar=1.25*Hmar1024;}else if (wsw >= 1024){MaxH=Hmax1024;MaxW=Wmax1024;Hmar=Hmar1024;}else{MaxH=.77*Hmax1024;MaxW=.77*Wmax1024;Hmar=0.77*Hmar1024;}if (pageAspectRatio == 1.25){MaxH=MaxH*1.06667}if (pageAspectRatio == 1.6){MaxH=MaxH*.83}if (wsw >= 1600){FontInfo='<font size='+CapFontSize1600+' color="'+CapFontColor+'" face="'+CapFontFace+'">'+CapFontStyle;FontClose=CapFontStyleEnd+'</font>';}else if (wsw >= 1280){FontInfo='<font size='+CapFontSize1280+' color="'+CapFontColor+'" face="'+CapFontFace+'">'+CapFontStyle;FontClose=CapFontStyleEnd+'</font>';}else if (wsw >= 1024){FontInfo='<font size='+CapFontSize1024+' color="'+CapFontColor+'" face="'+CapFontFace+'">'+CapFontStyle;FontClose=CapFontStyleEnd+'</font>';}else{FontInfo='<font size='+CapFontSize800+'  color="'+CapFontColor+'" face="'+CapFontFace+'">'+CapFontStyle;FontClose=CapFontStyleEnd+'</font>';}imgArr = new Array(MaxImages);for (i=0; i < MaxImages; i++){imgArr[i] = new Array(6);}for(var i = 0; i < NumOfImgs; i++){loadMasterArray(i, IL[SeqOrd[i]], IH[SeqOrd[i]], IW[SeqOrd[i]], CA[SeqOrd[i]], MaxH, MaxW);}function loadMasterArray(seq, pixUrl, ih, iw, capt, MaxH, MaxW){/*if (pageAspectRatio == 5/4){ih=ih*1.06667}if (pageAspectRatio == 16/10){ih=ih*.83333}*/imgAspectRatio=iw/ih;if (ImageFillHeight == true){ih=MaxH;iw=ih*imgAspectRatio;if (iw > MaxW){iw=MaxW;ih=iw/imgAspectRatio;}}if (ImageFillWidth == true){iw=MaxW;ih=iw/imgAspectRatio;if (ih > MaxH){ih=MaxH;iw=ih*imgAspectRatio;}}ihsp=(MaxH-ih)/2;imgArr[seq][0] = URLSP;imgArr[seq][1] = ihsp;imgArr[seq][2] = pixUrl;imgArr[seq][3] = iw;imgArr[seq][4] = ih;imgArr[seq][5] = FontInfo+capt+FontClose;}function ImageLocation(){document.write(   '<div class="clearAll"></div><img src="'+imgArr[0][0]+'" id="Usp" width="10" height="'+imgArr[0][1]+'" alt="" border="0" />','<div class="clearAll"></div><img src="'+imgArr[0][2]+'" id="pix" width="'+imgArr[0][3]+'" height="'+imgArr[0][4]+'" alt="" border="0" vspace="'+Hmar+'" />','<div class="clearAll"></div><img src="'+imgArr[0][0]+'" id="Lsp" width="10" height="'+imgArr[0][1]+'" alt="" border="0" />','<div class="clearAll"></div>')}function CaptionLocation(){document.write('<span id="Caption">'+imgArr[0][5]+'</span>')}function ActuatorLocation(){if (wsw >= 1600){FS=ActFontSize1600;}else if (wsw >= 1280){FS=ActFontSize1280;}else if (wsw >= 1024){FS=ActFontSize1024;}else{FS=ActFontSize800;}if (UseAuto == true){document.write('<font size='+FS+'>','<a class="galActuator" href="#" onclick="Back(); return false;">'+PriorPix+'</a>','&nbsp; &nbsp; &nbsp; <a class="galActuator" href="#"> | </a>&nbsp; &nbsp; &nbsp;','<a class="galActuator" href="#" onclick="Auto(); return false;">'+AutoSequencePixs+'</a>','&nbsp; &nbsp; &nbsp; <a class="galActuator" href="#"> | </a> &nbsp; &nbsp; &nbsp;','<a class="galActuator" href="#" onclick="Next(); return false;">'+NextPix+'</a>','</font>');}if (UseAuto == false){document.write('<font size='+FS+'>','<a class="galActuator" href="#" onclick="Back(); return false;">'+PriorPix+'</a>','&nbsp; &nbsp; &nbsp; <a class="galActuator" href="#"> | </a>&nbsp; &nbsp; &nbsp;','<a class="galActuator" href="#" onclick="Next(); return false;">'+NextPix+'</a>','</font>');}}function LinefeedLocation(){document.write('<br />');}function Next(){AV=0;num++;if (num > NumOfImgs-1){num=0;}goTo(num);}function Back(){AV=0;num--;if (num < 0){num=NumOfImgs-1;}if (num > NumOfImgs-1){num=0;}goTo(num);}function Auto(){AV=1;Sequence();}function Sequence(){if (AV==1){num++;if (num > NumOfImgs-1){num=0;}goTo(num);setTimeout("Sequence()",DispTimeSeconds*1000);}}function goTo(num){document.getElementById('pix').width=imgArr[num][3];document.getElementById('pix').height=imgArr[num][4];document.getElementById('pix').src=imgArr[num][0];	document.getElementById('pix').width=imgArr[num][3];document.getElementById('pix').height=imgArr[num][4];document.getElementById('pix').src=imgArr[num][2];document.getElementById('Usp').height=imgArr[num][1];document.getElementById('Usp').src=imgArr[num][0];	document.getElementById('Usp').height=imgArr[num][1];document.getElementById('Lsp').src=imgArr[num][0];document.getElementById('Lsp').height=imgArr[num][1];document.getElementById('Caption').innerHTML=imgArr[num][5];}



