var arrayString="";var smallImgArray=new Array();var smallImgCount=0;var startImgArrayNo=0;var currentImgArrayNo=0;var origPageImgDir="";var largeImgDir="700w";var thumbX=0;var upTimer;var downTimer;function initViewer(d){var c=document.images;var k;var l="";var j="";var o="";var m=d.src.substr(d.src.lastIndexOf("/")+1);for(var f=0;f<c.length;f++){k=c[f];if(k.className.indexOf("viewImg")>-1){o=k.src;j=o.substr(o.lastIndexOf("/")+1);if(l.indexOf(j)==-1){smallImgArray.push(c[f]);l+=j;if(m==j){startImgArrayNo=smallImgCount}smallImgCount++}}}var e=new Array(5);e=screenData(this);var g=e[3];var n=e[4];var b=parseInt(document.getElementById("viewerDiv").style.width);var h=(g-b)/2;var a=10;showDiv("viewerDiv");document.getElementById("viewerThumbImgsDiv").style.height=(n*0.7)+"px";document.getElementById("thumbsContainerOuter").style.height=Math.floor(n*0.7-100)+"px";alterTopLeft("viewerDiv",h,a);currentImgArrayNo=startImgArrayNo;createThumbImages();displayDiv("viewerBgScreen");showDiv("viewerBgScreen");alterOpac("viewerBgScreen",0.9);window.scrollTo(0,0);showLargeImg(currentImgArrayNo)}function closeViewer(){window.location=window.location}function showLargeImg(c){var a=smallImgArray[c].getAttribute("src");var b=smallImgArray[c].getAttribute("alt");document.getElementById("viewerTopTxtDiv").childNodes[0].nodeValue=b;a=a.replace(/.00w/,largeImgDir);document.getElementById("mainImg").src=a;currentImgArrayNo=c}var thImgDivHeight=85;var browserSpec=browserType();function createThumbImages(){for(var b=0;b<smallImgCount;b++){var a=(smallImgArray[b].getAttribute("src"));a=a.replace(/.00w/,"100w");thId="th"+(b);var c=document.createElement("div");c.style.height=thImgDivHeight+"px";var d=document.createElement("img");d.src=a;d.id=thId;if(browserSpec.indexOf("MS7andPre")==-1){d.setAttribute("onclick","showLargeImg("+b+");");d.setAttribute("onmouseover","this.style.cursor='pointer';")}else{switch(b){case 0:d.onclick=function(){showLargeImg(0)};break;case 1:d.onclick=function(){showLargeImg(1)};break;case 2:d.onclick=function(){showLargeImg(2)};break;case 3:d.onclick=function(){showLargeImg(3)};break;case 4:d.onclick=function(){showLargeImg(4)};break;case 5:d.onclick=function(){showLargeImg(5)};break;case 6:d.onclick=function(){showLargeImg(6)};break;case 7:d.onclick=function(){showLargeImg(7)};break;case 8:d.onclick=function(){showLargeImg(8)};break;case 9:d.onclick=function(){showLargeImg(9)};break;case 10:d.onclick=function(){showLargeImg(10)};break;case 11:d.onclick=function(){showLargeImg(11)};break;case 12:d.onclick=function(){showLargeImg(12)};break;case 13:d.onclick=function(){showLargeImg(13)};break;case 14:d.onclick=function(){showLargeImg(14)};break;case 15:d.onclick=function(){showLargeImg(15)};break;case 16:d.onclick=function(){showLargeImg(16)};break;case 17:d.onclick=function(){showLargeImg(17)};break;case 18:d.onclick=function(){showLargeImg(18)};break;case 19:d.onclick=function(){showLargeImg(19)};break;case 20:d.onclick=function(){showLargeImg(20)};break;case 21:d.onclick=function(){showLargeImg(21)};break;case 22:d.onclick=function(){showLargeImg(22)};break;case 23:d.onclick=function(){showLargeImg(23)};break;case 24:d.onclick=function(){showLargeImg(24)};break;case 25:d.onclick=function(){showLargeImg(25)};break}d.onmouseover=function(){this.style.cursor="pointer"}}c.appendChild(d);window.document.getElementById("thumbsContainer").appendChild(c)}}function imageToLeft(){var a=currentImgArrayNo-1;if(a==-1){a=smallImgArray.length-1}currentImgArrayNo=a;showLargeImg(currentImgArrayNo)}function imageToRight(){var a=currentImgArrayNo+1;if(a==smallImgArray.length){a=0}currentImgArrayNo=a;showLargeImg(currentImgArrayNo)}function imageIn(a){var b=a.src;a.src=b.replace(".gif","_In.gif")}function imageUpIn(a){if(thumbX<0){var b=a.src;a.src=b.replace(".gif","_In.gif")}}function imageOut(a){var b=a.src;a.src=b.replace("_In.gif",".gif")}function showTopThumb(){if(thumbX<0){thumbX+=5;alterTopLeft("thumbsContainer",0,thumbX);upTimer=setTimeout("showTopThumb()",10)}}function showBottomThumb(){var b=smallImgArray.length*thImgDivHeight;var a=parseInt(document.getElementById("thumbsContainerOuter").style.height);if(a-thumbX<b){thumbX-=5;alterTopLeft("thumbsContainer",0,thumbX);downTimer=setTimeout("showBottomThumb()",10)}}function stopTopThumb(){clearTimeout(upTimer)}function stopBottomThumb(){clearTimeout(downTimer)};
