var StartTime=new Array("2010/02/7 00:00");//开始时间
var EndTime=new Array("2010/02/26 12:00");//结束时间
var width="960";//宽度
var height="600";//高度
var time="3000";//显示时间
var yun="0"//延迟加载
var src="http://www.hnmp.org.cn/images/newyear.swf";//广告地址

window.onerror = function(){
return true;
} 


//是否显示控制
aoyun_3 = 0;
//浮动控制开始
lastScrollYspe = 0;

function heartBeatspe(){  
	var diffYspe; 
	if (document.documentElement && document.documentElement.scrollTop) 
		diffYspe = document.documentElement.scrollTop; 
	else if (document.body) 
		diffYspe = document.body.scrollTop 
	else 
		{/*Netscape stuff*/}     
	percentspe=.1*(diffYspe-lastScrollYspe);  
	if(percentspe > 0)percentspe = Math.ceil(percentspe);  
	else percentspe = Math.floor(percentspe);

	if (typeof(aoyun_3)!='undefined') {
		document.getElementById("aoyunf").style.top = parseInt(document.getElementById("aoyunf").style.top) + percentspe + "px"; 

		document.getElementById("rightPart3").style.top = parseInt(document.getElementById("rightPart3").style.top) + percentspe + "px";

	}
    lastScrollYspe = lastScrollYspe + percentspe;  
}
//浮动控制结束
//预置主窗口

if (typeof(aoyun_3)!='undefined') {
	//document.writeln("<div id=\"aoyunf\" style=\"z-index:4001;position:absolute;visibility:visible;width:700px;height:450px;left:19%;top:68px;\"><\/div>");
	document.writeln("<div style=\"left:50%;position:absolute; \">");
	document.writeln("	<div id=\"aoyunf\" style=\"z-index:4001;position:absolute;visibility:visible;width:"+width+"px;height:"+height+"px;top:68px;left:-491px;filter: alpha(opacity=90);-moz-opacity:0.5;opacity: 0.5;\">");
	document.writeln("	<\/div>");
	document.writeln("<\/div>");
}
//预置右侧小窗口
if (typeof(aoyun_3)!='undefined') {
	suspendcodeRight3 = "<div id=\"rightPart3\" style='right:2px;position:absolute;top:410px;text-align:center;width:49px;height:60px;'></div>";
	document.write(suspendcodeRight3);
}
//定义主窗口内容
//var aoyuncontent="<img src='ad.jpg' width='982' height='419' border='0' usemap='#Map'><map name='Map'><area shape='rect' coords='916,2,979,22' onClick='aoyunflash()' style='cursor:hand;' href='#'></map>"
var aoyuncontent = " <div> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+"px height="+height+"px >";
aoyuncontent += "    <PARAM NAME=\"wmode\" value=\"transparent\">";
aoyuncontent += "　　<param name=\"movie\" value="+src+">";
aoyuncontent += "　　<param name=\"quality\" value=\"high\">";
aoyuncontent += "　　<embed src="+src+" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width="+width+"px height="+height+"px  wmode=\"transparent\" ><\/embed>";
aoyuncontent += "<\/object><div style='right:2px;position:absolute;top:10px;text-align:center;width:40px;height:20px;background:#fff;color:#f00;cursor:hand; line-height:20px;'><span onclick='aoyunflash();'>关闭</span></div></div>";
var aoyunsmallpic = "";

//FLASH显示完后执行此函数，函数调用FLASH中加入
function aoyunflash(){
	//document.getElementById("aoyunf").style.display='none';
	document.getElementById("aoyunf").innerHTML = "";
	if (typeof(aoyun_3)!='undefined') {
		document.getElementById("rightPart3").innerHTML = aoyunsmallpic;
	}
}
//显示主FLASH
function showaoyun_3(){
		document.getElementById("aoyunf").innerHTML = aoyuncontent;
}

var ST=new Date(StartTime);
var ET=new Date(EndTime);
var NT=new Date();

if((ST<=ET)&&(NT<ET)&&(NT>=ST)){
	
//延迟加载
setTimeout("showaoyun_3()",yun);
setTimeout("aoyunflash()",3000);
window.setInterval("heartBeatspe()",1);
}

/*
if (getCookie("aoyun_cookie") != "aoyun"){
	setTimeout("showaoyun_3()",3000);
	setCookie("aoyun_cookie","aoyun");
} else {
	aoyunflash();
}*/
//加载时调入浮动函数


