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;
			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(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;
			}
		}
  	}
}
