// JavaScript Document
var flag=false; 
function DrawImage(ImgD,mWidth,mHeight){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= mWidth/mHeight){ 
   if(image.width>mWidth){
    ImgD.width=mWidth; 
    ImgD.height=(image.height*mWidth)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
  } 
  else{ 
   if(image.height>mHeight){
    ImgD.height=mHeight; 
    ImgD.width=(image.width*mHeight)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   }  
  } 
 }
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
}
  
function woaicssq(num){
  for(var id = 1;id<=3;id++)
  {
  var Target_con="tab_list"+id;
  if(id==num)
  document.getElementById(Target_con).style.display="block";
  else
  document.getElementById(Target_con).style.display="none";
  }
  if(num==1) 
  document.getElementById("tabTitle1").className="tabTitle";
   else
  document.getElementById("tabTitle1").className=""
  if(num==2) 
  document.getElementById("tabTitle2").className="tabTitle";
   else
  document.getElementById("tabTitle2").className=""
  if(num==3) 
  document.getElementById("tabTitle3").className="tabTitle";
   else
  document.getElementById("tabTitle3").className=""
}