$(function () { /* ----------------------------------------------- * Loading CSS -----------------------------------------------*/ $('.loadcss').each(function () { $('').attr({ rel: 'stylesheet', type: 'text/css', media: 'screen, print', href: $(this).attr('href') }).appendTo('head'); }); }); $(document).ready(function () { if (!ReadCookie('cookie_policy_accepted')) { var $appendElm = $(document.getElementsByClassName('footer')); if (!$appendElm.length) { return; } var setElm = ''; setElm += '
'; $appendElm.after(setElm); $appendElm.css('padding-bottom', '100px'); } }); function SetCookie(cookie_name, cookie_value, cookie_days_alive) { var exdate = new Date(); var hostname = location.hostname; hostname = hostname.substr(hostname.indexOf(".fujitsu")); exdate.setDate(exdate.getDate() + cookie_days_alive); var pathname = window.location.pathname; var path = '/'; pathname = pathname.split('/'); if (pathname) { if (pathname.length >= 2) { path += pathname[1]; } } var c_value = escape(cookie_value) + ((cookie_days_alive == null) ? "" : "; expires=" + exdate.toUTCString()) + "; path=" + path + "; domain=" + hostname.toString(); document.cookie = cookie_name + "=" + c_value; } function ReadCookie(cookie_name) { var i, x, y, ARRcookies = document.cookie.split(";"); for (i = 0; i < ARRcookies.length; i++) { x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("=")); y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1); x = x.replace(/^\s+|\s+$/g, ""); if (x == cookie_name) { return unescape(y); } } } function SetCookieAllowance() { SetCookie('cookie_policy_accepted', 'true', 999); window.location.reload(); if ($('#cookie-allowance').length != 0) { $('#cookie-allowance').css('display:none'); } } /*----------------Cookies start --------------*/ if (typeof String.prototype.startsWith != 'function') { String.prototype.startsWith = function (str) { return this.substring(0, str.length) === str; } }; /*--------------------End Cookies ------------------*/