/** * * AJAX * */ function createHttpRequest() { /* Create a new XMLHttpRequest object to talk to the Web server */ var req = false; try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { try { req = new XMLHttpRequest(); } catch (e3) { req = false; } } } return req; } function setHandler(req, handler) { try { req.onreadystatechange = handler; } catch (e) {} try { req.onload = handler; } catch (e) {} try { req.onerror = handler; } catch (e) {} } /** * * QUICKLISTS * */ function hideAllQuickLists() { document.getElementById("quicklist_toprated").style.display = "none"; document.getElementById("quicklist_users").style.display = "none"; document.getElementById("quicklist_new").style.display = "none"; document.getElementById("quicklist_updated").style.display = "none"; document.getElementById("quicklist_comments").style.display = "none"; document.getElementById("quicklist_popular").style.display = "none"; document.getElementById("quicklist_link_toprated").setAttribute("class","switchlink"); document.getElementById("quicklist_link_users").setAttribute("class","switchlink"); document.getElementById("quicklist_link_new").setAttribute("class","switchlink"); document.getElementById("quicklist_link_updated").setAttribute("class","switchlink"); document.getElementById("quicklist_link_comments").setAttribute("class","switchlink"); document.getElementById("quicklist_link_popular").setAttribute("class","switchlink"); } function switchQuickList($list) { hideAllQuickLists(); document.getElementById("quicklist_" + $list).style.display = "block"; document.getElementById("quicklist_link_" + $list).setAttribute("class","switchlink_active"); document.getElementById("quicklist_link_" + $list).blur(); createCookie("t3a_qlist",$list,356); } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; //alert(document.cookie); } function getById( id ) { if(document.getElementById) { return document.getElementById(id); } else if(document.all) { return document.all[id]; } return null; } function js_vardump(obj, parent) { for (var i in obj) { if (parent) { var msg = parent + "." + i + "\n" + obj[i]; } else { var msg = i + "\n" + obj[i]; } if (!confirm(msg)) { return; } if (typeof obj[i] == "object") { if (parent) { js_vardump(obj[i], parent + "." + i); } else { js_vardump(obj[i], i); } } } } function openVideoWindow($file) { window.open('video.php?file=' + escape($file).replace('/','%2F') + '&width=800&height=600','','width=826,height=626,scrollbars=no'); } function openVideoWindow2($file,$w,$h) { window.open('video.php?file=' + escape($file).replace('/','%2F') + '&width='+$w+'&height='+$h,'','width='+($w+26)+',height='+($H+26)+',scrollbars=no'); }