var alert_up = 0; var ajaxObj = getXMLHttpRequestObject(); function get_notif(xg) { if(ajaxObj) { if (ajaxObj.readyState == 4 || ajaxObj.readyState == 0) { alert_up = 0; var URL = "http://www.thorgaming.com/badges/ajax.php?aj=1&gampg=1&hei=413"; document.getElementById('notif_wrap').style.display = "none"; if (xg != 1) { if (cur_stab == 1) { showhigh(1); } else if (cur_stab == 2) { showpb(); } else if (cur_stab == 3) { showchat(); } else if (cur_stab == 4) { showtourn(); } document.getElementById('notif_wrap').style.height = "1px"; } ajaxObj.open("GET", URL, true); ajaxObj.onreadystatechange = handleResponse; ajaxObj.send(null); } } } function delay_notif() { if (document.getElementById('notif_wrap').style.display == "none") { setTimeout("get_notif()", 5000); } } function skip_notif(xg) { if(ajaxObj) { if (ajaxObj.readyState == 4 || ajaxObj.readyState == 0) { alert_up = 0; var URL = "http://www.thorgaming.com/badges/ajax.php?aj=1&skip=1"; document.getElementById('notif_wrap').style.display = "none"; if (xg != 1) { if (cur_stab == 1) { showhigh(1); } else if (cur_stab == 2) { showpb(); } else if (cur_stab == 3) { showchat(); } else if (cur_stab == 4) { showtourn(); } document.getElementById('notif_wrap').style.height = "1px"; } document.getElementById('notif').innerHTML = ""; ajaxObj.open("GET", URL, true); ajaxObj.onreadystatechange = handleResponse; ajaxObj.send(null); } } } function handleResponse() { if (ajaxObj.readyState == 4) { if (ajaxObj.status == 200) { if (ajaxObj.responseText != "") { document.getElementById('notif').innerHTML = ajaxObj.responseText; alert_up = 1; document.getElementById('notif_wrap').style.display = ""; tabs_hideall(-1); document.getElementById('notif_wrap').style.height = "413px"; } } } } get_notif(1);