function Stylecss(div1,div2)
{
var obj1,obj2;
obj1=document.getElementById(div1);
obj2=document.getElementById(div2);
if(obj1.innerText=="关闭↓式样")
	{obj1.innerText="自定义风格";
	obj2.innerHTML="";
	}
else
	{obj1.innerText="关闭↓式样";
		str="<table Class=TableTop border=0 cellpadding=0 cellspacing=0><tr> ";
		str+="<td class=TableTop_Left>&nbsp;</td>";
		str+="<td height=30 align=right>";
		str+="<table Class=TableTop_Right1 border=0 cellspacing=2 cellpadding=0><tr> ";
		str+="<td width=100 height=20 align=center>&nbsp;</td><td width=100 align=center>&nbsp;</td>";
		str+="<td width=100 align=center bgcolor=8691B7><a href=javascript:GetStyle(2)><u><font color=#FFFFFF>风花雪影</font></u></a></td>";
		str+="<td width=100 align=center bgcolor=FF9900><a href=javascript:GetStyle(1)><u><font color=#FFFFFF>心舞飞扬</font></u></a></td>";
		str+="<td width=100 align=center bgcolor=#7BAA00><a href=javascript:GetStyle(3)><u><font color=#FFFFFF>馨香一瓣</font></u></a></td>";
		str+="<td width=100 align=center bgcolor=#FF99CC><a href=javascript:GetStyle(4)><u><font color=#FFFFFF>一帘幽梦</font></u></a></td>";
		str+="<td width=50 align=center bgcolor=#D2D5C6><a href=javascript:GetStyle(5)><u><font color=#FFFFFF>简单</font></u></a></td>";
		str+="<td align=center>&nbsp;</td></tr><tr> ";
		str+="<td height=1 colspan=2 ></td><td height=1 bgcolor=#666666></td><td height=1 bgcolor=#FF9900></td><td height=1 bgcolor=#7BAA00></td><td height=1 bgcolor=#FF99CC></td><td height=1 bgcolor=#999999></td><td height=1></td>";
		str+="</tr></table></td></tr></table>";
	obj2.innerHTML=str;
	}
}

function Stylesys(div1,div2)
{
var obj1,obj2;
obj1=document.getElementById(div1);
obj2=document.getElementById(div2);
if(obj1.innerText=="隐藏菜单")
	{obj1.innerText="导航菜单";
	obj2.innerHTML="";
	}
else
	{obj1.innerText="隐藏菜单";
		str="<table Class=TableTop border=0 cellpadding=0 cellspacing=0>";
		str+="<tr><td class=TableTop_Left>&nbsp;</td><td height=30 align=right><table Class=TableTop_Right1 border=0 cellspacing=2 cellpadding=0>";
		str+="<tr><td width=100 height=20 align=center>&nbsp;</td><td width=100 align=center>&nbsp;</td><td width=100 align=center>&nbsp;</td>";
		str+="<td width=304 align=center Class=TableGsbookRe><a id=tips4 href=javascript:StyleSearch('tips4','dsp2');>留言搜索</a> | <a href=Index_Title.asp>转到列表导航</a> | <a href=Inc/Config.Xml Target=_Blank>参数列表</a> | <a href=javascript:bookmark() target=_self>添加到收藏夹</a></td>";
		str+="<td align=center>&nbsp;</td></tr><tr><td height=1 colspan=3 ></td><td height=1 Class=TableGsbookRe></td><td height=1></td>";
		str+="</tr></table></td></tr></table>";
	obj2.innerHTML=str;
	}
}

function StyleSearch(div1,div2)
{
var obj1,obj2;
obj1=document.getElementById(div1);
obj2=document.getElementById(div2);
if(obj1.innerText=="隐藏搜索")
	{obj1.innerText="留言搜索";
	obj2.innerHTML="";
	}
else
	{obj1.innerText="隐藏搜索";
		str="<table Class=TableTop border=0 cellpadding=0 cellspacing=0><tr> ";
		str+="<td class=TableTop_Left>&nbsp;</td>";
		str+="<td height=30 align=right>";
		str+="<table Class=TableTop_Right1 border=0 cellspacing=2 cellpadding=0><form name=form1 method=post action=Search.asp Target=_self><tr> ";
		str+="<td width=100 height=30 align=center>&nbsp;</td><td width=100 align=center>&nbsp;</td>";
		str+="<td width=400 align=center>搜索关键字: <input name=KeyWord type=text size=20 maxlength=20 Class=Put> &nbsp;<select name=SearchMode Class=Put><option value=title>按标题</option><option value=author>按作者</option><option value=content>按内容</option></select> &nbsp;<input type=submit name=Submit value='=> Search' class=put2></td>";
		str+="<td align=center>&nbsp;</td></tr></form>";
		str+="</table></td></tr></table>";
	obj2.innerHTML=str;
	}
}


function StyleDelRe(div1,div2,author,ip)
{
var obj1,obj2;
obj1=document.getElementById(div1);
obj2=document.getElementById(div2);
if(obj1.innerText=="->关闭选项..")
	{obj1.innerText="->更多选择..";
	obj2.innerHTML="";
	}
else
	{obj1.innerText="->关闭选项..";
		str="<table width=100% border=0 cellspacing=0 cellpadding=0><td height=8></td>";
		str+="<tr><td height=2 bgcolor=#F20000></td></tr>";
		str+="<tr><td height=8></td></tr><tr> ";
		str+="<td><input type=radio name=DelAuthors value=2>";
		str+="同时删除<font color=#0000FF>["+author+"]</font>的<font color=#FF0000>所有</font>留言(不含回复)<br> ";
		str+="<input type=radio name=DelAuthors value=3>";
		str+="同时删除<font color=#0000FF>["+author+"]</font>的<font color=#FF0000>所有</font>回复<br> ";
		str+="<input type=radio name=DelAuthors value=4>";
		str+="同时删除<font color=#0000FF>["+author+"]</font>的<font color=#FF0000>在本下的所有</font>回复 ";
		str+="<br> <input type=radio name=DelIps value=2>";
		str+="同时删除IP<font color=#0000FF>["+ip+"]</font>的<font color=#FF0000>所有</font>留言(不含回复)<br> ";
		str+="<input type=radio name=DelIps value=3>";
		str+="同时删除IP<font color=#0000FF>["+ip+"]</font>的<font color=#FF0000>所有</font>回复<br> ";
		str+="<input type=radio name=DelIps value=4>";
		str+="同时删除IP<font color=#0000FF>["+ip+"]</font>的<font color=#FF0000>在本留言下的所有</font>回复</td></tr></table>";
	obj2.innerHTML=str;
	}
}


function Styleubb(div1,div2)
{
var obj1,obj2;
obj1=document.getElementById(div1);
obj2=document.getElementById(div2);
if(obj1.innerText=="隐藏UBB说明")
	{obj1.innerText="UBB使用说明";
	obj2.innerHTML="";
	}
else
	{obj1.innerText="隐藏UBB说明";
	str="<table width=95% border=0 align=center cellpadding=0 cellspacing=0>";
	str+="<tr>";
	str+="<td><p>使用链接：<font color=#0000FF>[url]</font>链接地址<font color=#0000FF>[/url]</font>或<font color=#0000FF>[url=链接地址]</font>链接名称<font color=#0000FF>[/url]</font><br>";
	str+="邮箱地址：<font color=#0000FF>[email=邮箱地址]</font>邮箱名称<font color=#0000FF>[/email]</font><br>";
	str+="图片信息：<font color=#0000FF>[img]</font>图片地址<font color=#0000FF>[/img]</font><br>";
	str+="引用显示：<font color=#0000FF>[code]</font>引用内容<font color=#0000FF>[/code]</font>或<font color=#0000FF>[quote]</font>引用内容<font color=#0000FF>[/quote]</font><br>";
	str+="字体颜色：<font color=#0000FF>[color=颜色代码]</font>文本内容<font color=#0000FF>[/color]</font><br>";
	str+="字体背景：<font color=#0000FF>[span=字体背景颜色,字体颜色]</font>文本内容<font color=#0000FF>[/span]</font><br>";
	str+="光晕文字：<font color=#0000FF>[glow=宽度(数字),颜色,边界(数字)]</font>文本内容<font color=#0000FF>[/glow]</font><br>";
	str+="居中显示： <font color=#0000FF>[center]</font>文本内容<font color=#0000FF>[/center]</font><br>";
	str+="飞翔文字：<font color=#0000FF>[fly]</font>文本内容<font color=#0000FF>[/fly]</font><br>";
	str+="移动文字：<font color=#0000FF>[move]</font>文本内容<font color=#0000FF>[/move]</font><br>";
	str+="斜 体 字：<font color=#0000FF>[i]</font>文本内容<font color=#0000FF>[/i]</font><br>";
	str+="加粗字体：<font color=#0000FF>[b]</font>文本内容<font color=#0000FF>[/b]</font><br>";
	str+="下 划 线：<font color=#0000FF>[u]</font>文本内容<font color=#0000FF>[/u]</font><br>";
	str+="项目列表：<font color=#0000FF>[*]</font>文本内容</p>";
	str+="<p><strong>注：如果您选择了“字符表情转换”功能，有可能造成某些UBB显示出错！</strong></p></td>";
	str+="</tr>";
	str+="</table>";
	obj2.innerHTML=str;
	}
}

function readCookie(name)
{
  var cookieValue = "";
  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;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writeCookie(name, value)
{
  var expire = "";
    expire = new Date((new Date()).getTime() + 24 * 365 * 3600000);
    expire = "; expires=" + expire.toGMTString();
  document.cookie = name + "=" + escape(value) + expire;
}

function GetStyle(n){
	for(var i=1;i<document.styleSheets.length;++i){
			if(document.styleSheets[i].href)
				document.styleSheets[i].disabled=true;
		}
	try{
		document.createStyleSheet(n?"style/Sty0"+n+".css":"style/main.css");
	}catch(e){
	}
	writeCookie("cnetnet_gsbook",n);
}