// JavaScript Document
var rgObj = {
	"overMenu":function(id){
		document.getElementById("t_" + id).src = "/images/c_t_" + id + ".jpg";
	},
	"outMenu":function(id){
		document.getElementById("t_" + id).src = "/images/t_" + id + ".jpg";
	},
	"rMenu":function(id){
		document.getElementById("t_" + id).src = "/images/top_c_" + id + ".jpg";
	},
	"tMenu":function(id){
		document.getElementById("t_" + id).src = "/images/top_" + id + ".jpg";
	},
	"clickZb":function(id){
		var menuNum = 3;
		for(i=1;i<=menuNum;i++){
			var obj = document.getElementById("zb_" + i);
			var objDiv = document.getElementById("zb_div_" + i);
			if(i == id){
				obj.className = "zb_" + i + "_c";
				objDiv.className = "";
			}
			else{
				obj.className = "zb_" + i;
				objDiv.className = "zb_div_"+ i +"_c";
			}
		}
	},
	"autoHeight":function(l,r,m){
		var l_height = document.getElementById(l).scrollHeight;
		var r_height = document.getElementById(r).scrollHeight;
		var m_height = document.getElementById(m).scrollHeight;
		l_height = l_height>=0?l_height:0;
		r_height = r_height>=0?r_height:0;
		m_height = m_height>=0?m_height:0;
		h = l_height;
		if(m_height>l_height-30){
			h = m_height + 30;	
		}
		document.getElementById(r).style.height = h+"px";
		document.getElementById(l).style.height = h+"px";
		document.getElementById(m).style.height = (h-30)+"px";
		
		var mObj = document.getElementById("pMessageList");
		if(mObj != null && mObj != "undefined"){
			mObj.style.height = h - 30 - 30 - 40 + "px";
		}
	},
	"autoPageHeight":function(m){
		var m_height = document.getElementById(m).scrollHeight;
		var h = m_height;
		if(h < 350)h = 350;
		document.getElementById(m).style.height = h+"px";
	},
	"getBBSList":function(){
		$.ajax({
			url:"Modules/getBbsList.php",
			type: 'POST',
			cache: false,
			dataType: 'text',
			data:"",
			error: function(){
				
			},
			success: function(data){
				$("#bbsList").html(data);
			}
		});
	}
}
