	/*******  javascript for popup windows.      *******/
	//<!--
	function WinCenter(wfile, wname, ww, wh) {
		var maxwidth, maxheight;
		var xpos, ypos;
		
		maxwidth 	= screen.availWidth;
		maxheight	= screen.availHeight;
		xpos = maxwidth/2 - ww/2;
		ypos = maxheight/2 - wh/2 -20;
		
		return open(wfile, wname,"left="+xpos +",top="+ypos +",width="+ww +",height="+wh +",resizable=1,scrollbars=1,menubar=no, location=no");
	}
	function PrivacyPolicy(lang)
	{
		WinCenter("privacypolicy.aspx?lang="+lang,"PrivacyPolicy",370,400);
	}
	function TermsOfService(lang)
	{
		WinCenter("termsofservice.aspx?lang="+lang,"TermsOfService",370,400);
	}
	function SearchTips()
	{
		WinCenter("searchtips.htm","SearchTips",370,400);
	}
	function AlertTips()
	{
		WinCenter("alerttips.htm","AlertTips",370,400);
	}		
	/*******      javascript for vote control       *******/
	function VoteResult(uid,btn)
	{	
		if (btn == 'btnViewVote'){
		WinCenter("voteresult.aspx?uID=" + uid + "&chid=" + "&btn=" + btn  ,"VoteResult",370,400);
		}
		else{
			for(i=0;i<=(document.Form1.CtrlVote1_hidChoiceNo.value-1);i++){
				if ((btn == 'btnVote') && (document.getElementById('CtrlVote1_rblVoteChoice_'+i).checked))
				{
				WinCenter("voteresult.aspx?uID=" + uid + "&chid="+ document.getElementById('CtrlVote1_rblVoteChoice_'+i).value + "&btn=" + btn  ,"VoteResult",370,400);
				document.getElementById('CtrlVote1_rblVoteChoice_'+i).checked=false;
				
				}
			}
		}		
	}
	
	/*******     javascript for advanced search control     ********/
	function SelectAll(name)
	{			
		for (i=1;i<document.Form1.length;i++ )
		{
			if (document.Form1(i).name.indexOf(name,0) >= 0)
			{
			
				document.Form1(i).checked=true;
			}
		}
		return false;
	}
	function SelectNone(name)
	{
		for (i=1;i<document.Form1.length;i++ )
		{
			if (document.Form1(i).name.indexOf(name,0) >= 0)
			{	
				document.Form1(i).checked=false;
			}
		}
		return false;
	}		
	//-->