  //FUNCTION
  function WebPoll_Submit(cookiename,btn){
var wakfcookiename=cookiename;
 makeCookie(wakfcookiename,vWebPollID,100,'/');
	var vField = document.forms[0].WebPoll_Result;
	var vOption = false;
	var vValue = "";
    
	for (var r=0; r < vField.length; r++){
	  if (vField[r].checked){
		vOption = r+1;
		vValue = vField[r].value;
	  }
	}
	if (vOption){
	  makeCookie(wakfcookiename,vWebPollID,60,'/');
	  location.replace("/" + vWebPollDB + "/vote?open&id=" + vWebPollID + "&vote=" + vValue + "&url=" + location.href);
btn.disabled=true;
btn.value='vent venligst';
	}else{
	  alert("Du skal vaelge hvad du vil stemme paa")
	}
    return false;
  }
function popup_window(the_page,the_target,the_width,the_height) {
  window.open(the_page,the_target,"status=no,menubar=no,scrollbars=no,resizable=no,width=" + the_width + ",height=" + the_height);
  return false;
}
/* ***********************************
     COOKIE FUNCTIONS
   *********************************** */
function makeCookie(Name,Value,Expiry,Path,Domain,Secure){
  if (Expiry != null) {
    var datenow = new Date();
    datenow.setTime(datenow.getTime() + Math.round(86400000*Expiry));
    Expiry = datenow.toGMTString();
  }
  Expiry = (Expiry != null) ? '; expires='+Expiry : '';
  Path = (Path != null)?'; path='+Path:'';
  Domain = (Domain != null) ? '; domain='+Domain : '';
  Secure = (Secure != null) ? '; secure' : '';
  document.cookie = Name + '=' + escape(Value) + Expiry + Path + Domain + Secure;
}
function readCookie(Name) {
  var cookies = document.cookie;
  if (cookies.indexOf(Name + '=') == -1) return null;
  var start = cookies.indexOf(Name + '=') + (Name.length + 1);
  var finish = cookies.substring(start,cookies.length);
  finish = (finish.indexOf(';') == -1) ? cookies.length : start + finish.indexOf(';');
  return unescape(cookies.substring(start,finish));
}
