var html = '
'+ ''; var agreeConsentExpire = $('#agreeConsentExpire').val() ? parseInt($('#agreeConsentExpire').val()): 30; var defaultConsentExpire = $('#defaultConsentExpire').val() ? parseInt($('#defaultConsentExpire').val()) : 1; var techproLocale = getCookie('techproLocale') ? getCookie('techproLocale') : getLocaleByURL(); function agreePolicy() { generateCookie('cookieconsent', "1", agreeConsentExpire * 24 * 60 * 60, '/'); var url = "/config/dice/api.json?path=/tracking"; var tracking = {}, eventData = {}; tracking.eventSource = 'Techpro'; tracking.sourceIp = $('#pcip').length > 0 ? $('#pcip').val() : ''; tracking.entityId = $('#pid').length > 0 ? $('#pid').val() : 'Guest'; tracking.groupId = 'techpro-cookie-consent-DI'; tracking.eventType = 'cookie-consent'; //eventData.feedBackDescription = ; //eventData.feedBackId = feedbackVal; eventData.currentDate = new Date(); tracking.eventData = eventData; $.ajax({ type: "POST", url: url, data: JSON.stringify(tracking), datatype: "json", contentType: "application/json" }); showCookieConsent(); } function showCookieConsent(){ if( techproLocale =='en_GB' && getCookie('cookieconsent') != '1'){ $('#coockieConsentDiv').html(html); }else{ $('#coockieConsentDiv').html(''); } } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i