//鼠标放上去改变背景图颜色
//调用：onmouseover="ann_r(this);" onmouseout="ann_c(this);" onmousedown="ann_x(this);" onmouseup="ann_r(this);"
function ann_r(zzo)	
{
zzo.style.filter = "";
zzo.style.filter = "light()";
zzo.filters.light.addAmbient(53,168,248,100);
}

function ann_c(zzo)	
{
 zzo.style.filter = "";
}

function ann_x(zzo)	
{
 zzo.style.filter = "";
 zzo.style.filter = "light()";
 zzo.filters.light.addAmbient(95,179,5,100);
}
//用户头像
function showimg(userid,imgstr)
{
	if(userid=='')
	{
		window.document.write('');
	}
	else
	{
		window.document.write(imgstr);
	}
}
function showdel(a,b,c)
{
	if(a == b)
	{
		window.document.write(c);
	}
	else
	{
	    window.document.write('');
	}
}


function bpic()
{
	var ap=document.getElementById("image1").getElementsByTagName("img");


for(var i=0;i<ap.length;i++)
	{
		if(ap[i].offsetWidth>700)
		{
			ap[i].style.width=700;
		}
	}	
}

//自动缩放Iframe
function toppage()
{
	if (self.location!=top.location)
	{
	parent.document.all(self.name).height = document.body.scrollHeight + 30;
	parent.document.all(self.name).width = document.body.scrollWidth;
	//parent.document.all(self.name).width = document.body.scrollWidth + 30;
	}
	}
	function window.onload()
	{
	//	bpic();
		toppage();
		
	if (self.location!=top.location)
	{
	window.resizeTo(document.body.scrollWidth,document.body.scrollHeight);
	}
}

_gObj = function(id) {
	return document.getElementById(id);
}
function getCookie(name) {
	var nameEQ = name + '=';
	var ca = document.cookie.split(';');
	for(var i=0; i<ca.length; i++) {
		var c = ca[i];
		while (c.charAt(0) == ' ') c = c.substring(1, c.length);
		if (c.indexOf(nameEQ) == 0) {if(name=="nickname"){return decodeURI(c.substring(nameEQ.length, c.length));}else{return c.substring(nameEQ.length, c.length);}}
	}
	return null;
}

function getCookies(name)
//获得Cookie的原始值
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return GetCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function GetCookieVal(offset)
//获得Cookie解码后的值
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return decodeURI(document.cookie.substring(offset, endstr));
}

function DecodeCookie(str){
	var strArr; 
　	var strRtn=""; 

　	strArr=str.split("a"); 

　	for (var i=strArr.length-1;i>=0;i--){
　		strRtn+=String.fromCharCode(eval(strArr)); 
	}

　return strRtn; 
} 

