﻿szDataSource = function () {
 this.arr_Data = new Array();
};
szDataSource.prototype = {add:function (_text, _value) {
 var obj = new Object();
 obj.text = _text;
 obj.value = _value;
 this.arr_Data.push(obj);
}, DataBinding:function () {
 var nlength = arguments.length;
 if (nlength) {
  for (i in this.arr_Data) {
   var option = document.createElement("option");
   option.text = (this.arr_Data)[i].text;
   option.value = (this.arr_Data)[i].value;
   if(option.text!="undefined")
   {  
    arguments[0].options.add(option);
   }   
  }
  switch (nlength) {
  case 1 :
   break;
  case 2 :
   arguments[0].value = arguments[1];
   break;
  }
 }
}};   

function bindSelect()
{   
	ScreenConvert();	
    var tSource = new szDataSource();   
    tSource.add("漫画", "03");
    tSource.add("综合动漫讨论区", "09");
    tSource.add("无差别同人志执行会", "10");
    tSource.add("cosplay活动区", "07");
    tSource.add("涂鸦区", "12");
    tSource.add("口水堂", "06");
    tSource.add("客户服区", "08");
    tSource.add("版务区", "11");     
    tSource.add("“我爱镇江”动漫创作大赛", "13");
    tSource.add("“我爱镇江”动漫总动员COS秀摄影比赛", "14"); 
    tSource.add("“漫画2手交易区", "43");          
	var str ='移动到： <select name="moveSelect" id="moveSelect"></select><input id="bbtn" type="button" name="Submit" value="确定" onclick="moveTopic()" /> <input id="bbtn" type="button" name="Submit" value="取消" onclick="DialogHide();" />';
	DialogShow(str, 560, 0, 300,20);	
	tSource.DataBinding($("moveSelect"),TypeClass.trim());
}
moveTopic = function()
{	
	if($("moveSelect").value){
	ajax_Deal_Begin();
	$("bbtn").disabled = true;
	//alert($("moveSelect").value);
	book_Detail.myAjax.moveTopic(nPID,$("moveSelect").value, moveTopic_CallBack);
	}else
	{
		alert("请选择移动板块！");
		}
}
moveTopic_CallBack = function(rex)
{
	ajax_Dealok();
	if(rex.value=="03")
	{
		self.location.reload();
	}
	else
	{
		self.location.href = "forumDetail.aspx?nPID="+nPID+"&nType=2"
	}
	
}


var newPost = function()
{
	if(strBookid=="0")
	{
		self.location.href = "forum_Post.aspx?TypeClass="+TypeClass;		
	}
	else
	{
		self.location.href = "book_comment_post.aspx?BookID="+strBookid;
	}
}