
/*----------------第一视频相关js --------------*/
function closefloat(){
	document.getElementById("vodone").style.display='none';
}
var vodtime=60;
var ivod;
var vodthis;
var cookieString = new String(document.cookie);
var cookieHeader = "myvod=";
var beginPosition = cookieString.indexOf(cookieHeader);
if (beginPosition != -1){
	var newcvalue = new Number(cookieString.substring(beginPosition + cookieHeader.length))+1;
}
else{
	var newcvalue=1;
}
for(ivod=1;ivod<=vodtime;ivod++) {
	setTimeout("myupdate("+ivod+")",ivod*1000);
}
function myupdate(vodnum) {
	if(vodnum==vodtime) {
	
		SetCookie("myvod",newcvalue);
		/*-document.getElementById("mycookie").innerHTML = newcvalue;	*/
		document.getElementById("vodstatus").innerHTML='<b style="cursor:pointer" onClick="closefloat()">× 关闭</b>';
	}
	else {
		if (newcvalue<5){
			vodthis=vodtime-vodnum;
			document.getElementById("vodstatus").innerHTML="第一视频广告展示";
			
	/*-		document.getElementById("vodstatus").innerHTML="第一视频广告展示 ("+vodthis+")";	*/
		}
		else{
			window.onload=closevod();
		}
	}
}
function closevod(){
	/*-	document.getElementById("vodone").style.display="none"; */
	document.getElementById("vodstatus").innerHTML='<b style="cursor:pointer" onClick="closefloat()">× 关闭</b>';
}
function SetCookie(name,value){
	var mymin = 15;
	var exp = new Date();
	exp.setTime(exp.getTime() + mymin*60*1000);
	document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}

/*-------Flash加载相关----------*/
function killErrors() {
	return true;
}
window.onerror = killErrors;

window.onload=function(){
var o=document.getElementById('hotzone');
window.setInterval(function(){scrollup(o,20,0);},3000);
}
function scrollup(o,d,c){
if(d==c){
	var t=o.firstChild.cloneNode(true);
	o.removeChild(o.firstChild);
	o.appendChild(t);
	t.style.marginTop=o.firstChild.style.marginTop='0px';
	}
else{
	var s=3,c=c+s,l=(c>=d?c-d:0);
	o.firstChild.style.marginTop=-c+l+'px';
	window.setTimeout(function(){scrollup(o,d,c-l)},100);
	}
}
/*----------------Tags标签转utf-8-----------------*/
var w=document.ss.keywords;
function s(o){
	if(w.value.length>0){
		var h=o.href;
		var q=encodeURIComponent(w.value);
		if(h.indexOf("q=")!=-1){
			o.href=h.replace(new RegExp("q=[^&$]*"),"q="+q)
			}
		else{
			o.href+="?q="+q
			}
	}
};
(function(){
	if(new RegExp("q=([^&]+)").test(location.search)){
		w.value=decodeURIComponent(RegExp.$1)
	}
})();
window.onunload=function(){};
/*----------------Tags标签转utf-8 End--------------*/