function check_cookie() { if(getCookieforEU(getBaseURL())) { document.getElementById("eu_cookies").style.display="none"; } else { document.getElementById("eu_cookies").style.display="block"; } } function getCookieforEU(eu_cookie_name) { var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i function calltohide() { var exdate=new Date(); eu_cookie_name=getBaseURL(); value=randomString(); exdays=30; exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); //document.cookie=eu_cookie_name + "=" + c_value; document.cookie=eu_cookie_name + "=" + c_value +"; path=/"; document.getElementById("eu_cookies").style.display="none"; } function getBaseURL() { var url = location.href; // entire url including querystring - also: window.location.href; var baseURL = url.substring(0, url.indexOf('/', 14)); if (baseURL.indexOf('http://localhost') != -1) { // Base Url for localhost var url = location.href; // window.location.href; var pathname = location.pathname; // window.location.pathname; var index1 = url.indexOf(pathname); var index2 = url.indexOf("/", index1 + 1); var baseLocalUrl = url.substr(0, index2); return baseLocalUrl + "/"; } else { // Root Url for domain name return baseURL + "/"; } } function randomString() { var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; var string_length = 16; var randomstring = ''; for (var i=0; i