function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
var flag=false;
function suotu(ImgD,wid,hgt){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= wid/hgt){
if(image.width>wid){
ImgD.width=wid;
ImgD.height=(image.height*wid)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
//ImgD.alt=image.width+"x"+image.height;
}
else{
if(image.height>hgt){
ImgD.height=hgt;
ImgD.width=(image.width*hgt)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
//ImgD.alt=image.width+"x"+image.height;
}
}
}
function checklsend(){
 var tl=document.loginuser;	
 if(tl.zhanghao.value==''){
	alert("请输入用户名");
	tl.zhanghao.focus();
	return false;
 }
 if(tl.mima.value==''){
	alert("请输入密码");
	tl.mima.focus();
	return false;
 }
 if(tl.yzma.value==''){
	alert("请输入验证码");
	tl.yzma.focus();
	return false;
 }
 return true;
}
function showmmbg(tdid,totalnums,bgimg1,bgimg2){
 for(de=1;de<=totalnums;de++){
  if(de==tdid){
   document.getElementById("kaka"+de).style.backgroundImage='url('+bgimg1+')';
  }else{
   document.getElementById("kaka"+de).style.backgroundImage='url('+bgimg2+')';
  }
 }
}
function showmmsm(tid,ttnum){
 for(qqs=1;qqs<=ttnum;qqs++){
  if(qqs==tid){
   document.getElementById("koko"+qqs).style.display="";
  }else{
   document.getElementById("koko"+qqs).style.display="none";
  }
 }
}
function zoomimg(){
 new imageZoom("dd2",{mul:2});
}
function showheadimg(headimg) 
{
var headimg=headimg;
 dd2.src=headimg;
} 
function showbg(nnn){
 for(qq=1;qq<=3;qq++){
  if(qq==nnn){
   document.getElementById("n"+qq).style.backgroundImage='url(image/hover_tab2.gif)';
  }else{
   document.getElementById("n"+qq).style.backgroundImage='url(image/normal_tab2.gif)';
  }
 }
}
function showsm(mmm){
 for(q=1;q<=3;q++){
  if(q==mmm){
   document.getElementById("m"+q).style.display="";
  }else{
   document.getElementById("m"+q).style.display="none";
  }
 }
}
