function ajaxRequest(da,callback){
    $D.ajax(null,"t="+da,callback);
	};
var ay = ["请输入搜索内容"];
function searchEvent(){
	if(!$$("query")){return false};
	var obj = $$("query");
	obj.value = ay[0];
	obj.onmouseover = function(){
		this.focus();
		this.value= this.value==ay[0]? "":this.value;};
	obj.onmouseout = function(){
		this.blur();
		this.value = this.value==""? ay[0] : this.value;}
	$$("searchbtn").onclick=function(){
	var v = $S.trim($$("query").value);
	if(v.length==0 || v==ay[0] || v.length>15){$$("query").focus();$$("query").value=""; return false;};
	window.open("/search.html?time=0&query="+escape(v));}};
function queryEvent(){
	$(function() {
	  $('#querys').cycle({
	  fx:     'scrollUp',
	  timeout: 7000,
	  delay:  -2000});});};
function hotEvent(){
	$(function() {
	  $('#hnews').cycle({
	  fx:     'scrollUp',
	  timeout: 7000,
	  delay:  -2000});});};
function fontZoom(size){
  $$("ccontent").style.fontSize=size+'px';
  $A.forEach($T("p","ccontent"),function(o){o.style.fontSize = size + "px";});
};
function tbtab(dx,b)
{
	var bb ="t"+(b||"");
	$$(bb+"tabt1").className = "";
	$$(bb+"tabt2").className = "";
	$$(bb+"tabc1").style.display = "none";
	$$(bb+"tabc2").style.display = "none";
	$$(bb+"tabt"+dx).className = "on";
	$$(bb+"tabc"+dx).style.display = "block";
	};
function pichover(){
	$A.forEach($T("ul","piclist"),function(o){
		$T("img",o)[0].onmouseover=function(){
			this.style.background="#0FB1DD";
			};
		$T("img",o)[0].onmouseout=function(){
			this.style.background="#F9F9F9";
			};
	});};
function fixheight(){
	var cl= $D.eSize($$("clistl")).height,cr = $D.eSize($$("clistr")).height;
	$$("clistl").style.height = (cl<cr?cr:cl).toString() + "px";
	};
function listpart(){
	$A.forEach($T("li","listt"),function(o,i){
			if((i+1)%5==0){$D.setStyle(o,"padding-bottom","70px");
			if(i==($T("li","listt").length-1)){$D.setStyle(o,"border","none");
					  }}});
	};
function newview(id){
    ajaxRequest("z101&up=yes&id="+id,function(v){$$("sn_click").innerHTML=v;});
}
function pageview(id){
    ajaxRequest("z103&id="+id,null);
}
function oCopy(code){
	getCode("代码已经复制，请尽快做好我们的链接！",code);
	};
function getCode(tip,code){
    window.clipboardData.setData("Text",code);
  	if(tip != null)alert(tip);
};
function switchColor(){
var el= $$("contact");
if(el.className=="Cred")
    el.className="Cgrey";
else
    el.className="Cred";
setTimeout("switchColor()",300);
};
function linkhover(){
	$A.forEach($T("li",$$("flinks")),function(o){
				o.onmouseover=function(){this.className = "on";};
				o.onmouseout=function(){this.className = "";};
	});};