document.domain="mop.com";
//切换标签
	function changetabs(tabName){
		//改变标签样式
		var taboutbox = document.getElementById(tabName).parentElement.id;
		//alert(taboutbox)
		var tabs = document.getElementById(taboutbox).getElementsByTagName("div");
		for(var i=0;i<tabs.length;i++){
				tabs[i].className="";
		}
		document.getElementById(tabName).className="active";
		//改变标签内容
		var LabName = tabName+"_Label"
		var labeloutbox = document.getElementById(LabName).parentElement.id;
		var labels = document.getElementById(labeloutbox).getElementsByTagName("div");
		
		for(var i=0;i<labels.length;i++){
			if(labels[i].style.display=="")
				labels[i].style.display="none";
		}

		document.getElementById(LabName).style.display="";
	}

//左侧frame缩进
var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
function LZ(x){return(x<0||x>9?"":"0")+x}
function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();if(y.length < 4){y=""+(y-0+1900);}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12;}else if(H>12){value["h"]=H-12;}else{value["h"]=H;}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12;}else{value["K"]=H;}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H > 11){value["a"]="PM";}else{value["a"]="AM";}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format < format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c) &&(i_format < format.length)){token += format.charAt(i_format++);}if(value[token] != null){result=result + value[token];}else{result=result + token;}}return result;}

function NavStatus()
{
if(window.top.document.getElementById("mainframeset").cols=="510,9,*")
{
window.top.document.getElementById("mainframeset").cols="0%,9,*";
window.top.midFrame.document.getElementById("leftarrow").src="http://txt.mop.com/images/newbie//f_bar2.gif";
}
else
{
window.top.document.getElementById("mainframeset").cols="510,9,*";
window.top.midFrame.document.getElementById("leftarrow").src="http://txt.mop.com/images/newbie//f_bar.gif";
}
}

//新手区左侧frame缩进
function NavStatusNewbie()
{
	try{
		if(window.top.document.getElementById("mainframeset").cols=="510,*")
		{
			window.top.document.getElementById("mainframeset").cols="10,*";
			window.top.leftFrame.document.getElementById("f_bar_img").innerHTML ="<img id='f_bar' src='http://txt.mop.com/images/newbie/f_bar2.gif' style='cursor:pointer;cursor:hand' onClick='NavStatusNewbie();' />"
			//window.top.midFrame.document.getElementById("leftarrow").src="http://txt.mop.com/images/newbie//f_bar2.gif";
		}
		else
		{
			window.top.document.getElementById("mainframeset").cols="510,*";
			window.top.leftFrame.document.getElementById("f_bar_img").innerHTML ="<img id='f_bar' src='http://txt.mop.com/images/newbie/f_bar.gif' style='cursor:pointer;cursor:hand' onClick='NavStatusNewbie();' />"
			//window.top.midFrame.document.getElementById("leftarrow").src="http://txt.mop.com/images/newbie//f_bar.gif";
		}
	}catch(e){}
}

var t
function hideto(fname,timer){
t=setTimeout("hidec('"+fname+"')",timer);
}
function cleart(){clearTimeout(t);}

//中间弹出
function alertc(fname,w,h)
{
document.getElementById(fname).style.display='';
document.getElementById(fname).style.width=w+'px';
document.getElementById(fname).style.height=h+'px';
t=document.body.clientHeight-h;
t=t/2
t=t+document.body.scrollTop
document.getElementById(fname).style.top=t;
l=document.body.clientWidth/2;
w=w/2;
l=l-w;
document.getElementById(fname).style.left=l;
}
//有默认接收消息用户的
function alertc2(fname,w,h,uname)
{
document.getElementById(fname).style.display='';
document.getElementById(fname).style.width=w+'px';
document.getElementById(fname).style.height=h+'px';
t=document.body.clientHeight-h;
t=t/2
t=t+document.body.scrollTop
document.getElementById(fname).style.top=t;
l=document.body.clientWidth/2;
w=w/2;
l=l-w;
document.getElementById(fname).style.left=l;
//设置默认用户名
document.getElementById("receiveUserName").value=uname;
}
//设置其他参数的
function alertc3(fname,w,h,paranames,paravas)
{
	document.getElementById(fname).style.display='';
	document.getElementById(fname).style.width=w+'px';
	document.getElementById(fname).style.height=h+'px';
	t=document.body.clientHeight-h;
	t=t/2
	t=t+document.body.scrollTop
	document.getElementById(fname).style.top=t;
	l=document.body.clientWidth/2;
	w=w/2;
	l=l-w;
	document.getElementById(fname).style.left=l;
	//设置参数
	values=paravas.split(",");
	names=paranames.split(",");
	for (i=0 ; i < names.length ; i++)
	{
		if(names[i].charAt(0)=="$"){
			var es = document.getElementsByName(names[i].substr(1));
			for(j=0;j<es.length;j++){				
				es[j].innerHTML=values[i];
			}
		}else{
			var es = document.getElementsByName(names[i]);
			for(j=0;j<es.length;j++){				
				es[j].value=values[i];
			}
		}
	}
}
function hidec(fname){document.getElementById(fname).style.display='none';
}
//取回道具
function alertr(fname)
{
//alert(fname)
document.getElementById(fname).style.display='';
document.getElementById(fname).style.right="10px";
}
function hidec(fname){document.getElementById(fname).style.display='none';}
function hidec2(fname){
	window.top.leftFrame.frames[0].maindata.document.getElementById(fname).style.display='none';
	//window.top.leftFrame.maindata.document.getElementById(fname).style.display='none';
}


//menu
function showmenu(fname,l)
{
var divid =	window.top.leftFrame.frames[0].maindata.document.getElementById(fname);
//var divid=window.top.leftFrame.maindata.document.getElementById(fname);
divid.style.display='';
//alert(window.top.leftFrame.maindata.document.body.scrollTop)
divid.style.top = window.top.leftFrame.frames[0].maindata.document.body.scrollTop;
//divid.style.top=window.top.leftFrame.maindata.document.body.scrollTop;
divid.style.left=l;
}
//item menu
function showitemmenu(fname,l,itemList)
{
//window.top.leftFrame.maindata.showitemmenu(fname, l, itemList);
var itemliststr = '';
	itemliststr += '		  <table width="98%" border="0" cellpadding="3" cellspacing="0" id="ijs_itemtb">';
	itemliststr += '	        <tr>';
	itemliststr += '	          <td width="43%" height="25" colspan="1" align="left"><font color="#FFFFFF"><b>使用道具</b></font></td>';
	itemliststr += '					  <td width="57%" align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" style="cursor:pointer" onClick="hidec(\'menu_item\')"></td>';
	itemliststr += '	        </tr>';
	for(var i=0;i<itemList.length&&typeof(itemList[i])!="undefined";i++){
		itemliststr += '					<tr>';
		itemliststr +=  '	          <td>-'+itemList[i][0]+'</td>';
		itemliststr += '	          <td align="right"><a href="javascript:hidec(\'menu_item\');alertcui(345,205,\''+itemList[i][0]+'\');">使用</a> <a href="javascript:hidec(\'menu_item\');alertc3(\'item_give\',345,205,\'$displayname,itemname\',\''+itemList[i][0]+','+itemList[i][0]+'\');">转让</a>';
		itemliststr += '	          	<a href="javascript:hidec(\'menu_item\');alertc3(\'item_sell\',345,205,\'$displayname1,itemid,itemname\',\''+itemList[i][0]+','+itemList[i][1]+','+itemList[i][0]+'\');">寄卖</a></td>';
		itemliststr += '	        </tr>';
	}
	if(itemList.length == 0){
		itemliststr += '					<tr>';
		itemliststr +=  '	          <td>-暂无道具</td>';
		itemliststr += '	          <td align="right"></td>';
		itemliststr += '	        </tr>';
	}
	itemliststr += '	    </table>';
var item_content=window.top.leftFrame.frames[0].maindata.document.getElementById("menu_item_content");
//var item_content=window.top.leftFrame.frames[0].maindata.document.getElementById("menu_item_content");
item_content.innerHTML = itemliststr;
var divid=window.top.leftFrame.frames[0].maindata.document.getElementById(fname);
divid.style.display='';
divid.style.top=window.top.leftFrame.frames[0].maindata.document.body.scrollTop;
divid.style.left=l;
}
//刷新
function refresh()
{
	window.top.leftFrame.frames[0].maindata.location.reload();
}
//显示消息框
function showMessageBox(mess) {
	try{
		w = 200;
		h = 100;
		fname = "message_box_div";
		document.getElementById(fname).style.display='';
		document.getElementById(fname).style.width=w+'px';
		document.getElementById(fname).style.height=h+'px';
		t=document.body.clientHeight-h;
		t=t/2;
		t=t+document.body.scrollTop;
		document.getElementById(fname).style.top=t;
		l=document.body.clientWidth/2;
		w=w/2;
		l=l-w;
		document.getElementById(fname).style.left=l;
		
		document.getElementById("return_message").innerHTML = mess;

	}catch(e){
		//alert(e);
	}
}
function alertcui(w,h,itemname)
{
	if(itemname=="远视之镜"||itemname=="玫瑰"||itemname=="诅咒药"){
		//可直接使用的道具，并且只有一个参数的
		fname = "item_use_form1";
		document.getElementById(fname).style.display='';
		document.getElementById(fname).style.width=w+'px';
		document.getElementById(fname).style.height=h+'px';
		t=document.body.clientHeight-h;
		t=t/2
		t=t+document.body.scrollTop
		document.getElementById(fname).style.top=t;
		l=document.body.clientWidth/2;
		w=w/2;
		l=l-w;
		document.getElementById(fname).style.left=l;
		if(itemname=="远视之镜"){
			desc="想TK谁：";
			document.getElementById("item_use_form1_f").action = "/itemmart/useitem/useHyperopia.jsp";
		}
		else if(itemname=="玫瑰"){
			desc="输入您要发布的状态栏短信息：";
			document.getElementById("item_use_form1_f").action = "/itemmart/useitem/rose.jsp";			
		}
		else if(itemname=="诅咒药"){
			desc="要诅咒谁啊？：";
			document.getElementById("item_use_form1_f").action = "/itemmart/useitem/curseItem.jsp";
		}
		document.getElementById("item_use_desc").innerHTML = desc;
		
	}else if(itemname=="火星飞碟"){
		//可直接使用，并且有三个参数
		fname = "item_use_form2";
		document.getElementById(fname).style.display='';
		document.getElementById(fname).style.width=w+'px';
		document.getElementById(fname).style.height=h+'px';
		t=document.body.clientHeight-h;
		t=t/2
		t=t+document.body.scrollTop
		document.getElementById(fname).style.top=t;
		l=document.body.clientWidth/2;
		w=w/2;
		l=l-w;
		document.getElementById(fname).style.left=l;
		if(itemname=="火星飞碟"){
			desc1="信息标题：";
			desc2="标题颜色：";
			desc3="信息链接：";
			document.getElementById("item_use_form2_f").action = "/itemmart/useitem/ufo.jsp";
		}
		document.getElementById("item_use_desc1").innerHTML = desc1;
		document.getElementById("item_use_desc2").innerHTML = desc2;
		document.getElementById("item_use_desc3").innerHTML = desc3;
		
	}else{
		//提示不能直接使用该道具
		var divid=document.getElementById("message_box_div");
		divid.style.display='';
		document.getElementById("return_message").innerHTML = "此处无法使用该道具，请在帖子中使用该道具";
		divid.style.top=document.body.scrollTop;
		l=document.body.clientWidth/2;
		divid.style.left=l;
	}

}

function writeComm(typestr,refreshflag){
var comm = '';
	//隐藏的iframe，用来提交
	comm += '<iframe name="hide_act_frame'+typestr+'" id="hide_act_frame'+typestr+'" style="display:none;"></iframe>';
	//隐藏的iframe结束
	comm += '';
	//提示框
	comm += '<div class="alwin" id="message_box_div" style="position:absolute;display:none;">';
	comm += '<table width="92%" height="100%" border="0" cellpadding="0" cellspacing="0">';
	comm += '  <tr>';
	comm += '    <td height="35"> <b><font color="#0078ff">返回信息：</font></b></td>';
	comm += '    </tr>';
	comm += '  <tr>';
	comm += '    <td style="line-height:18px"><div name="return_message" id="return_message"></div></td>';
	comm += '  </tr>';
	comm += '  <tr>';
	if(refreshflag=='')
		comm += '    <td height="35" align="right"><a href="javascript:hidec(\'message_box_div\')"><font color="#909090">关闭</font></a></td>';
	else
		comm += '    <td height="35" align="right"><a href="javascript:hidec(\'message_box_div\');document.location.reload()"><font color="#909090">关闭</font></a></td>';
	comm += '  </tr>';
	comm += '</table>';
	comm += '</div>';
	//end提示框
	document.write(comm);
}

function writeCommItemuse(){
var comm = '';
	//道具使用form1---单个输入参数的
	comm += '<div id="item_use_form1" class="alwin" style="position:absolute;display:none;">';
	comm += '<form action="" name="item_use_form1_f" id="item_use_form1_f" method="post" target="_blank">';
	comm += '<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">';
	comm += '<tr>';
	comm += '<td align="left" valign="middle"><b><font style="font-size:14px;">道具使用</font></b></td>';
	comm += '<td align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" width="14" height="14" style="cursor:pointer" onClick="hidec(\'item_use_form1\')"></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td align="center" valign="middle"><div name="item_use_desc" id="item_use_desc"></div></td>';
	comm += '  <td><input type="text" name="username"></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td colspan="2" align="center" valign="middle"><input name="Submit2" type="submit" class="but_sgo" onClick="javascript:hidec(\'item_use_form1\');item_use_form1_f.submit()" value=" 确 定 "></td>';
	comm += '</tr>';
	comm += '</table>';
	comm += '</form>';
	comm += '</div>';
	//end道具使用form1---单个输入参数的
	//道具使用form2---三个输入参数的
	comm += '<div id="item_use_form2" class="alwin" style="position:absolute;display:none;">';
	comm += '<form action="" name="item_use_form2_f" id="item_use_form2_f" method="post" target="_blank">';
	comm += '<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">';
	comm += '<tr>';
	comm += '<td align="left" valign="middle"><b><font style="font-size:14px;">道具使用</font></b></td>';
	comm += '<td align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" width="14" height="14" style="cursor:pointer" onClick="hidec(\'item_use_form2\')"></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td align="center" valign="middle"><div name="item_use_desc1" id="item_use_desc1"></div></td>';
	comm += '  <td><input type="text" name="title"></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td align="center" valign="middle"><div name="item_use_desc2" id="item_use_desc2"></div></td>';
	comm += '  <td><select size="1" name="color">';
	comm += '    <option style="COLOR: #f0f8ff; BACKGROUND-COLOR: #f0f8ff" value="#F0F8FF">#F0F8FF</option>';
	comm += '    <option style="COLOR: #faebd7; BACKGROUND-COLOR: #faebd7" value="#FAEBD7">#FAEBD7</option>';
	comm += '    <option style="COLOR: #00ffff; BACKGROUND-COLOR: #00ffff" value="#00FFFF">#00FFFF</option>';
	comm += '    <option style="COLOR: #7fffd4; BACKGROUND-COLOR: #7fffd4" value="#7FFFD4">#7FFFD4</option>';
	comm += '    <option style="COLOR: #f0ffff; BACKGROUND-COLOR: #f0ffff" value="#F0FFFF">#F0FFFF</option>';
	comm += '    <option style="COLOR: #f5f5dc; BACKGROUND-COLOR: #f5f5dc" value="#F5F5DC">#F5F5DC</option>';
	comm += '    <option style="COLOR: #ffe4c4; BACKGROUND-COLOR: #ffe4c4" value="#FFE4C4">#FFE4C4</option>';
	comm += '    <option style="COLOR: #ffebcd; BACKGROUND-COLOR: #ffebcd" value="#FFEBCD">#FFEBCD</option>';
	comm += '    <option style="COLOR: #0000ff; BACKGROUND-COLOR: #0000ff" value="#0000FF">#0000FF</option>';
	comm += '    <option style="COLOR: #8a2be2; BACKGROUND-COLOR: #8a2be2" value="#8A2BE2">#8A2BE2</option>';
	comm += '    <option style="COLOR: #a52a2a; BACKGROUND-COLOR: #a52a2a" value="#A52A2A">#A52A2A</option>';
	comm += '    <option style="COLOR: #deb887; BACKGROUND-COLOR: #deb887" value="#DEB887">#DEB887</option>';
	comm += '    <option style="COLOR: #5f9ea0; BACKGROUND-COLOR: #5f9ea0" value="#5F9EA0">#5F9EA0</option>';
	comm += '    <option style="COLOR: #7fff00; BACKGROUND-COLOR: #7fff00" value="#7FFF00">#7FFF00</option>';
	comm += '    <option style="COLOR: #d2691e; BACKGROUND-COLOR: #d2691e" value="#D2691E">#D2691E</option>';
	comm += '    <option style="COLOR: #ff7f50; BACKGROUND-COLOR: #ff7f50" value="#FF7F50">#FF7F50</option>';
	comm += '    <option style="COLOR: #000000; BACKGROUND-COLOR: #000000" value="#000000" selected>#000000</option>';
	comm += '    <option style="COLOR: #1e90ff; BACKGROUND-COLOR: #1e90ff" value="#1E90FF">#1E90FF</option>';
	comm += '    <option style="COLOR: #696969; BACKGROUND-COLOR: #696969" value="#696969">#696969</option>';
	comm += '    <option style="COLOR: #6495ed; BACKGROUND-COLOR: #6495ed" value="#6495ED">#6495ED</option>';
	comm += '    <option style="COLOR: #fff8dc; BACKGROUND-COLOR: #fff8dc" value="#FFF8DC">#FFF8DC</option>';
	comm += '    <option style="COLOR: #dc143c; BACKGROUND-COLOR: #dc143c" value="#DC143C">#DC143C</option>';
	comm += '    <option style="COLOR: #00ffff; BACKGROUND-COLOR: #00ffff" value="#00FFFF">#00FFFF</option>';
	comm += '    <option style="COLOR: #00008b; BACKGROUND-COLOR: #00008b" value="#00008B">#00008B</option>';
	comm += '    <option style="COLOR: #008b8b; BACKGROUND-COLOR: #008b8b" value="#008B8B">#008B8B</option>';
	comm += '    <option style="COLOR: #b8860b; BACKGROUND-COLOR: #b8860b" value="#B8860B">#B8860B</option>';
	comm += '    <option style="COLOR: #a9a9a9; BACKGROUND-COLOR: #a9a9a9" value="#A9A9A9">#A9A9A9</option>';
	comm += '    <option style="COLOR: #006400; BACKGROUND-COLOR: #006400" value="#006400">#006400</option>';
	comm += '    <option style="COLOR: #bdb76b; BACKGROUND-COLOR: #bdb76b" value="#BDB76B">#BDB76B</option>';
	comm += '    <option style="COLOR: #8b008b; BACKGROUND-COLOR: #8b008b" value="#8B008B">#8B008B</option>';
	comm += '    <option style="COLOR: #556b2f; BACKGROUND-COLOR: #556b2f" value="#556B2F">#556B2F</option>';
	comm += '    <option style="COLOR: #ff8c00; BACKGROUND-COLOR: #ff8c00" value="#FF8C00">#FF8C00</option>';
	comm += '    <option style="COLOR: #9932cc; BACKGROUND-COLOR: #9932cc" value="#9932CC">#9932CC</option>';
	comm += '    <option style="COLOR: #8b0000; BACKGROUND-COLOR: #8b0000" value="#8B0000">#8B0000</option>';
	comm += '    <option style="COLOR: #e9967a; BACKGROUND-COLOR: #e9967a" value="#E9967A">#E9967A</option>';
	comm += '    <option style="COLOR: #8fbc8f; BACKGROUND-COLOR: #8fbc8f" value="#8FBC8F">#8FBC8F</option>';
	comm += '    <option style="COLOR: #483d8b; BACKGROUND-COLOR: #483d8b" value="#483D8B">#483D8B</option>';
	comm += '    <option style="COLOR: #2f4f4f; BACKGROUND-COLOR: #2f4f4f" value="#2F4F4F">#2F4F4F</option>';
	comm += '    <option style="COLOR: #00ced1; BACKGROUND-COLOR: #00ced1" value="#00CED1">#00CED1</option>';
	comm += '    <option style="COLOR: #9400d3; BACKGROUND-COLOR: #9400d3" value="#9400D3">#9400D3</option>';
	comm += '    <option style="COLOR: #ff1493; BACKGROUND-COLOR: #ff1493" value="#FF1493">#FF1493</option>';
	comm += '    <option style="COLOR: #00bfff; BACKGROUND-COLOR: #00bfff" value="#00BFFF">#00BFFF</option>';
	comm += '    <option style="COLOR: #b22222; BACKGROUND-COLOR: #b22222" value="#B22222">#B22222</option>';
	comm += '    <option style="COLOR: #fffaf0; BACKGROUND-COLOR: #fffaf0" value="#FFFAF0">#FFFAF0</option>';
	comm += '    <option style="COLOR: #228b22; BACKGROUND-COLOR: #228b22" value="#228B22">#228B22</option>';
	comm += '    <option style="COLOR: #ff00ff; BACKGROUND-COLOR: #ff00ff" value="#FF00FF">#FF00FF</option>';
	comm += '    <option style="COLOR: #dcdcdc; BACKGROUND-COLOR: #dcdcdc" value="#DCDCDC">#DCDCDC</option>';
	comm += '    <option style="COLOR: #f8f8ff; BACKGROUND-COLOR: #f8f8ff" value="#F8F8FF">#F8F8FF</option>';
	comm += '    <option style="COLOR: #ffd700; BACKGROUND-COLOR: #ffd700" value="#FFD700">#FFD700</option>';
	comm += '    <option style="COLOR: #daa520; BACKGROUND-COLOR: #daa520" value="#DAA520">#DAA520</option>';
	comm += '    <option style="COLOR: #808080; BACKGROUND-COLOR: #808080" value="#808080">#808080</option>';
	comm += '    <option style="COLOR: #008000; BACKGROUND-COLOR: #008000" value="#008000">#008000</option>';
	comm += '    <option style="COLOR: #adff2f; BACKGROUND-COLOR: #adff2f" value="#ADFF2F">#ADFF2F</option>';
	comm += '    <option style="COLOR: #f0fff0; BACKGROUND-COLOR: #f0fff0" value="#F0FFF0">#F0FFF0</option>';
	comm += '    <option style="COLOR: #ff69b4; BACKGROUND-COLOR: #ff69b4" value="#FF69B4">#FF69B4</option>';
	comm += '    <option style="COLOR: #cd5c5c; BACKGROUND-COLOR: #cd5c5c" value="#CD5C5C">#CD5C5C</option>';
	comm += '    <option style="COLOR: #4b0082; BACKGROUND-COLOR: #4b0082" value="#4B0082">#4B0082</option>';
	comm += '    <option style="COLOR: #fffff0; BACKGROUND-COLOR: #fffff0" value="#FFFFF0">#FFFFF0</option>';
	comm += '    <option style="COLOR: #f0e68c; BACKGROUND-COLOR: #f0e68c" value="#F0E68C">#F0E68C</option>';
	comm += '    <option style="COLOR: #e6e6fa; BACKGROUND-COLOR: #e6e6fa" value="#E6E6FA">#E6E6FA</option>';
	comm += '    <option style="COLOR: #fff0f5; BACKGROUND-COLOR: #fff0f5" value="#FFF0F5">#FFF0F5</option>';
	comm += '    <option style="COLOR: #7cfc00; BACKGROUND-COLOR: #7cfc00" value="#7CFC00">#7CFC00</option>';
	comm += '    <option style="COLOR: #fffacd; BACKGROUND-COLOR: #fffacd" value="#FFFACD">#FFFACD</option>';
	comm += '    <option style="COLOR: #add8e6; BACKGROUND-COLOR: #add8e6" value="#ADD8E6">#ADD8E6</option>';
	comm += '    <option style="COLOR: #f08080; BACKGROUND-COLOR: #f08080" value="#F08080">#F08080</option>';
	comm += '    <option style="COLOR: #e0ffff; BACKGROUND-COLOR: #e0ffff" value="#E0FFFF">#E0FFFF</option>';
	comm += '    <option style="COLOR: #fafad2; BACKGROUND-COLOR: #fafad2" value="#FAFAD2">#FAFAD2</option>';
	comm += '    <option style="COLOR: #90ee90; BACKGROUND-COLOR: #90ee90" value="#90EE90">#90EE90</option>';
	comm += '    <option style="COLOR: #d3d3d3; BACKGROUND-COLOR: #d3d3d3" value="#D3D3D3">#D3D3D3</option>';
	comm += '    <option style="COLOR: #ffb6c1; BACKGROUND-COLOR: #ffb6c1" value="#FFB6C1">#FFB6C1</option>';
	comm += '    <option style="COLOR: #ffa07a; BACKGROUND-COLOR: #ffa07a" value="#FFA07A">#FFA07A</option>';
	comm += '    <option style="COLOR: #20b2aa; BACKGROUND-COLOR: #20b2aa" value="#20B2AA">#20B2AA</option>';
	comm += '    <option style="COLOR: #87cefa; BACKGROUND-COLOR: #87cefa" value="#87CEFA">#87CEFA</option>';
	comm += '    <option style="COLOR: #778899; BACKGROUND-COLOR: #778899" value="#778899">#778899</option>';
	comm += '    <option style="COLOR: #b0c4de; BACKGROUND-COLOR: #b0c4de" value="#B0C4DE">#B0C4DE</option>';
	comm += '    <option style="COLOR: #ffffe0; BACKGROUND-COLOR: #ffffe0" value="#FFFFE0">#FFFFE0</option>';
	comm += '    <option style="COLOR: #00ff00; BACKGROUND-COLOR: #00ff00" value="#00FF00">#00FF00</option>';
	comm += '    <option style="COLOR: #32cd32; BACKGROUND-COLOR: #32cd32" value="#32CD32">#32CD32</option>';
	comm += '    <option style="COLOR: #faf0e6; BACKGROUND-COLOR: #faf0e6" value="#FAF0E6">#FAF0E6</option>';
	comm += '    <option style="COLOR: #ff00ff; BACKGROUND-COLOR: #ff00ff" value="#FF00FF">#FF00FF</option>';
	comm += '    <option style="COLOR: #800000; BACKGROUND-COLOR: #800000" value="#800000">#800000</option>';
	comm += '    <option style="COLOR: #66cdaa; BACKGROUND-COLOR: #66cdaa" value="#66CDAA">#66CDAA</option>';
	comm += '    <option style="COLOR: #0000cd; BACKGROUND-COLOR: #0000cd" value="#0000CD">#0000CD</option>';
	comm += '    <option style="COLOR: #ba55d3; BACKGROUND-COLOR: #ba55d3" value="#BA55D3">#BA55D3</option>';
	comm += '    <option style="COLOR: #9370db; BACKGROUND-COLOR: #9370db" value="#9370DB">#9370DB</option>';
	comm += '    <option style="COLOR: #3cb371; BACKGROUND-COLOR: #3cb371" value="#3CB371">#3CB371</option>';
	comm += '    <option style="COLOR: #7b68ee; BACKGROUND-COLOR: #7b68ee" value="#7B68EE">#7B68EE</option>';
	comm += '    <option style="COLOR: #00fa9a; BACKGROUND-COLOR: #00fa9a" value="#00FA9A">#00FA9A</option>';
	comm += '    <option style="COLOR: #48d1cc; BACKGROUND-COLOR: #48d1cc" value="#48D1CC">#48D1CC</option>';
	comm += '    <option style="COLOR: #c71585; BACKGROUND-COLOR: #c71585" value="#C71585">#C71585</option>';
	comm += '    <option style="COLOR: #191970; BACKGROUND-COLOR: #191970" value="#191970">#191970</option>';
	comm += '    <option style="COLOR: #f5fffa; BACKGROUND-COLOR: #f5fffa" value="#F5FFFA">#F5FFFA</option>';
	comm += '    <option style="COLOR: #ffe4e1; BACKGROUND-COLOR: #ffe4e1" value="#FFE4E1">#FFE4E1</option>';
	comm += '    <option style="COLOR: #ffe4b5; BACKGROUND-COLOR: #ffe4b5" value="#FFE4B5">#FFE4B5</option>';
	comm += '    <option style="COLOR: #ffdead; BACKGROUND-COLOR: #ffdead" value="#FFDEAD">#FFDEAD</option>';
	comm += '    <option style="COLOR: #000080; BACKGROUND-COLOR: #000080" value="#000080">#000080</option>';
	comm += '    <option style="COLOR: #fdf5e6; BACKGROUND-COLOR: #fdf5e6" value="#FDF5E6">#FDF5E6</option>';
	comm += '    <option style="COLOR: #808000; BACKGROUND-COLOR: #808000" value="#808000">#808000</option>';
	comm += '    <option style="COLOR: #6b8e23; BACKGROUND-COLOR: #6b8e23" value="#6B8E23">#6B8E23</option>';
	comm += '    <option style="COLOR: #ffa500; BACKGROUND-COLOR: #ffa500" value="#FFA500">#FFA500</option>';
	comm += '    <option style="COLOR: #ff4500; BACKGROUND-COLOR: #ff4500" value="#FF4500">#FF4500</option>';
	comm += '    <option style="COLOR: #da70d6; BACKGROUND-COLOR: #da70d6" value="#DA70D6">#DA70D6</option>';
	comm += '    <option style="COLOR: #eee8aa; BACKGROUND-COLOR: #eee8aa" value="#EEE8AA">#EEE8AA</option>';
	comm += '    <option style="COLOR: #98fb98; BACKGROUND-COLOR: #98fb98" value="#98FB98">#98FB98</option>';
	comm += '    <option style="COLOR: #afeeee; BACKGROUND-COLOR: #afeeee" value="#AFEEEE">#AFEEEE</option>';
	comm += '    <option style="COLOR: #db7093; BACKGROUND-COLOR: #db7093" value="#DB7093">#DB7093</option>';
	comm += '    <option style="COLOR: #ffefd5; BACKGROUND-COLOR: #ffefd5" value="#FFEFD5">#FFEFD5</option>';
	comm += '    <option style="COLOR: #ffdab9; BACKGROUND-COLOR: #ffdab9" value="#FFDAB9">#FFDAB9</option>';
	comm += '    <option style="COLOR: #cd853f; BACKGROUND-COLOR: #cd853f" value="#CD853F">#CD853F</option>';
	comm += '    <option style="COLOR: #ffc0cb; BACKGROUND-COLOR: #ffc0cb" value="#FFC0CB">#FFC0CB</option>';
	comm += '    <option style="COLOR: #dda0dd; BACKGROUND-COLOR: #dda0dd" value="#DDA0DD">#DDA0DD</option>';
	comm += '    <option style="COLOR: #b0e0e6; BACKGROUND-COLOR: #b0e0e6" value="#B0E0E6">#B0E0E6</option>';
	comm += '    <option style="COLOR: #800080; BACKGROUND-COLOR: #800080" value="#800080">#800080</option>';
	comm += '    <option style="COLOR: #ff0000; BACKGROUND-COLOR: #ff0000" value="#FF0000">#FF0000</option>';
	comm += '    <option style="COLOR: #bc8f8f; BACKGROUND-COLOR: #bc8f8f" value="#BC8F8F">#BC8F8F</option>';
	comm += '    <option style="COLOR: #4169e1; BACKGROUND-COLOR: #4169e1" value="#4169E1">#4169E1</option>';
	comm += '    <option style="COLOR: #8b4513; BACKGROUND-COLOR: #8b4513" value="#8B4513">#8B4513</option>';
	comm += '    <option style="COLOR: #fa8072; BACKGROUND-COLOR: #fa8072" value="#FA8072">#FA8072</option>';
	comm += '    <option style="COLOR: #f4a460; BACKGROUND-COLOR: #f4a460" value="#F4A460">#F4A460</option>';
	comm += '    <option style="COLOR: #2e8b57; BACKGROUND-COLOR: #2e8b57" value="#2E8B57">#2E8B57</option>';
	comm += '    <option style="COLOR: #fff5ee; BACKGROUND-COLOR: #fff5ee" value="#FFF5EE">#FFF5EE</option>';
	comm += '    <option style="COLOR: #a0522d; BACKGROUND-COLOR: #a0522d" value="#A0522D">#A0522D</option>';
	comm += '    <option style="COLOR: #c0c0c0; BACKGROUND-COLOR: #c0c0c0" value="#C0C0C0">#C0C0C0</option>';
	comm += '    <option style="COLOR: #87ceeb; BACKGROUND-COLOR: #87ceeb" value="#87CEEB">#87CEEB</option>';
	comm += '    <option style="COLOR: #6a5acd; BACKGROUND-COLOR: #6a5acd" value="#6A5ACD">#6A5ACD</option>';
	comm += '    <option style="COLOR: #708090; BACKGROUND-COLOR: #708090" value="#708090">#708090</option>';
	comm += '    <option style="COLOR: #fffafa; BACKGROUND-COLOR: #fffafa" value="#FFFAFA">#FFFAFA</option>';
	comm += '    <option style="COLOR: #00ff7f; BACKGROUND-COLOR: #00ff7f" value="#00FF7F">#00FF7F</option>';
	comm += '    <option style="COLOR: #4682b4; BACKGROUND-COLOR: #4682b4" value="#4682B4">#4682B4</option>';
	comm += '    <option style="COLOR: #d2b48c; BACKGROUND-COLOR: #d2b48c" value="#D2B48C">#D2B48C</option>';
	comm += '    <option style="COLOR: #008080; BACKGROUND-COLOR: #008080" value="#008080">#008080</option>';
	comm += '    <option style="COLOR: #d8bfd8; BACKGROUND-COLOR: #d8bfd8" value="#D8BFD8">#D8BFD8</option>';
	comm += '    <option style="COLOR: #ff6347; BACKGROUND-COLOR: #ff6347" value="#FF6347">#FF6347</option>';
	comm += '    <option style="COLOR: #40e0d0; BACKGROUND-COLOR: #40e0d0" value="#40E0D0">#40E0D0</option>';
	comm += '    <option style="COLOR: #ee82ee; BACKGROUND-COLOR: #ee82ee" value="#EE82EE">#EE82EE</option>';
	comm += '    <option style="COLOR: #f5deb3; BACKGROUND-COLOR: #f5deb3" value="#F5DEB3">#F5DEB3</option>';
	comm += '    <option style="COLOR: #ffffff; BACKGROUND-COLOR: #ffffff" value="#FFFFFF">#FFFFFF</option>';
	comm += '    <option style="COLOR: #f5f5f5; BACKGROUND-COLOR: #f5f5f5" value="#F5F5F5">#F5F5F5</option>';
	comm += '    <option style="COLOR: #ffff00; BACKGROUND-COLOR: #ffff00" value="#FFFF00">#FFFF00</option>';
	comm += '    <option style="COLOR: #9acd32; BACKGROUND-COLOR: #9acd32" value="#9ACD32">#9ACD32</option>';
	comm += '  </select></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td align="center" valign="middle"><div name="item_use_desc2" id="item_use_desc3"></div></td>';
	comm += '  <td><input type="text" name="link"></td>';
	comm += '</tr>';
	comm += '<tr>';
	comm += '  <td colspan="2" align="center" valign="middle"><input name="Submit2" type="submit" class="but_sgo" onClick="javascript:hidec(\'item_use_form2\');item_use_form2_f.submit()" value=" 确 定 "></td>';
	comm += '</tr>';
	comm += '</table>';
	comm += '</form>';
	comm += '</div>';
	//end道具使用form2---三个输入参数的

	document.write(comm);
}

function writeTopicItemuse(){
var comm = '';
	document.write(comm);
}

function writeItemFunction(typestr){
var comm = '';
	//道具转让的form
	comm += '<div id="item_give" class="alwin" style="position:absolute;display:none;">';
	comm += '<form method=\'POST\' action=\'/itemmart/itemTranf.jsp\' name=\'transitem\' target="hide_act_frame'+typestr+'">';
	comm += '<input type=\'hidden\' name=\'hasId\' value="1">';
	comm += '<input type=\'hidden\' name=\'itemname\' value=\'\'>';
	comm += '<input type=\'hidden\' name=\'flag\' value=\'1\'>';
	comm += '<input type="hidden" name=\'fromPage\' value="/newbie/pm_right.jsp">';
	comm += '	<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">';
	comm += '	<tr>';
	comm += '	<td height="20" align="left" valign="middle"><b><font style="font-size:14px;">道具转让</font></b></td>';
	comm += '	<td align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" width="14" height="14" style="cursor:pointer" onClick="hidec(\'item_give\')"></td>';
	comm += '	</tr>';
	comm += '	<tr>';
	comm += '	  <td colspan="2" align="center" valign="middle"><table width="98%" border="0" cellpadding="5" cellspacing="0">';
	comm += '	    <tr>';
	comm += '	      <td height="60" colspan="2">尽量不要将某种道具全部转让，否则可能造成道具丢失</td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td colspan="2"><b><div id="displayname" name="displayname"></div></b></td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td width="22%" align="right">接受用户</td>';
	comm += '	      <td width="78%"><input type="text" name="receiver"></td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td align="right">转让数量</td>';
	comm += '	      <td><input type="text" name="itemnumb"></td>';
	comm += '	      </tr>';
	comm += '	  </table></td>';
	comm += '	</tr>';
	comm += '	<tr>';
	comm += '	  <td height="35" colspan="2" align="center" valign="middle"><input name="Submit2" type="submit" class="but_sgo" onClick="transitem.submit();hidec(\'item_give\')" value=" 确 定 "></td>';
	comm += '	</tr>';
	comm += '	</table>';
	comm += '</form>';
	comm += '</div>';
	//道具转让的form结束
	//道具寄卖的form
	comm += '<div id="item_sell" class="alwin" style="position:absolute;display:none;">';
	comm += '<form method=\'POST\' action=\'/itemmart/itemSell.jsp\' name=\'sellitem\' target="hide_act_frame'+typestr+'">';
	comm += '<input type=\'hidden\' name=\'hasId\' value="1">';
	comm += '<input type=\'hidden\' name=\'itemname\' value=\'\'>';
	comm += '<input type=\'hidden\' name=\'itemid\' value=\'\'>';
	comm += '<input type=\'hidden\' name=\'flag\' value=\'1\'>';
	comm += '<input type="hidden" name=\'fromPage\' value="/newbie/pm_right.jsp">';
	comm += '	<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">';
	comm += '	<tr>';
	comm += '	<td height="20" align="left" valign="middle"><b><font style="font-size:14px;">道具寄卖</font></b></td>';
	comm += '	<td align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" width="14" height="14" style="cursor:pointer" onClick="hidec(\'item_sell\')"></td>';
	comm += '	</tr>';
	comm += '	<tr>';
	comm += '	  <td colspan="2" align="center" valign="middle"><table width="98%" border="0" cellpadding="5" cellspacing="0">';
	comm += '	    <tr>';
	comm += '	      <td height="60" colspan="2">尽量不要将某种道具全部寄卖，否则可能造成道具丢失。<br>';
	comm += '	        所寄卖道具售出后将收取当次成交额5%的市场管理费</td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td colspan="2"><b><div id="displayname1" name="displayname1"></div></b></td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td width="22%" align="right">寄卖数量</td>';
	comm += '	      <td width="78%"><input name="itemnumb" type="text" size="15"> ';
	comm += '	        (正整数，比如20)</td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td align="right">寄卖价格</td>';
	comm += '	      <td><input name="itemprice" type="text" size="15">';
	comm += '	        (正整数，比如20000mp)</td>';
	comm += '	      </tr>';
	comm += '	    <tr>';
	comm += '	      <td align="right">确认价格</td>';
	comm += '	      <td><input name="itemprice2" type="text" size="15">';
	comm += '	(与寄卖价格相同)</td>';
	comm += '	    </tr>';
	comm += '	    <tr>';
	comm += '	      <td align="right">过期时间</td>';
	comm += '	      <td><select name="expiredate">';
	comm += '	        <option value=1>1</option><option value=3>3</option><option value=7>7</option>';
	comm += '	      </select>';
	comm += '	      天</td>';
	comm += '	    </tr>';
	comm += '	  </table></td>';
	comm += '	</tr>';
	comm += '	<tr>';
	comm += '	  <td height="35" colspan="2" align="center" valign="middle"><input name="Submit2" type="submit" class="but_sgo" onClick="sellitem.submit();hidec(\'item_sell\')" value=" 确 定 "></td>';
	comm += '	</tr>';
	comm += '	</table>';
	comm += '</form>';
	comm += '</div>';
	//道具寄卖的form结束
	
	document.write(comm);
}

function writeUserComm(typestr){
var nowtime = new Date();
var timestr = formatDate(new Date(),'yyyy-MM-dd HH:mm:ss');
var comm = '';
	//发送传呼
	comm += '			<div id="pm_new" class="alwin" style="position:absolute;display:none;border:4px solid #2f82df;background:#f3f9ff">';
	comm += '			<form method="POST" action="/useretc/msg/MsgSend.jsp" name="msgForm" target="hide_act_frame'+typestr+'">';
	comm += '			<input type="hidden" name=\'fromPage\' value="/newbie/pm_right.jsp">';
	comm += '			<table width="100%" height="100%" border="0" cellpadding="3" cellspacing="0">';
	comm += '			<tr>';
	comm += '			<td height="20" align="left" valign="middle"><b><font style="font-size:14px;">发送传呼</font></b></td>';
	comm += '			<td align="right" valign="top"><img src="http://txt.mop.com/images/newbie/div_close.gif" width="14" height="14" style="cursor:pointer" onClick="hidec(\'pm_new\')"></td>';
	comm += '			</tr>';
	comm += '			<tr>';
	comm += '			  <td colspan="2" align="center" valign="middle"><table width="98%" border="0" cellpadding="5" cellspacing="0">';
	comm += '			    <tr>';
	comm += '			      <td width="22%" align="right"><p>接收人<br>';
	comm += '			      </p>';
	comm += '			        <p></p></td>';
	comm += '			      <td width="78%"><input name="userName" id="receiveUserName" type="text"></td>';
	comm += '			      </tr>';
	comm += '			    <tr>';
	comm += '			      <td align="right" valign="top">消息内容</td>';
	comm += '			      <td><textarea name="msgContent" cols="30" rows="7"></textarea></td>';
	comm += '			      </tr>';
	comm += '			    <tr>';
	comm += '			      <td align="right"> 群发    </td>';
	comm += '			      <td><input type="checkbox" name="usemm" value="1">';
	comm += '			        群发传呼1MM，华丽会员可免费使用</td>';
	comm += '			    </tr>';
	comm += '			    <tr>';
	comm += '			      <td align="right">发送时间</td>';
	comm += '			      <td><input name="txtDate" type="text" value="'+timestr+'"></td>';
	comm += '			    </tr>';
	comm += '			    <tr>';
	comm += '			      <td align="right">过期时间</td>';
	comm += '			      <td><select name="select2">';
	comm += '			        <option>1</option>';
	comm += '			      </select>';
	comm += '			      天</td>';
	comm += '			    </tr>';
	comm += '			  </table>';
	comm += '			    <table width="70%" border="0" cellpadding="0" cellspacing="0">';
	comm += '			      <tr>';
	comm += '			        <td height="35" align="center"><input name="Submit22" type="button" class="but_sgo" onClick="msgForm.submit();hidec(\'pm_new\')" value=" 发 送 "></td>';
	comm += '			        <td align="center"><input name="Submit222" type="button" class="but_sgo" onClick="hidec(\'pm_new\')" value=" 重 写 "></td>';
	comm += '			        </tr>';
	comm += '			    </table></td>';
	comm += '			</tr>';
	comm += '			<tr>';
	comm += '			  <td height="35" colspan="2" align="center" valign="middle"><div style="color:#f00;line-height:18px;margin:5px;text-align:left">声明：用户使用本功能发送内容的行为属于用户个人行为，如果纸条内容含有不健康、暴力、色情等违法言语，用户自行承担全部责任，本站不承担任何有关责任。</div></td>';
	comm += '			</tr>';
	comm += '			</table>';
	comm += '			</form>';
	comm += '			</div>';
	comm += '';
	//添加好友
	comm += '			<div id="add_friend" class="alwin" style="position:absolute;display:none;border:4px solid #2f82df;background:#f3f9ff"">';
	comm += '			<form method="POST" action="/useretc/msg/RelationList.jsp" name="addRelation" target="hide_act_frame'+typestr+'">';
	comm += '			<input type="hidden" name=\'fromPage\' value="/newbie/pm_right.jsp">';
	comm += '			<input type="hidden" name=\'B1\' value="增加输入用户">';
	comm += '			<input type="hidden" name="relation" value="1">';
	comm += '				<table width="100%" height="100%" border="0" cellpadding="3" cellspacing="0">';
	comm += '				<tr>';
	comm += '				  <td align="center" valign="middle" width="30%"><b>添加好友：</b></td>';
	comm += '				  <td align="center" valign="middle"><input name="txtUsers" type="text" value="请输入对方ID或昵称"></td>';
	comm += '				  <td align="center" valign="middle"><input name="Submit223" type="submit" class="but_sgo" onClick="addRelation.submit();hidec(\'add_friend\')" value=" 确 定 "> ';
	comm += '				  	<input type="button" class="but_sgo" onClick="hidec(\'add_friend\')" value=" 取 消 ">';
	comm += '				  </td>';
	comm += '				</tr>';
	comm += '				</table>';
	comm += '			</form>';
	comm += '			</div>';

	document.write(comm);
}

