var alert_up = 0; function get_notif(xg) { alert_up = 0; var URL = "http://www.thorgaming.com/badges/ajax.php?aj=1&gampg=1&hei=393"; 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"; } do_req(URL, handleResponse); } function delay_notif(xg) { if (document.getElementById('notif_wrap').style.display == "none") { setTimeout("get_notif(" + xg + ")", 5000); } } function skip_notif(xg) { 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 = ""; do_req(URL, handleResponse); } function handleResponse(res) { if (res != "") { document.getElementById('notif').innerHTML = res; alert_up = 1; document.getElementById('notif_wrap').style.display = ""; tabs_hideall(-1); document.getElementById('notif_wrap').style.height = "393px"; } } delay_notif(1);