| function yahooAjaxObject(url) { |
| var ac = document.getElementById('ajaxContent'); |
| |
| document.body.style.cursor="wait"; |
| var handleSuccess = function (o) { |
| ac.innerHTML = o.responseText; |
| ac.style.visibility = "visible"; |
| document.body.style.cursor="auto"; |
| }; |
| var handleFailure = function (o) { |
| ac.style.visibility = "visible"; |
| document.body.style.cursor="auto"; |
| }; |
| var callback = |
| { |
| success:handleSuccess, |
| failure:handleFailure, |
| cache:false |
| }; |
| //YAHOO.downloads.wait.show(); |
| var request = YAHOO.util.Connect.asyncRequest("GET", url, callback); |
| } |
| function SetActive(a) |
| { |
| var active = document.getElementById(a); |
| var deactivate = function (el) { YAHOO.util.Dom.removeClass(el,"active"); } |
| var tabs = YAHOO.util.Dom.getChildren('tabNavUl'); |
| var batch = YAHOO.util.Dom.batch(tabs, deactivate); |
| var packageVersion = document.getElementById('packagesVersion'); |
| |
| YAHOO.util.Dom.addClass(a, "active"); |
| } |
| function updateContent(e) |
| { |
| // If cookie is different OR Filter is set Fetch. |
| if (readCookie(activeCookie) != e || f !== undefined) |
| { |
| var exdate = new Date(); |
| exdate.setDate(exdate.getDate()+7); |
| document.cookie = activeCookie + "=" + escape(e) + ((7===null) ? "" : ";expires="+exdate.toGMTString()); |
| var url = "fetch/" + e + ".php"; |
| yahooAjaxObject(url); |
| SetActive(e); |
| } |
| } |
| |
| |
| |