function swf(src,w,h){
	html = '';
	html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="main">';
	html += '<param name="allowScriptAccess" value="sameDomain" />';
	html += '<param name="movie" value="'+src+'" />';
	html += '<param name="quality" value="high" />';
	html += '<param name="wmode" value="transparent" />';
	html += '<embed src="main.swf" quality="high" bgcolor="#cc6600" width="'+w+'" height="'+h+'" name="main" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	html += '<\/object>';
	document.write(html);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function checklogin() {
	if (document.Loginform.UserName.value=="") {
		alert("请输入用户名!");
		Loginform.UserName.focus();
		return false;
	}
	if (document.Loginform.Password.value=="") {
		alert("请输入密码!");
		Loginform.Password.focus();
		return false;
	}
	return true;
}

/*按比例生成缩略图*/
function DrawImage(ImgD,W,H){ 
  var flag=false; 
  var image=new Image(); 
  image.src=ImgD.src; 
  if(image.width>0 && image.height>0){ 
    flag=true; 
    if(image.width/image.height>= W/H){ 
      if(image.width>W){
        ImgD.width=W; 
        ImgD.height=(image.height*H)/image.width; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt= ""; 
    } 
    else{ 
      if(image.height>H){
        ImgD.height=H; 
        ImgD.width=(image.width*W)/image.height; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt=""; 
    } 
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



/*QQ代码*/
suspendcode="<DIV id='lovexin1' style='Z-INDEX: 10; LEFT: 6px; POSITION: absolute; TOP: 105px; width:100px; height: 300px;'></DIV>"
document.write(suspendcode);
suspendcode="<DIV id='lovexin2' style='Z-INDEX: 10; LEFT: 896px; POSITION: absolute; TOP: 105px; width:105px; height: 300px;'><img src='images/close.gif' onClick='javascript:window.hide()' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'><table width='105' border='0' cellspacing='0' cellpadding='0'><tr><td><img src='images/qqtop.gif' width='105' height='42' /></td></tr><tr><td background='images/qqmid.gif'><table width='85%' border='0' align='center' cellpadding='0' cellspacing='5' style='margin-top:5px'><tr><td align='center'><a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1244788697&Site=www.plover.cn&Menu=yes'><img border='0' src='http://wpa.qq.com/pa?p=1:1244788697:5' alt='QQ Online' /></a></td></tr><tr><td align='center'><a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1272540108&Site=www.plover.cn&Menu=yes'><img border='0' src='http://wpa.qq.com/pa?p=1:1272540108:5' alt='QQ Online' /></a></td></tr><tr><td align='center' style='font-size:12px'>&nbsp;</td></tr><tr><td align='center' style='font-size:12px; color:#FF0000'>咨询热线</td></tr><tr><td align='center' style='font-size:12px;color:#FF0000'>020-86267771</td></tr><tr><td align='center' style='font-size:12px;color:#FF0000'>020-86196338</td></tr><tr><td align='center' style='font-size:12px;color:#FF0000'>020-86267175</td></tr><tr><td align='center' style='font-size:12px;color:#FF0000'>020-36331497</td></tr></table></td></tr><tr><td><img src='images/qqbot.gif' width='105' height='13' /></td></tr></table></DIV>"
document.write(suspendcode);

//flash格式调用方法
//<EMBED src='flash.swf' quality=high  WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=ad wmode=opaque></EMBED>

lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin1.style.pixelTop+=percent;
document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()  
{   
lovexin1.style.visibility="hidden"; 
lovexin2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);
/*QQ代码 end*/
