//author :xiaobo
//last modify 2011-11-15
function check()
{
if(document.search.keyword.value.length==0){
     alert("请输入查询信息！");
     document.search.keyword.focus();
     return false;
    }

}




function XiaoboPrintFlash(FlashUrl,width,height,files,links)
{
var swf_width=width
var swf_height=height
var files=files
var links=links
var texts=''
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=Response.Write "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value='+FlashUrl+'><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'">');
document.write('<embed src='+FlashUrl+' wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); 
document.write('</object>');
}
var prev;
function showCon(obj) {
    if (prev != null) {
        document.getElementById("con" + prev).style.display = "none";
        document.getElementById("m" + prev).className = "pa";
    }
    document.getElementById("con" + obj).style.display = "block";
    document.getElementById("m" + obj).className = "paA";
    prev = obj;
}

function DrawImage(MyPic,W,H){
  var flag=false;
  var image=new Image();
  image.src=MyPic.src;
  if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= W/H){
      if(image.width>W){
        MyPic.width=W;
        MyPic.height=(image.height*W)/image.width;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
    else{
      if(image.height>H){
        MyPic.height=H;
        MyPic.width=(image.width*H)/image.height;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
  }
}
function refreshimg()
{
	
document.getElementById("checkcodes").src="Include/CheckCode/CheckCode.Asp?seed="+Math.random();
}

function refreshimgs()
{
	
document.getElementById("checkcodes").src="../Include/CheckCode/CheckCode.Asp?seed="+Math.random();
}

function winopen()
{
window.open("http://www.liangjing.org/Copyright.html","search","dialogWidth:680px; dialogHeight:500px; status:0");
}
/* 更换显示样式*/
function setTab(m,n){
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("ul");
 for(i=0;i<tli.length;i++){
  tli[i].className=i==n?"hover":"";
  mli[i].style.display=i==n?"block":"none";
 }
}




