var flag=false; 
function DrawImage(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
	//alert(ImgD.width);
	if(image.width>0 && image.height>0){ 
	   flag=true; 
		if(image.width>image.height){
		 ImgD.width=140;
		 bili=image.width/140;
		 ImgD.height=image.height/bili; 
		}else{ 
		 ImgD.height=140; 
		 bili=image.height/140;
		 ImgD.width=image.width/bili;
		} 
	}
	/*
	*/
}
function DrawImage1(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
	//alert(ImgD.width);
	if(image.width>0 && image.height>0){ 
	   flag=true; 
		if(image.width>image.height){
		 ImgD.width=110;
		 bili=image.width/110;
		 ImgD.height=image.height/bili; 
		}else{ 
		 ImgD.height=110; 
		 bili=image.height/110;
		 ImgD.width=image.width/bili;
		} 
	}
	/*
	*/
}
function DrawImage2(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
	//alert(ImgD.width);
	if(image.width>0 && image.height>0){ 
	   flag=true; 
		if(image.width>image.height){
		 ImgD.width=260;
		 bili=image.width/260;
		 ImgD.height=image.height/bili; 
		}else{ 
		 ImgD.height=260; 
		 bili=image.height/260;
		 ImgD.width=image.width/bili;
		} 
	}
	/*
	*/
}


//top ajax
function InitAjax(){ 
      var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        var s;
        (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
        (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
        (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
        (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
        (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

        //以下进行测试
        if (Sys.ie){
		ajax= new ActiveXObject("MSXML2.XMLHTTP");
		}else{
		ajax= new XMLHttpRequest();
		}
return ajax;
}

function divlp(va){
//alert(va);
xshow=document.getElementById("bn2");
xshow.style.display='block';
xshow.innerHTML="loading...";
url="div";
url=url+"lp.";
url=url+"as";
url=url+"p";
url=url+"?";
url=url+"b";
url=url+"n="+va;
var ajax=InitAjax();
ajax.open("GET",url,true);
ajax.send(null);
ajax.onreadystatechange=function(){
	if(ajax.readyState==4 && ajax.status==200){
		xshow.innerHTML=ajax.responseText;
		}
	}
}

function aa(xx){xx.style.backgroundColor="red";xx.style.color="white";kai()}
function bb(xx){xx.style.backgroundColor="";xx.style.color="";}
function cc(xx){document.getElementById("bn").value=xx.innerText;
				guan();
				document.getElementById("button").click();
				}

function kai(){document.getElementById("bnspan").style.display="block";}
function guan(){document.getElementById("bnspan").style.display="none";}
//liuyan
function ly(x){
if(x==1){k="留言"}
if(x==2){k="意见建议"}
if(x==3){k="投诉"}
if(x==4){k="批评指正"}
var winw=400;
var winh=300;
var gao=(window.screen.availHeight-winh)/2;
var kuan=(window.screen.availWidth-winw)/2;
window.open("liuyan/tjchang.asp?k="+k,"_blank",'left='+kuan+',top='+gao+',meanubar=no,scrollbars=no,width='+winw+',height='+winh);
}