	function anketCookie() {
	    var today = new Date();
		var expires = 1000*60;
	    var expires_date = new Date(today.getTime() + expires);
	    
	    document.cookie = "_zaman_anket_=ok;expires=" 
	    	+ expires_date.toGMTString() + "; path=/";
	}
	
	function sonucgoster(url, anketId, totalNum){
		var h = 125 + (totalNum*30);
	    url += "anket.do?method=result&anket-id="+anketId;
	    window.open(url,'_blank','toolbar=no,resizable=yes,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=400,height='+h);
	    return false; 
	}

	function anketgonder(url, anketId, totalNum){
		var h = 125 + (totalNum*30);
		if(!navigator.cookieEnabled){
	       alert( "L\u00fctfen taray\u0131c\u0131n\u0131z\u0131n cookie deste\u011fini a\u00e7\u0131n\u0131z!");
	       return;
	    }
	    
	    var answer = null;
	    for (var i=0; i<totalNum; i++){
		   	var btn = document.getElementById("secenek-"+anketId+"-"+i)
	        if(btn && btn.checked){
	            answer = btn.value;
	            break;
	         }
	    }
	
	    if(answer==null){
	        alert("L\u00FCtfen bir se\u00E7im yap\u0131n\u0131z.");
	        return;
	    }

		anketCookie();	
		url += "anket.do?method=vote&anket-id="+anketId+"&secenek="+answer;
	    window.open(url,'_blank','toolbar=no,resizable=yes,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=400,height='+h);
	    return false;  
	}