function $(){
return document.getElementById($.arguments[0])
}
var arkMaxWidth=500;
var arkMaxHeight=10000;
var tempW,tempH;
var zoomImg;
var arkTop;
function reloadimg(imgobj){
  imgobj.title="Zoom out by click";
  if(imgobj.width>arkMaxWidth){tempW=imgobj.width;tempH=imgobj.height;imgobj.width=arkMaxWidth;}
  if(imgobj.height>arkMaxHeight){
    tempH=imgobj.height;
    imgobj.height=arkMaxHeight;
    imgobj.width=imgobj.width*(arkMaxHeight/tempH);}
  try{imgobj.style.cursor="pointer";}catch(e){imgobj.style.cursor="hand";}
  imgobj.onclick=function(){
	  if(imgobj.style.position!="absolute"){
		 arkTop=document.documentElement.scrollTop; 
	  try{
		 if(arkTop<document.body.scrollTop)
		 	arkTop=document.body.scrollTop;
		  }catch(e2){}
	  var oNewNode = document.createElement("DIV");
	  oNewNode.style.height=imgobj.height+"px";
	  oNewNode.style.overflow="hidden";
	  imgobj.parentNode.insertBefore(oNewNode,imgobj.nextSibling);
	  imgobj.style.position="absolute";
	  imgobj.style.border="3px solid #333333";
	  imgobj.width=tempW;
	  var oNewNode1 = document.createElement("DIV");
	  oNewNode1.style.cssText="filter:alpha(opacity=50);opacity:0.5;background:#000;";
	  oNewNode1.style.height=Math.max(document.documentElement.clientHeight,tempH+6)+"px";
	  oNewNode1.style.width=Math.max(document.documentElement.clientWidth,tempW+6)+"px";
	  oNewNode1.style.overflow="hidden";
	  oNewNode1.style.left=0;
	  oNewNode1.style.top=arkTop+"px";
	  oNewNode1.style.position="absolute";
	  oNewNode1.style.zIndex=3;
	  imgobj.parentNode.insertBefore(oNewNode1,imgobj.nextSibling);
	  imgobj.title="Close by click";
	  imgobj.style.top=Math.max(arkTop+Math.max((document.documentElement.clientHeight-imgobj.height-4)/2,0),0)+"px";
	  imgobj.style.left=Math.max(document.documentElement.scrollLeft+Math.max((document.documentElement.clientWidth-imgobj.width-4)/2,0),0)+"px";
	  imgobj.style.zIndex=99;
	  }
	  else{
	  imgobj.parentNode.removeChild(imgobj.nextSibling);
	  imgobj.parentNode.removeChild(imgobj.nextSibling);
	  imgobj.style.position="relative";
	  imgobj.style.border="0px solid #333333";
	  imgobj.width=arkMaxWidth;
	  imgobj.title="Zoom out by click";
	  imgobj.style.top=0;
	  imgobj.style.left=0;
	  imgobj.style.zIndex=0;
		  }
  }
}
function reImg(){
zoomImg=$("endText").getElementsByTagName('img');
for(var i=0;i<zoomImg.length;i++){
  if(zoomImg[i].width>arkMaxWidth||zoomImg[i].height>arkMaxHeight)reloadimg(zoomImg[i]);
  zoomImg[i].onload=function(){if(this.width>arkMaxWidth||this.height>arkMaxHeight)reloadimg(this);}
}
}