var closeimagelink="/images/lb2/close.gif";var nextimagelink="/images/lb2/next.gif";var previmagelink="/images/lb2/prev.gif";var IE6=(navigator.userAgent.indexOf("MSIE 6")>=0);var safari=(navigator.userAgent.indexOf("Safari")>=0);var IE=(navigator.userAgent.indexOf("MSIE")>=0);var opera=(navigator.userAgent.indexOf("Opera")>=0);var tb=document.getElementsByTagName("body");var lbox=document.createElement("div");var llocation;var scrollt;var ltoggle;var bheight=document.getElementsByTagName("body")[0].offsetHeight;var b2height=document.documentElement.clientHeight;lbox.setAttribute("id","lighterbox2");if(IE6){lbox.style.background="none"}tb[0].appendChild(lbox);tb[0].insertBefore(lbox,tb[0].firstChild);var lighterboxwrapper=document.createElement("div");lighterboxwrapper.setAttribute("id","lighterboxwrapper2");lbox.appendChild(lighterboxwrapper);var lc=document.createElement("div");lc.setAttribute("id","lighterboxclose2");lc.style.width="100%";lc.style.height="100%";lc.style.zIndex="101";lc.setAttribute("title","Click to Close");lbox.appendChild(lc);var labox=document.createElement("div");labox.setAttribute("id","lighterboxcontent2");lighterboxwrapper.appendChild(labox);var portimage=document.createElement("img");if(!opera){portimage.setAttribute("src","none")}portimage.setAttribute("id","portimage2");labox.appendChild(portimage);var lboxlink=document.createElement("div");lboxlink.setAttribute("id","closebutton2");labox.appendChild(lboxlink);var ci=document.createElement("img");ci.setAttribute("src",closeimagelink);ci.setAttribute("id","lightercloseimage2");ci.setAttribute("title","Close");ci.setAttribute("alt","Close");lboxlink.appendChild(ci);var pi=document.createElement("img");pi.setAttribute("src",previmagelink);pi.setAttribute("id","previmage2");pi.setAttribute("title","Previous Image");pi.setAttribute("alt","Previous");pi.setAttribute("width","22");pi.setAttribute("height","17");lboxlink.appendChild(pi);var ni=document.createElement("img");ni.setAttribute("src",nextimagelink);ni.setAttribute("id","nextimgage2");ni.setAttribute("title","Next Image");ni.setAttribute("alt","Next");ni.setAttribute("width","22");ni.setAttribute("height","17");lboxlink.appendChild(ni);var title=document.createElement("div");title.setAttribute("id","lighterboxtitle");lboxlink.appendChild(title);var description=document.createElement("div");description.setAttribute("id","description2");lboxlink.appendChild(description);var txt=document.createTextNode(" ");description.appendChild(txt);var txt2=document.createTextNode(" ");title.appendChild(txt2);portimage.style.cursor="pointer";portimage.setAttribute("title","Click For Next Image");ci.style.cursor="pointer";pi.style.cursor="pointer";ni.style.cursor="pointer";var piclinks=document.getElementsByTagName("a");var lighterbox=document.getElementById("lighterbox2");var bigpic=lighterbox.getElementsByTagName("img");var thepage=document.getElementById("page");var z;var picarray=new Array();function scrolltf(){if(safari){scrollt=tb[0].scrollTop;return scrollt}else{scrollt=document.documentElement.scrollTop;return scrollt}}for(z=0;z<piclinks.length;z++){if(piclinks[z].getAttribute("rel")=="lighterbox"){picarray.push(piclinks[z]);piclinks[z].onclick=function(){searchString=this;if(!IE){llocation=picarray.indexOf(this)}else{for(var a=0;a<picarray.length;a++){if(picarray[a]==searchString){llocation=a;break}}}ltoggle=1;if(IE){setpic(this)}return setpic(this)}}}var closebutton=document.getElementById("lightercloseimage2");closebutton.onclick=function(){lbox.style.display="none";lbox.setAttribute("class","hide")};function setpic(e){function g(){for(fo=11;fo>0;fo--){if(IE){setTimeout('document.getElementById("portimage2").style.filter="alpha(opacity='+(fo*10)+')"',fo*20)}else{setTimeout('document.getElementById("portimage2").style.opacity="'+fo/10+'"',fo*20)}}}lc.onclick=function(){lbox.style.display="none";lbox.setAttribute("class","hide")};function d(){scrolltf();if(llocation==picarray.length-1){llocation=-1}setpic(picarray[llocation+=1])}ni.onclick=d;portimage.onclick=d;pi.onclick=function(){scrolltf();if(llocation==0){llocation=picarray.length}setpic(picarray[llocation-=1])};function a(j){if(ltoggle==1){var i;if(window.event){i=window.event.keyCode}else{if(j){i=j.which}}if(i=="37"){scrolltf();if(llocation==0){llocation=picarray.length}setpic(picarray[llocation-=1])}else{if(i=="27"){lbox.style.display="none";lbox.setAttribute("class","hide");ltoggle=0;return false}else{if((i=="39")||(i=="32")){d();return false}}}}}document.onkeydown=a;var c=e.getAttribute("href");var f=document.getElementById("placeholder2");var b=document.getElementById("lighterbox2");if(e.getAttribute("rel")=="lighterbox"){function h(){var l=document.getElementById("portimage2");l.style.opacity="0";if(e.getAttribute("title")!=null||undefined){var i=e.getAttribute("title");document.getElementById("description2").firstChild.nodeValue=i}else{document.getElementById("description2").firstChild.nodeValue=" "}if(e.firstChild.nodeType==1){var k=e.firstChild.getAttribute("alt");document.getElementById("lighterboxtitle").firstChild.nodeValue=k}else{document.getElementById("lighterboxtitle").firstChild.nodeValue=" "}var j=document.getElementById("lighterboxwrapper2");l.onload=function(){var o=document.documentElement.clientWidth;var m=document.documentElement.clientHeight;var n=document.getElementById("portimage2").height;var q=document.getElementById("portimage2").width;j.style.width=q+"px";j.style.height=n+"px";for(fd=0;fd<11;fd++){if(IE){setTimeout('document.getElementById("portimage2").style.filter="alpha(opacity='+(fd*10)+')"',fd*50)}else{setTimeout('document.getElementById("portimage2").style.opacity="'+fd/10+'"',fd*50)}}setTimeout("lighterbox.setAttribute('class','show')",100);setTimeout("lighterbox.style.display='block'",100);scrolltf();var p=document.getElementById("lighterboxcontent2").offsetHeight;if(bheight<=p){lbox.style.height=p+"px"}else{lbox.style.height=bheight+"px"}if(bheight<=b2height){lbox.style.height=b2height+"px"}else{lbox.style.height=bheight+"px"}lighterboxwrapper.style.top=((m-document.getElementById("lighterboxcontent2").offsetHeight)/2)+scrollt+"px"}}bigpic[0].setAttribute("src",c);h();if(IE){lbox.style.display="none";lbox.style.display="block";if(!IE6){lighterbox.style.height=document.documentElement.scrollHeight+"px"}}return false}}function timedCount(){var c=document.documentElement.clientWidth;var e=document.documentElement.clientHeight;var b=document.getElementById("portimage2").height;var a=document.getElementById("portimage2").width;var d=document.getElementById("lighterboxwrapper2");if(IE6){lc.style.display="none"}if(IE){d.style.position="relative"}else{lighterboxwrapper.style.top=((e-document.getElementById("lighterboxcontent2").offsetHeight)/2)+"px";d.style.width=a+"px";d.style.position="relative";lbox.style.marginTop=scrollt+"px"}setTimeout("timedCount()",1)}timedCount();
