function getCookie (name) {var dcookie = document.cookie; var cname = name + "=";var clen = dcookie.length;var cbegin = 0;        while (cbegin < clen) {        var vbegin = cbegin + cname.length;                if (dcookie.substring(cbegin, vbegin) == cname) {                 var vend = dcookie.indexOf (";", vbegin);                        if (vend == -1) vend = clen;                return unescape(dcookie.substring(vbegin, vend));                }        cbegin = dcookie.indexOf(" ", cbegin) + 1;                if (cbegin == 0) break;        }return null;}function setCookie (name, value, expires) {        if (!expires) expires = new Date();document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() +  "; path=/";}function delCookie (name) {var expireNow = new Date();document.cookie = name + "=" +"; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";}function checkvoted(name, number, atag) {        if (getCookie(cookieName) == "true") 		{		atag.style.backgroundImage='url('+document.forms[0].DbPathField.value+'poll_on.gif)'		document._Enkat.svar.value=name;		document._Enkat.AnswerNumber.value=number;		setCookie(cookieName, "false", top.expdate);		document._Enkat.submit();		}	else 		{		alert('Du kan bara r\u00F6sta en g\u00E5ng!');		}}function offTemp() {        if (getCookie(cookieName) == "true") {        setCookie(cookieName, "offtemp", expdate);        history.go(0);        }}function thisLocation(){	var strLocationTmp = new String(window.location);	var strLocation = strLocationTmp.toLowerCase();	var str1 = new String(window.location.protocol + "//" + window.location.host + "/");	var str2 = new String(strLocation.substring(str1.length, (strLocation.indexOf("nsf")+3)) + "/");//	return str1 + str2;return "/home/da/mfraga.nsf/";}function storeAnwer(field){        if (getCookie(cookieName) == "true") 		{//		setCookie(cookieName, "false", top.expdate);		setCookie(cookieName, "false", expdate);		var cLocation=new String(thisLocation() + "startAnswer?OpenAgent&unid=" + document.forms.question.unid.value);		cLocation = cLocation + "&answer=" + field.value;		cLocation = cLocation + "&referens=" + document.forms.question.referens.value;//		cLocation = cLocation + "&referens=" + window.location;		top.location=cLocation;		}	else 		{		alert('Du kan bara r\u00F6sta en g\u00E5ng!');		}}
