/* MostWanted function - fills up the main div with the appropriate tab content - according to the clicked tab*/ function UpdateMainDiv(currTab) { var TabView = document.getElementById("TabView"); var MenuDiv = document.getElementById("MainDiv"); var Tab = TabView.firstChild; document.getElementById('a_stores').className = "tab last"; document.getElementById('a_manuf').className = "tab"; document.getElementById('a_products').className = "tab"; var url; switch(currTab.id) { case "a_stores": url = "/most/most_stores.php"; currTab.className += " current last"; ajaxpage("most_stores.php", 'MainDiv'); break; case "a_manuf": url = "/most/most_brands.php"; currTab.className += " current"; //MenuDiv.innerHTML = "balon"; ajaxpage('most_brands.php', 'MainDiv'); break; case "a_products": url = "/most/most_products.php"; currTab.className += " current"; ajaxpage("most_products.php", 'MainDiv'); break; } /*new Ajax(url, { method: 'get', update: $('MainDiv'), postBody: 'name='+ $F('MainDiv') , onComplete: function() {} }).request(); */ } function InitMainDiv(TabName, currTab) { UpdateMainDiv(document.getElementById("a_products")); /*new Ajax(url, { method: 'get', update: $('MainDiv'), onComplete: function() {} }).request(); */ }