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 winopen()
{
window.open("http://www.liangjing.org/Copyright.html","search","dialogWidth:680px; dialogHeight:500px; status:0");
}


