var	doubleclickord=Math.random()*1000000000;
function popWin(newURL,wth,hgh)
{
	window.open(newURL,'','width='+wth+',height='+hgh+',left=70,top=130,scrollbars=yes');
}
<!--
function NewWin(newURL,wth,hgh)
{
	window.open(newURL,'','width='+wth+',height='+hgh+',left=70,top=130,scrollbars=yes');
}
function checkns4() {
	if (document.layers) {
		document.write("<style>");	
		document.write("BODY { margin-left: 2px }");
		document.write("</style>");
		}
	}
	checkns4();
	NS4 = (document.layers);
	IE4 = (document.all);
	ver4 = (IE4);  
	isMac = (navigator.appVersion.indexOf("Mac") != -1);
	isMenu = (IE4 && !isMac); 
	function popUp(){return};
	function popDown(){return};
	function startIt(){return};
	if (!ver4) event=null;
//-->
function doSubmit(val){
	document.threadflatform.approve.value = val;
	document.threadflatform.submit();
}
function NewWin(newURL,wth,hgh){
	window.open(newURL,'','width='+wth+',height='+hgh+',left=70,top=130,scrollbars=yes');
}
function doScript(url) {
    window.location = url;
    return;
}
function saveProperty(threadId) {
	var styleClass=document.getElementById('titleColor').value
	var  bold="";
	if(document.getElementById("boldfaced").checked == true)
	{
		bold="Y";
	}
	window.location.href="EditStyle.jspa?styleContent="+styleClass+"&threadId="+threadId+"&bold="+bold;
}
function vote(pollForm,option,pollId,objectId)
{
	var action = "/ajaxVote.jspa";
	var pars ="pollId="+pollId+"&option="+option+"&objectId="+objectId;		
	var myAjax = new Ajax.Request(action,{method: 'post', parameters: pars, onComplete: updatePage} );
}
function updatePage(xmlHttp) 
{
	if (xmlHttp.readyState == 4) 
	{
	  	if (xmlHttp.status == 200) 
	  	{	
	  		var xmlobj = xmlHttp.responseXML;
	  		var status = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("status")[0].firstChild.data;
			var objectType= xmlobj.getElementsByTagName("result")[0].getElementsByTagName("objectType")[0].firstChild.data;
			var objectId = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("objectId")[0].firstChild.data;
			var optionCount = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("count")[0].getElementsByTagName("optionCount")[0].firstChild.data;
			var totalCount = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("count")[0].getElementsByTagName("totalCount")[0].firstChild.data;
			var totalCountId=document.getElementById("totalCount");
			if(status == "alreadyVoted")
			{
				alert('You had voted');
				return;
			}
			else if(status =="succVoted")
			{
				alert('Vote Success');
			}
			else if(status=="postOwner")
			{
				alert('You can not vote on your post');
				return;
			}
			else if(status=="blogOwner")
			{
				alert('You can not vote on your article');
				return;
			}
			else 
			{
				alert('System error. Please contact the system administrator.');
				return;
			}
			if(totalCountId != null){
				totalCountId.innerHTML = totalCount;
			}
			if(objectType==pollTypePost)
			{			
				for(var i=0;i<optionCount;i++)
				{
					var count = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("count")[0].getElementsByTagName("voteCount"+i)[0].firstChild.data;
					document.getElementById(objectId+"_"+i).innerHTML = count;
				}
			}else if(objectType==blog){
				var count = xmlobj.getElementsByTagName("result")[0].getElementsByTagName("count")[0].getElementsByTagName("voteCount0")[0].firstChild.data;
				document.getElementById("cnt").innerHTML = count;
			}
		}
  	}
}
function delComment(comment_id){
	if (window.confirm("Are you sure delete the comment?"))
	{
	//	alert("Testing");
		window.location.href="del_comment.jspa?comment_id="+comment_id;
	}
}

function apprComment(comment_id,entry_id){
	if (window.confirm("Approve the comment?"))
	{
		window.location.href="approve_comment.jspa?comment_id="+comment_id+"&entry_id="+entry_id;
	}
}
function setEntryToTop(entry_id){
	if (window.confirm("Are you sure to place it at the top?"))
	{
		window.location.href="set_entry_to_top.jspa?entry_id="+entry_id;
	}
}
function unsetEntryToTop(entry_id){
	if (window.confirm("Are you sure to cancel top positon?"))
	{
		window.location.href="set_entry_to_top!unset.jspa?entry_id="+entry_id;
	}
}
function delEntry(entry_id){
	if (window.confirm("Are you sure delte the article?"))
	{
		window.location.href="del_entry.jspa?entry_id="+entry_id;
	}
}
function init_srolltext(){
	 oScroll.scrollLeft = 0; 
	 setInterval('scrollUp()', 50); 
	} 
	 
	function scrollUp(){ 
	 if(isStoped) return; 
	 curTop += 1; 
	 if(curTop == 20) { 
	 stopTime += 1; 
	 curTop -= 1; 
	 if(stopTime == 10) { 
	 curTop = 0; 
	 stopTime = 0; 
	 } 
	 }else{ 
	 preTop = 190; 
	 oScroll.scrollTop += 1; 
	 if(preTop == oScroll.scrollTop){ 
	 oScroll.scrollTop = 0; 
	 //oScroll.scrollTop += 1; 
	 } 
	 } 
	} 
	
	
  function setTab(tabname,i){
	var tab_a = tabname + "_1";
	var tab_b = tabname + "_2";
	var clip_a = tabname + "_clip_1"
	var clip_b = tabname + "_clip_2"
	// alert(tabname);
	switch(i){
		case 1:
		document.getElementById(tab_a).style.display = "block";
		document.getElementById(tab_b).style.display = "none";
		document.getElementById(clip_a).className="tabon";
		document.getElementById(clip_b).className="taboff";
		break;
		case 2:
		document.getElementById(tab_a).style.display = "none";
		document.getElementById(tab_b).style.display = "block";
		document.getElementById(clip_a).className="taboff";
		document.getElementById(clip_b).className="tabon";
		break;
		}
}

