function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());} function getCookie(c_name){ if (document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1){ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; }function checkCookie(){ cookie=getCookie('fabasHga'); if (cookie!=null && cookie!=""){ /*Welcome again +cookie+*/ }else{ cookie = ((new Date()).getTime() + "" + Math.floor(Math.random() * 1000000)).substr(0, 18); if (cookie!=null && cookie!=""){ setCookie('fabasHga',cookie,365); } } } checkCookie(); function sendRequest(url, poststr){ var scripts = document.getElementsByTagName('script'); for(var i=0; i < scripts.length; i++){ if(scripts[i].src == 'http://www.handlarguiden.com/hgS.js'){ var newcontent = document.createElement('div'); newcontent.id = 'hgaWordsOuter'; scripts[i].parentNode.insertBefore(newcontent, scripts[i]); cookie=getCookie('fabasHga'); document.getElementById('hgaWordsOuter').innerHTML = '<iframe id="hgaWordsInner" width="'+parseInt(parseInt(handlarguiden_width) - parseInt(2))+'" src="'+url+'?coJS='+cookie+'&'+poststr+'" frameborder="0" height="'+handlarguiden_height+'" style="border:1px solid #'+handlarguiden_colorBorder+';" marginwidth="0" marginheight="0" scrolling="no"></iframe>'; break; } } } var theText = ''; if(handlarguiden_titleTake != '0'){theText += ' '+document.title;} if(handlarguiden_elementId != '0'){theText += ' '+document.getElementById(handlarguiden_elementId).innerHTML;} if(handlarguiden_specifyWords != '0'){theText += ' '+handlarguiden_specifyWords;} 	  /*var handlarguiden_adColor = handlarguiden_adColor;  var handlarguiden_adText = handlarguiden_adText; var handlarguiden_adLine = handlarguiden_adLine;*/ try{var handlarguiden_adColor = handlarguiden_adColor;}catch(err){handlarguiden_adColor = 'EEEEEE';}try{var handlarguiden_adText = handlarguiden_adText;}catch(err){var handlarguiden_adText = '3e3e3e';}try{var handlarguiden_adLine = handlarguiden_adLine;}catch(err){var handlarguiden_adLine = 'c0c0c0';} var poststr = "site=" + encodeURI( handlarguiden_site ) + "&colorLink=" + encodeURI( handlarguiden_colorLink ) + "&slots=" + encodeURI( handlarguiden_slots ) + "&colorBorder=" + encodeURI( handlarguiden_colorBorder ) + "&colorBackground=" + encodeURI( handlarguiden_colorBackground ) + "&colorRubrik=" + encodeURI( handlarguiden_colorRubrik ) + "&colorText=" + encodeURI( handlarguiden_colorText ) + "&text=" + encodeURI( theText ) + "&width=" + encodeURI( handlarguiden_width ) + "&adColor=" + encodeURI( handlarguiden_adColor ) + "&adText=" + encodeURI( handlarguiden_adText ) + "&adLine=" + encodeURI( handlarguiden_adLine ); sendRequest('http://www.handlarguiden.com/export.php', poststr);