﻿function $(objid)
{
	return document.getElementById(objid);
}
function skin(css){
	$("css").href="/css/" + css + ".css?t=201109301";
	writeCookie("css",css);
}
function writeCss(){
	try{
		var c = getCookie("css");		
		if(c!=null){
		document.writeln('<link rel="stylesheet" type="text/css" id="css" href="' + '/css/' + c + '.css?t=201006025' + '">');	
		}else{ document.writeln('<link rel="stylesheet" type="text/css" id="css" href="' + '/css/' + 'default' + '.css?t=201006025' + '">');	
		}
	}	
	catch(e){return;}			 
}
writeCss();

sfHover = function() {
	var sfEls = $("nav_menu").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className = (this.className ? this.className + " " : "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className = this.className.replace(/\s*?\bsfhover\b/, "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function S(id){
	$("mli"+id).className = "a2";
} 
function D(id){
	$("mli"+id).className = "a1";
} 

function writeCookie(name, value) 
{ 
	var expire = ""; 
	var hours = 365;
	expire = new Date((new Date()).getTime() + hours * 3600000); 
	expire = ";path=/; expires=" + expire.toGMTString(); 
	document.cookie = name + "=" + escape(value) + expire; 
}
function getCookie(name)
{
	var cname = name + "=";
	var dc = document.cookie;
	if (dc.length > 0) 
	{
		begin = dc.indexOf(cname);
		if (begin != -1) 
		{
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return dc.substring(begin, end);
		}
	}
	return null;
}
function bookmarksite(){
	if (document.all)
	window.external.addFavorite(document.location.href, document.title);
	else //if (window.sidebar)
	window.sidebar.addpanel(document.title, document.location.href, "")
}


//更改字体大小
var status0='';
var curfontsize=14;
var curlineheight=18;
//$('fontzoom').style.fontSize = '14px';
function fontZoomA(){
  if(curfontsize>8){
    $('fontzoom').style.fontSize=(--curfontsize)+'px';
	$('fontzoom').style.lineHeight=(--curlineheight)+'px';
  }
}
function fontZoomB(){
  if(curfontsize<64){
    $('fontzoom').style.fontSize=(++curfontsize)+'px';
	$('fontzoom').style.lineHeight=(++curlineheight)+'px';
  }
}
function Color(c){
$("art_left").style.background = c;
}

function doClick_list(o){
	 o.className="current";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=6;i++){
	   id ="soccer"+i;
	   j = $(id);
	   e = $("do_soccer"+i);
	   //alert(e);
	   if(id != o.id){
	   	 j.className="";
	   	 e.style.display = "none";
	   }else{
		e.style.display = "block";
	   }
	 }
	 }
	 
	 

