/* common functions */ if (!window.adnuvo_qp_gen_r){ function adnuvo_qp_gen_r(q_id,uv){ //total votes var total=0; var votes=eval('adnuvo_qp'+q_id); var as_cnt=eval('adnuvo_qp'+q_id+'_as_cnt'); var user_vote=(uv?uv.substring(uv.indexOf('_')+1):0); var user_vote_c=adnuvo_qp_getcookie('adnuvo_qp[c'+q_id+']'); var elm=null; var elm_resbar=null; for (var i=1;i0){ n=n.substring(1); } } else { if(c.checked) n=c.value; } if (n==""){ alert('Vælg venligst nyhedsbrev(e)!'); return; } if (!emailfilter.test(e.value)){ alert('Indtast venligst en gyldig e-mail!'); return; } a.src='http://nyhedsbreve.berlingske-mail.dk/data/quicksignup.php?email='+e.value+'&nlids='+n+'&lid='+location+'&mid='+publisher+'&rid=2'+'&_nosc='+Math.random(); } } if (!window.adnuvo_qp_setcookie){ function adnuvo_qp_setcookie(cookieName, cookieValue, expires, path, domain, secure) { //1 year cookie if (!expires){ var now = new Date(); expires = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365); } document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '; path=/') + (domain ? '; domain=' + domain : '') + (secure ? '; secure' : ''); } } if (!window.adnuvo_qp_getcookie){ function adnuvo_qp_getcookie(cookieName) { var cookieValue = false; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos)); else cookieValue = unescape(document.cookie.substring(posValue)); } return (cookieValue); } } if (!window.adnuvo_qp_init){ window.adnuvo_qp_init=1; }