// JavaScript Document

function openWin(param){
	//window.open("guild!message.nhn?id="+param+, "_self", "");
	//alert("");
}

function openMore(param){
    window.open(param);
}

function openLoginWin(){
	window.open("http://www.r2online.cn/login.nhn", "login", "height=250, width=450, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}

function enterBBS(bbs_id, forum_id, article_id){
	window.open("http://www.r2online.cn/R2ForumArticle.nhn?m=read&bbsId="+bbs_id+"&forumId="+forum_id+"&articleId="+article_id);
}



//change right frame
function changeRight(name){
	if(name == ''){
		return;
	}else{
		var frm=document.getElementById('mainFrame');
		frm.src=name;
	}
}

//more notice
function moreNoticeView(){
	var forumId = document.getElementById('forumId').value;
	if(forumId == '121'){
		parent.indexFrame.location = 'http://www.r2online.cn/channel.nhn?menuitem_param=1.1.0';
	}else if(forumId == '122'){
		parent.indexFrame.location = 'http://www.r2online.cn/channel.nhn?menuitem_param=1.2.0';
	}else if(forumId == '123'){
		parent.indexFrame.location = 'http://www.r2online.cn/channel.nhn?menuitem_param=1.3.0';
	}else if(forumId == '124'){
		parent.indexFrame.location = 'http://www.r2online.cn/channel.nhn?menuitem_param=1.4.0';
	}
}

//pop notice
function popNoticeView(bbsId,forumId,articleId)	{
	if(forumId == '121'){
		parent.location="http://www.r2online.cn/channel.nhn?menuitem_param=1.1.0&requestFrame=notice!read&bbsId="+bbsId+"&forumId="+forumId+"&articleId="+articleId;
	}else if(forumId == '122'){
		parent.location="http://www.r2online.cn/channel.nhn?menuitem_param=1.2.0&requestFrame=notice!read&bbsId="+bbsId+"&forumId="+forumId+"&articleId="+articleId;
	}else if(forumId == '123'){
		parent.location="http://www.r2online.cn/channel.nhn?menuitem_param=1.3.0&requestFrame=notice!read&bbsId="+bbsId+"&forumId="+forumId+"&articleId="+articleId;
	}else if(forumId == '124'){
		parent.location="http://www.r2online.cn/channel.nhn?menuitem_param=1.4.0&requestFrame=notice!read&bbsId="+bbsId+"&forumId="+forumId+"&articleId="+articleId;
	}
}

//top notice
function show_top(str,forumId){
		var arr=['yxgg','bbgx','hdxw','mtbd'];
		for(i=0;i<arr.length;i++){
			var lf=document.getElementById(arr[i]+'_link');
			//var tf=document.getElementById(arr[i]+'_top');
			if(arr[i]==str){
				lf.className="on";
				//tf.style.display="block";
				document.getElementById("forumId").value = forumId;
			}else{
				lf.className="";
				//tf.style.display="none";
			}
		}
		var frm = document.getElementById('topNotice');
		frm.src = "http://www.r2online.cn/notice.nhn?m=top5&bbsId=NOTICE&forumId="+forumId;
		
	}
	
function goMenu(menuId){
	if(menuId == '0.0.0'){
		parent.location="http://www.r2online.cn/index.jsp";
	}else{
		if(parent.indexFrame != null){
			parent.indexFrame.location="http://www.r2online.cn/channel.nhn?menuitem_param="+menuId;
		}else{
			parent.location="http://www.r2online.cn/channel.nhn?menuitem_param="+menuId;
		}
	}
}

function goOtherMenu(menuId){
		parent.location="http://www.r2online.cn/channel.nhn?menuitem_param="+menuId;
}

function openRegister(){
	window.open("http://www.r2online.cn/login!register.nhn","_blank","");
}
