var flag=false; 


function DrawImage(ImgD)
{var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0)
   {flag=true; 
    if(image.width/image.height>= 105/80){ 
       if(image.width>105){
          ImgD.width=105; 
          ImgD.height=(image.height*105)/image.width;}
	   else{ 
          ImgD.width=image.width;
          ImgD.height=image.height;}
       } 
    else{ 
       if(image.height>80){
          ImgD.height=80; 
          ImgD.width=(image.width*80)/image.height;}
	   else{ 
          ImgD.width=image.width;
          ImgD.height=image.height;}
       } 
   }
}

function DrawImage2(ImgD)
{
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0)
   {
    if(image.width/image.height>= 110/100)
	  { 
          ImgD.width=110; 
          ImgD.height=(image.height*110)/image.width;
       } 
    else
	  { 
          ImgD.height=100; 
          ImgD.width=(image.width*100)/image.height;
       }
    }
}



<!--
var bannerAD=new Array();
var bannerADlink=new Array();
var bannerADtext=new Array();
var adNum=0;
bannerAD[0]="img/311A.jpg";
bannerAD[1]="img/EX2000.jpg";
bannerAD[2]="img/ph510.jpg";
bannerAD[3]="img/T40.jpg";

var preloadedimages=new Array();
for (i=1;i<4;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=bannerAD[i];
}

function setTransition(){
if (document.all){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bannerADrotator.filters.revealTrans.apply();
}
}

function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()
}

function nextAd(){
if(adNum<bannerAD.length-1)adNum++ ;
else adNum=0;
setTransition();
document.images.bannerADrotator.src=bannerAD[adNum];

playTransition();
theTimer=setTimeout("nextAd()", 4000);
}

function jump2url(){
jumpUrl=bannerADlink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
}
function displayStatusMsg() { 
status=bannerADlink[adNum];
document.returnValue = true;
clearInterval(theTimer)
}

var x = 50,y = 60
var xin = true, yin = true
var step = 1 
var delay = 10
var obj=document.getElementById("ad") 
function floatAD() {
var L=T=0
var R= document.body.clientWidth-obj.offsetWidth
var B = document.body.clientHeight-obj.offsetHeight
obj.style.left = x + document.body.scrollLeft
obj.style.top = y + document.body.scrollTop
x = x + step*(xin?1:-1) 
if (x < L) { xin = true; x = L} 
if (x > R){ xin = false; x = R} 
y = y + step*(yin?1:-1) 
if (y < T) { yin = true; y = T } 
if (y > B) { yin = false; y = B } 
}
var itl= setInterval("floatAD()", delay) 
obj.onmouseover=function(){clearInterval(itl)} 
obj.onmouseout=function(){itl=setInterval("floatAD()", delay)}


var Picspeed=15
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetHeight-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
}
var MyMar1=setInterval(Marquee1,Picspeed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,Picspeed)}



function check(){
if (document.form1.seaname.value=="" ){
alert("ÇëÊäÈëËÑË÷µÄÄÚÈÝ")
return false
}
return true
}
