﻿

/*-------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--------------*/


//Ajax Post 数据并返回值 --------------------------------------------------------------------------------------------------------
function mypost(Url, Args){
var xmlhttp;
var error;
eval('try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {xmlhttp = null;error=e;}');
if(null != xmlhttp){
	xmlhttp.Open("POST", Url, false);
	xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlhttp.Send(Args);
	strText = xmlhttp.responseText;
	// if our response starts with http than redirect there
	if ( strText != null && strText.toLowerCase().indexOf("http") == 0 ){
		location.href = strText;
	}
}
else
	{location.href = c_errorUrl;}
	return strText;
}
