// JavaScript Document
function openWin(strurl)
{
	if(strurl!="")
	{
		window.open(strurl,'voteresult','height=250px,width=500px');
	}
}
function openGalery(strurl)
{
	var width = 610;
    var height = 490;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",left=" + left + ",top=" + top + 
        ",screenX=" + left + ",screenY=" + top;

	if(strurl!="")
	{
		window.open(strurl,'galery',windowFeatures);
	}
}

function CheckVote(err_report)
{
	var isOk=false;
	
	var alen = document.frmVote.elements.length;
	var ary="";
	
	alen = (alen>2)?document.frmVote.check.length:0;
	//alert(alen);
	for(var i=0;i<alen;i++)
		{
		if(document.frmVote.check[i].checked==true)
			{
			isOk=true;
			ary +=  document.frmVote.check[i].value+',';
			}
		}
	if(isOk)
	{
		var intlen= ary.length;
		ary = ary.substring(0,intlen-1);
		return openWin('index.php?page=voteresult&id='+ary);
	}
	else
	{
		alert(err_report);
		return false;
	}
}