var flag=false; 
function DrawImage(ImgD,wid,hei){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= wid/hei){ 
   if(image.width>wid){
    ImgD.width=wid; 
    ImgD.height=(image.height*hei)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   /*ImgD.alt="bigpic"  */
  } 
  else{ 
   if(image.height>hei){
    ImgD.height=hei; 
    ImgD.width=(image.width*hei)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
    /*ImgD.alt="bigpic"  */ 
  } 
}
}


function chk(maxpage)
{
 if (parseInt(document.form2.pagenum.value)>maxpage||isNaN(document.form2.pagenum.value))
 {
  document.form2.pagenum.value=maxpage;
  return false;
  }
 else return true; 
}

function checklink()
{
 if (document.linkform.select1.value=="#")
 {return false;}
 else
 {window.open(document.linkform.select1.options[document.linkform.select1.selectedIndex].value);}
} 

document.write("<div id=tip style='position:absolute; width:130px;z-index:1;background-color: #000000; border: 1px solid #ffffff; overflow: visible;visibility: hidden;font-size:12px;padding:12px;color:#ffffff;filter:alpha(opacity=60);'></div>")
function showalt(w){
	if (w=="")return;
	var x=event.x;
	var y=event.y;
	tip.innerHTML=w + "<br>";
	tip.style.visibility="visible";
	tip.style.left=x-100;
	tip.style.pixelTop=y+document.body.scrollTop;
}
function hidealt(){
	tip.style.innerHTML=""
	tip.style.visibility="hidden";
}


