var restarea=4 
var maxspeed=9 
var nomoremessage="<span style='font-size: 11px'>No more images on this page</span>" 

if (window != window.top)
top.location.href = location.href; 
function popupimage(iname,icap,iht,wname,wsize,hsize) {
var reddevil = 'width=' + wsize + ',height=' + hsize + ',left=10,top=10,screenX=10,screenY=10';
reddevil = reddevil + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0'; 
if(!(iname=="")) { 
popupWin=window.open('',wname,reddevil); 
if (!popupWin.opener) { popupWin.opener = self;} 
popupWin.document.open(); 
popupWin.document.writeln("<html>");
popupWin.document.writeln("<head>"); 
popupWin.document.writeln("<title>" + iname + "</title>"); 
popupWin.document.writeln("<script language='JavaScript'>"); 
popupWin.document.writeln("if (window.focus) {"); 
popupWin.document.writeln(" self.focus();"); 
popupWin.document.writeln("}"); 
popupWin.document.writeln("function killWindow() {"); 
popupWin.document.writeln("killWin = window.close();"); 
popupWin.document.writeln("}"); 
popupWin.document.writeln("</script>"); 
popupWin.document.writeln("</head>"); 
popupWin.document.writeln("<body onBlur='self.close()' onLoad='self.focus()' "); 
popupWin.document.writeln("bgcolor='#000000'"); 
popupWin.document.writeln("text='#ffffff' marginheight=0 marginwidth=0 topmargin=0 "); popupWin.document.writeln("leftmargin=0>"); 
popupWin.document.writeln("<center>"); 
popupWin.document.writeln("<table width=100% border=0 cellspacing=0 cellpadding=0 border=0></a><br><center><font size=4 face=Arial, Helvetica, sans-serif>" + icap + "</font></center>"); 
popupWin.document.writeln("<tr><td><a href=''onClick='killWindow();'><center><br><img src='" + iname + "' border=0"); 
popupWin.document.writeln("</center></td></tr></table></center>"); 
popupWin.document.writeln("</body>");
popupWin.document.writeln("</html>");
popupWin.document.close(); 
}
}

var iedom=document.all||document.getElementById
var scrollspeed=0
var movestate=""

var actualwidth=''
var cross_scroll, ns_scroll
var loadedyes=0

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function creatediv(){
statusdiv=document.createElement("div")
statusdiv.setAttribute("id","statusdiv")
document.body.appendChild(statusdiv)
statusdiv=document.getElementById("statusdiv")
statusdiv.innerHTML=nomoremessage
}

function positiondiv(){
menuheight=parseInt(crossmain.offsetHeight)
mainobjoffsetH=getposOffset(crossmain, "top")
statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px"
statusdiv.style.top=menuheight+mainobjoffsetH+"px"
}

function showhidediv(what){
if (nomoremessage!="")
statusdiv.style.visibility=what
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function moveleft(){
if (loadedyes){
movestate="left"
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
showhidediv("hidden")
}
else
showhidediv("visible")
}
lefttime=setTimeout("moveleft()",10)
}

function moveright(){
if (loadedyes){
movestate="right"
if (iedom&&parseInt(cross_scroll.style.left)<0){
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
showhidediv("hidden")
}
else
showhidediv("visible")
}
righttime=setTimeout("moveright()",10)
}

function motionengine(e){
var dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft;
var dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop;
var curposy=window.event? event.clientX : e.clientX? e.clientX: ""
curposy-=mainobjoffset-dsocx
var leftbound=(menuwidth-restarea)/2
var rightbound=(menuwidth+restarea)/2
if (curposy>rightbound){
scrollspeed=(curposy-rightbound)/((menuwidth-restarea)/2) * maxspeed
if (window.righttime) clearTimeout(righttime)
if (movestate!="left") moveleft()
}
else if (curposy<leftbound){
scrollspeed=(leftbound-curposy)/((menuwidth-restarea)/2) * maxspeed
if (window.lefttime) clearTimeout(lefttime)
if (movestate!="right") moveright()
}
else
scrollspeed=0
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion(e){
if ((window.event&&!crossmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))){
if (window.lefttime) clearTimeout(lefttime)
if (window.righttime) clearTimeout(righttime)
movestate=""
}
}

function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("scrollbox") : document.all.scrollbox
menuwidth=parseInt(crossmain.style.width)
mainobjoffset=getposOffset(crossmain, "left")
cross_scroll=document.getElementById? document.getElementById("scrollpictures") : document.all.scrollpictures
actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("trueContainer").offsetWidth

crossmain.onmousemove=function(e){
motionengine(e)
}

crossmain.onmouseout=function(e){
stopmotion(e)
showhidediv("hidden")
}
}
loadedyes=1
if (nomoremessage!=""){
creatediv()
positiondiv()
}
}
window.onload=fillup

