var isIE = (document.all && window.ActiveXObject && !window.opera) ? true : false;
function Fav() {
	isIE ? window.external.addFavorite(window.location,document.title) : window.sidebar.addPanel(document.title, window.location, '');
}
function mover(id, s) {
	var s = s ? true : false;
	try{
	$('t_'+id).className='mover';
	if(!s) $('s_'+id).className='sover';
	} catch(e) {}
}
function mout(id) {
	try{
	$('s_'+id).className='sout';
	} catch(e) {}
}
function setCookie(name, value)		//cookiesÉèÖÃ
{
	var argv = setCookie.arguments;
	var argc = setCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	if(expires!=null)
	{
		var LargeExpDate = new Date ();
		LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));
	}
	document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString()));
}

function getCookie(Name)			//cookies¶ÁÈ¡
{
	var search = Name + "="
	if(document.cookie.length > 0) 
	{
		offset = document.cookie.indexOf(search)
		if(offset != -1) 
		{
			offset += search.length
			end = document.cookie.indexOf(";", offset)
			if(end == -1) end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		 }
	else return ""
	  }
}
var reve_colors = ['#FFFFFF','#A7D24F','#F9B43B','#F3734C','#BB5EAF','#8D9AC7'];
var bg_color = getCookie('reve_color');
if(!bg_color) bg_color = 0;
function showColor() {
	for(var i=0;i<6;i++) {
		$('color_'+i).style.backgroundColor = reve_colors[i];
	}
	try{
		$('color_'+bg_color).className = 'cl_s cl_s_on';
		document.body.style.backgroundColor = reve_colors[bg_color];
	}catch(e){}
}
function setColor(id) {
	if(id == bg_color) return;
	setCookie('reve_color', id);
	try{
		$('color_'+bg_color).className = 'cl_s';
		bg_color = id;
		$('color_'+id).className = 'cl_s cl_s_on';
		document.body.style.backgroundColor = reve_colors[id];
	}catch(e){}
}
