﻿


function show(d,img){
	tempImg=$("Imag");
	tempBox=$(d);
	tempImg.style.width="";
	tempBox.style.top=Math.max((document.body.clientHeight==document.body.offsetHeight?document.documentElement.scrollTop:document.body.scrollTop)+0,0)+"px";
    tempBox.style.display="";
	tempImg.onload=function(){
		if(tempImg.width>1000)tempImg.style.width="1000px";
		tempBox.style.top=Math.max((document.body.clientHeight==document.body.offsetHeight?document.documentElement.scrollTop:document.body.scrollTop)+Math.max(((document.body.clientHeight==document.body.offsetHeight?document.documentElement.clientHeight:document.body.clientHeight)-tempImg.height-4)/2,0),0)+"px";
	tempImg.onload=null;
	}
	tempImg.src=img;
	if(show.arguments[2]){$("picTxt").innerHTML=show.arguments[2];}
}

	
var leftmar=window.screen.width/2-300;
var tempBox;
var tempImg;
if(isNaN(leftmar))leftmar=250;
document.write("<div id='Layer999' style=\"position:absolute;display:none;width:100%;height:10px;text-align:center;padding:0;margin:0;z-index:99;border:0;left:0px;top:0px\"><table cellpadding=0 cellspacing=0 border=2 align=center bordercolor=#FFCC33><tr><td style='background:#fff;cursor:hand'><img id=Imag src='images/loading.gif' title='单击关闭' onclick=Imag.src='images/loading.gif';$('Layer999').style.display='none'></td></tr><tr style='background:#ff0;'><td><span id='picTxt' style='color:#00f'></span></td></tr></table></div>");


var zoomImg=$("endText").getElementsByTagName('img');
var dPu;
try{
dPu=$("navChannel").getElementsByTagName('a')[0].pathname.replace(/(.*\/){0,}([^\.]+.*)/ig,"$2");
}catch(e){}
function reloadimg(imgobj){
  imgobj.width=500;
  imgobj.style.cursor="pointer";
  imgobj.onclick=function(){
    show("Layer999",this.src,"ly7128.com");
  }
}
for(var i=0;i<zoomImg.length;i++){
  if(zoomImg[i].width>500)reloadimg(zoomImg[i]);
  zoomImg[i].onload=function(){if(this.width>500)reloadimg(this);}
}


/*---------------------------------------------------------------------------*/

var zfs=document.getElementById('endText');
function doZm(size){
var dzt=document.getElementById('dozm');
if (dzt.innerHTML=="大") {
	zfs.className=zfs.className.replace(/\bzoom.*?\b/ig,"")+" zoom16";
	dzt.innerHTML="中";dzt.style.fontSize=14+'px';
}
else {
	if (dzt.innerHTML=="中") {
		zfs.className=zfs.className.replace(/\bzoom.*?\b/ig,"")+" zoom14";
		dzt.innerHTML="小";
		dzt.style.fontSize=12+'px';
	}
		else  {
		zfs.className=zfs.className.replace(/\bzoom.*?\b/ig,"")+" zoom12";
			dzt.innerHTML="大";
		dzt.style.fontSize=16+'px';
		}
}
}


// 自动滚屏
var currentpos,timer; 
var BoE=document.body.clientHeight==document.body.offsetHeight?document.documentElement:document.body;
function initialize() { 
timer=setInterval("scrollwindow()",16); 
} 
function sc(){ 
clearInterval(timer); 
} 
function scrollwindow() {
currentpos=BoE.scrollTop; 
window.scroll(0,++currentpos); 
if(currentpos != BoE.scrollTop) 
sc(); 
} 
document.onmousedown=sc 
document.ondblclick=initialize
