﻿function $(objid)
{
	return document.getElementById(objid);
}
function skin(css){
	$("css").href="/skins/" + css + ".css?t=201006025";
	writeCookie("css",css);
}
function writeCss(){
	try{
		var c = getCookie("css");		
		if(c!=null){
		document.writeln('<link rel="stylesheet" type="text/css" id="css" href="' + '/skins/' + c + '.css?t=201006025' + '">');	
		}
	}	
	catch(e){return;}			 
}
writeCss();

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;
}

