// JavaScript Document
ie=(document.all)? true:false;
function getWindowSizeAll(a){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){scrollSize=16;myWidth=(a)?window.innerWidth:window.screen.width;myHeight=(a)?window.innerHeight:document.body.parentNode.scrollHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=(a)?document.documentElement.clientWidth:document.body.offsetWidth;myHeight=(a)?document.documentElement.clientHeight:document.body.parentNode.scrollHeight;scrollSize=2;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=(a)?document.body.clientWidth:document.body.offsetWidth;myHeight=(a)?document.body.clientHeight:document.body.offsetHeight;scrollSize=2;}return[myWidth-scrollSize,myHeight];}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX= window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}return[scrOfX,scrOfY];}
function $(id){return document.getElementById(id);};
function spacialTag(txt){txt=txt.replace(/>/g,'&gt;');txt=txt.replace(/</g,'&lt;');return txt;}
function spacialChar(txt){txt=txt.replace(/\\u000a|\\u000d/g," ");txt=txt.replace(/\\u0026/g,"&");return txt;}
function getDataNode(p,t){try{return p.getElementsByTagName(t)[0].firstChild.nodeValue;}catch(e){return "";}};
function setCenter(id){$(id).style.left=((getWindowSizeAll(true)[0]-$(id).offsetWidth)/2+getScrollXY()[0])+"px";$(id).style.top=((getWindowSizeAll(true)[1]-$(id).offsetHeight)/2+getScrollXY()[1])+"px";};

function drawMaskdd(fn,obj){
	html="";
	mask=document.createElement('div');
	mask.setAttribute('id','mask');
	mask.style.left="0px";
	mask.style.top="0px";
	mask.style.bottom="0px";
	mask.style.position="absolute";
	mask.style.backgroundColor="#000000";
	
	document.body.appendChild(mask);
	mask.style.width=getWindowSizeAll(false)[0]+"px";
	mask.style.height=getWindowSizeAll(false)[1]+"px";
	if(ie){mask.style.filter="alpha(opacity=40)";}
	else{mask.style.opacity=0.4;}
	if(fn){mask.onclick=fn;mask.style.cursor="pointer"; }
}
function fadeUpdd(Id,step,fps){
	for(var i=0;i<=step;i++){
		setTimeout("fadeOpacity('"+Id+"',"+(Math.round(100/step)*i)+")",i*fps);
	}
};
function fadeOpacitydd(Id,Op){
	obj=$(Id);
	if(ie){obj.style.filter="alpha(opacity="+Op+")";}
	else{obj.style.MozOpacity=Op/100;}
}
function loaddingdd(fnCancel,obj){
	drawMaskdd(fnCancel,obj);
	loaddingNode=document.createElement('div');
	loaddingNode.setAttribute('id','loadding')
	loaddingNode.style.position="absolute";
	$(obj).style.display="block";
	document.body.appendChild(loaddingNode);
	setCenter('loadding');
	
}
function cancelLoaddd(){
	document.body.removeChild($('loadding'));
	document.body.removeChild($('mask'));
}
function closeManagedd(){
	cancelLoaddd();
	document.body.removeChild($('showManage'));
}


/*++++++++++++++++++++++++++*/
var old ="";
function dropdown(obj){
	$(obj).style.display="block";
}
var closetime = 0;
var old ="";
function dropdown(obj){
	if(obj!==old && old!=''){
		hidedropdown(old);
	}
	old=obj;
	clearTimeout(closetime);
	$(obj).style.display="block";
	closetime=setTimeout("hidedropdown('"+obj+"')",2000);
}

function showdropdown(obj){
	$(obj).style.display="block";
}

function hidedropdown(obj){
	$(obj).style.display="none";
}
function showManu(obj){
	if(obj!==old && old!=''){
		$(old).style.display="none";
	}
	old=obj;
	var oldStyle=$(obj).style.display;
	if(oldStyle=="none"){
		$(obj).style.display="block";
	}else{
		$(obj).style.display="none";
	}
	closetime=setTimeout("hidedropdown('"+obj+"')",3000);
}
function changeNewsGroup(obj,talkID){
		$('selectMenu').className="tab_normal";
		$('selectMenu').setAttribute('id',"");
		obj.setAttribute('id','selectMenu');
		obj.className="tab_select";
		thisNode=$('selectContent');
		thisNode.style.display="none";
		newsCaption=thisNode.getAttribute('caption');
		thisNode.setAttribute('id',newsCaption);
		newNode=$(talkID);
		newNode.style.display="block";
		newNode.setAttribute('id','selectContent');
}
function show(obj1,obj2){
	$(obj1).className="tab_selectR";
	$(obj2).className="tab_normalR";
		$('top'+obj1).style.display="block";
		$('top'+obj2).style.display="none";
}
