function getURLParam(strParamName) { var strReturn = ""; var strHref = window.location.href; if (strHref.indexOf("?") > -1) { var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase(); var aQueryString = strQueryString.split("&"); for (var iParam = 0; iParam < aQueryString.length; iParam++) { if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1) { var aParam = aQueryString[iParam].split("="); strReturn = aParam[1]; break; } } } return unescape(strReturn); } function onSubmit(username, password, id_c, id_e, id_p) { var f = document.getElementById("fLogin"); f.username.value = username; f.password.value = password; f.contentPath.value = "http://www.gazzetta.it/tr_xml_sics/HTML/match.html?id_c=" + id_c + "&id_e=" + id_e + "&id_p=" + id_p; f.submit(); } function popPhoto(link) { apri_popup_photogallery(link); } function updateHeight(h) { if (h > 750) { document.getElementById("flashDiv").style.height = (h) + "px"; } } var decriptPw = "1768"; dirPw = '1770'; clearPw = '32'; var upw = ""; document.onkeydown = function(event) { if (event != undefined) { if (event.keyCode == clearPw) { upw='' } else { upw += event.keyCode } } if (upw == decriptPw){upw=''; alert(easyDecrypt(window.location.href.split("?m=")[1]))}; if (upw == dirPw){upw=''; genDir()} ; } function genDir() { var strHref = window.location.href; window.location.href = so.getVariable('mainRoot') + so.getVariable('xmlSource') +( strHref.split('?id_c=')[1].split('&id_e=')[0]) + '/' + ( strHref.split('&id_e=')[1].split('&id_p=')[0] ) + '/' + strHref.split('&id_p=')[1] + '/'; } function easyDecrypt(str) { str = unescape(str); var strA = new Array(); for (var i = 0; i < str.length; i++) { strA[i] = str.charCodeAt(i) + 5; } str = ''; for (var i = 0; i < strA.length; i++) { str += String.fromCharCode(strA[i]); } return str; } try {var lenArrADV = _nameArray.length;} catch(e) { var _nameArray = new Array(); _nameArray[0] = "adv1"; _nameArray[1] = "manchette"; } function reloadADVandRS() { try { try { RedSheriffCounter.RedSheriffCounter("it_Matrix-it_0", document.location.href, true, RedSheriffCounter.TIMEOUT_INSTANTLY); RedSheriffCounter.start(); } catch(e) {} try { reloadEyeb(); } catch(e) {} try { reloadGa(); }catch(e){} try { WEBABACUS.logclientdata("01"); WEBABACUS.logclientdata('02'); WEBABACUS.logclientdata('03'); }catch(e){} try { reloadADV(); }catch(e){} } catch(e){} } var evento_ok = false; function matchCenterEvent(a, b, c, d) { if (a == "reportspolling" || a == "matchday" || a == "scorers" || a == "standings" || a == "positions" || a == "passes" || a == "distributions" || a == "shots" || a == "attacks") { reloadADVandRS(); } else if (a == "match") { if (evento_ok) { evento_ok = false; reloadADVandRS(); } } else if (!evento_ok && a == "matchpolling") { evento_ok = true; } else if (evento_ok && (a == "formations" || a == "commentary")) { reloadADVandRS(); } }