// QQ:386196596



function cb(obj, isOver){
	if(obj.getAttribute("btnstatus")=="active")return;
	obj.src= isOver ? obj.src.replace(".jpg","Over.jpg") : obj.src.replace("Over.jpg",".jpg");
}


//part
function blank(obj,str){
	if(str=="")
	obj.value="";
	else
	obj.value=str;
}
function re(obj,str){
	obj.value=str;
}
function change(obj,path){
	obj.src=path;

}

/*======展开折叠菜单======*/
 function showMenu(obj){
	 var e = document.getElementById(obj);
	 if(e.style.display=="none"){
	 	e.style.display="block";
	 }else{
		 e.style.display="none";
	 }
 }

/*======导航下拉菜单=========*/
  function displaySubMenu(li) {
	  var subMenu = li.getElementsByTagName("ul")[0];
	  subMenu.style.display = "block";
  }
  function hideSubMenu(li) {
	  var subMenu = li.getElementsByTagName("ul")[0];
	  subMenu.style.display = "none";
  }



/*禁止复制=========================================== */

function onKeyDown()
{
	if ((event.keyCode==116)||(window.event.ctrlKey)||(window.event.shiftKey)||(event.keyCode==122))
	{
	event.keyCode=0;
	event.returnValue=false;
	}
}

function yxl() { 
if(window.event.altKey) 
{
window.event.returnValue=false;
}
}
document.onkeydown=yxl 



/*==过滤HTML=======================================*/
function reStr(s){
   s=s||"";
return s.replace(/\<.*?\>/gi,"").replace(/\<\/.*?\>/gi,"").replace(/\&nbsp\;/gi,"");
			}
			
/*====reSizeImage 重绘图==========================================形*/
function  reSizeImage(ImgObj, reWidth, reHeight){
	reWidth = reWidth || 300; reHeight=reHeight || 260;
	var image=new  Image(); image.src=ImgObj.src;
	if(image.width>0 && image.height>0){
		if(image.width / image.height >=  reWidth / reHeight){
			if(image.width > reWidth){
				ImgObj.width  = reWidth;
				ImgObj.height = (image.height * reWidth) / image.width;
			}else{
				 ImgObj.width = image.width;
				 ImgObj.height= image.height;
			}
        }else{
			if(image.height > reHeight){
				ImgObj.height =reHeight;
				ImgObj.width  =(image.width*reHeight) / image.height;
				}else{
					ImgObj.width  =image.width;
					ImgObj.height =image.height;
			}
		}
	}
}

/*
var ABC=getScroll();
返回结果，主要使用下面2个：
ABC.t  纵向滚动条距离顶部的位置
ABC.l  横向滚动条距离左边的位置 
*/
function getScroll() {
var t, l, w, h;
if (document.documentElement && document.documentElement.scrollTop) {
t = document.documentElement.scrollTop;
l = document.documentElement.scrollLeft;
w = document.documentElement.scrollWidth;
h = document.documentElement.scrollHeight;
}
else if (document.body) {
t = document.body.scrollTop;
l = document.body.scrollLeft;
w = document.body.scrollWidth;
h = document.body.scrollHeight;
}
return { t: t, l: l, w: w, h: h };
}



