function imageholderclass(){this.over=new Array();this.down=new Array();this.src=new Array();this.store=store;function store(src,down,over){var AL=this.src.length;this.src[AL]=new Image();this.src[AL].src=src;this.over[AL]=new Image();this.over[AL].src=over;this.down[AL]=new Image();this.down[AL].src=down;}}
var ih=new imageholderclass();var mouseisdown=0;function preloader(t){for(i=0;i<t.length;i++){if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){storeimages(t[i]);var checker='';checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';switch(checker){case'A':mouseover(t[i]);mouseout(t[i]);break;case'B':mousedown(t[i]);mouseup2(t[i]);break;case'AB':mouseover(t[i]);mouseout(t[i]);mousedown(t[i]);mouseup(t[i]);break;default:return;}
if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}}}}
function mouseup(t){var newmouseup;if(t.onmouseup){t.oldmouseup=t.onmouseup;newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}}
else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}
t.onmouseup=newmouseup;}
function mouseup2(t){A
var newmouseup;if(t.onmouseup){t.oldmouseup=t.onmouseup;newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}}
else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}
t.onmouseup=newmouseup;}
function mousedown(t){var newmousedown;if(t.onmousedown){t.oldmousedown=t.onmousedown;newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}}
else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}
t.onmousedown=newmousedown;}
function mouseover(t){var newmouseover;if(t.onmouseover){t.oldmouseover=t.onmouseover;newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}}
else{newmouseover=function(){this.src=this.getAttribute("srcover");}}
t.onmouseover=newmouseover;}
function mouseout(t){var newmouseout;if(t.onmouseout){t.oldmouseout=t.onmouseout;newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}}
else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}
t.onmouseout=newmouseout;}
function storeimages(t){var s=(t.getAttribute('src'))?t.getAttribute('src'):'';var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';ih.store(s,d,o);}
function preloadimgsrc(){if(!document.getElementById)return;var it=document.getElementsByTagName('IMG');var it2=document.getElementsByTagName('INPUT');preloader(it);preloader(it2);}
if(window.addEventListener){window.addEventListener("load",preloadimgsrc,false);}
else{if(window.attachEvent){window.attachEvent("onload",preloadimgsrc);}
else{if(document.getElementById){window.onload=preloadimgsrc;}}};var thumbnailviewer2={enableTitle:true,enableTransition:true,hideimgmouseout:false,iefilterstring:'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)',iefiltercapable:document.compatMode&&window.createPopup?true:false,preloadedimages:[],targetlinks:[],alreadyrunflag:false,loadimage:function(linkobj){var imagepath=linkobj.getAttribute("href")
var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0])
var dest=linkobj.getAttribute("rev").split("::")[1]
var description=(thumbnailviewer2.enableTitle&&linkobj.getAttribute("title"))?linkobj.getAttribute("title"):""
var imageHTML='<img src="'+imagepath+'" style="border-width: 0" width="333" height="500" />'
if(typeof dest!="undefined")
imageHTML='<a href="'+dest+'">'+imageHTML+'</a>'
if(description!="")
imageHTML+='<br />'+description
if(this.iefiltercapable){showcontainer.style.filter=this.iefilterstring
showcontainer.filters[0].Apply()}
showcontainer.innerHTML=imageHTML
this.featureImage=showcontainer.getElementsByTagName("img")[0]
this.featureImage.onload=function(){if(thumbnailviewer2.iefiltercapable)
showcontainer.filters[0].Play()}
this.featureImage.onerror=function(){if(thumbnailviewer2.iefiltercapable)
showcontainer.filters[0].Stop()}},hideimage:function(linkobj){var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0])
showcontainer.innerHTML=""},cleanup:function(){if(this.featureImage){this.featureImage.onload=null;this.featureImage.onerror=null;this.featureImage=null}
this.showcontainer=null
for(var i=0;i<this.targetlinks.length;i++){this.targetlinks[i].onclick=null
this.targetlinks[i].onmouseover=null
this.targetlinks[i].onmouseout=null}},addEvent:function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)},init:function(){this.iefiltercapable=(this.iefiltercapable&&this.enableTransition)
var pagelinks=document.getElementsByTagName("a")
for(var i=0;i<pagelinks.length;i++){if(pagelinks[i].getAttribute("rel")&&/enlargeimage:/i.test(pagelinks[i].getAttribute("rel"))){var initType=pagelinks[i].getAttribute("rel").split("::")[1]
if(initType=="mouseover"){this.preloadedimages[this.preloadedimages.length]=new Image()
this.preloadedimages[this.preloadedimages.length-1].src=pagelinks[i].href
pagelinks[i]["onclick"]=function(){return false}}
pagelinks[i]["on"+initType]=function(){thumbnailviewer2.loadimage(this)
return false}
if(this.hideimgmouseout)
pagelinks[i]["onmouseout"]=function(){thumbnailviewer2.hideimage(this)}
this.targetlinks[this.targetlinks.length]=pagelinks[i]}}}}
if(document.addEventListener)
thumbnailviewer2.addEvent(document,function(){thumbnailviewer2.alreadyrunflag=1;thumbnailviewer2.init()},"DOMContentLoaded")
else if(document.all&&document.getElementsByTagName("a").length>0){thumbnailviewer2.alreadyrunflag=1
thumbnailviewer2.init()}
thumbnailviewer2.addEvent(window,function(){if(!thumbnailviewer2.alreadyrunflag)thumbnailviewer2.init()},"load")
thumbnailviewer2.addEvent(window,function(){thumbnailviewer2.cleanup()},"unload")