This javascript will help you for navigating menus. When you click on a specific menu its content gets displayed on the same page without reloading. The tabination links are automatically created for every request. This script is ideal for showing multi-page contents without reloading the rest of the page each time.
Features
By using this javascript, we can create navigation menus.
Supports the tabination of multiple menus on the same page.
<!-- Script by hscripts.com --> <!-- More scripts @www.hscripts.com --> <script type="text/javascript"> var arr=new Array('img1','img2','img3'); var arr1=new Array(); //set the number of menu var cnt=3; var tt; Array.prototype.inArray = function (value) { // Returns true if the passed value is found in the // array. Returns false if it is not. var i; for (i=0; i < this.length; i++) { if (this[i] == value) { return true; } } return false; }; function Show(Click_Menu) { tt=Click_Menu.id; for(i=1;i<=cnt;i++) { var tmp="display"+i; if(tmp==tt) { if(Click_Menu.style.display=="none") { Click_Menu.style.display=""; } } else { document.getElementById(tmp).style.display ="none"; } } } function change_color(iid) { arr1.splice(0,arr1.length); for(var i=0;i<=arr.length;i++) { if(arr[i]==iid) { } else { if(arr.inArray(arr[i])) arr1.push(arr[i]); } } document.getElementById(iid).style.backgroundColor="#008000"; for(var i=0;i<arr1.length;i++) { document.getElementById(arr1[i]).style.backgroundColor="#8AC452"; } } function disp() { document.getElementById('display1').style.display=""; document.getElementById('display2').style.display="none"; document.getElementById('display3').style.display="none"; } function ctck() { var sds = document.getElementById("dum"); if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");} var sdss = document.getElementById("dumdiv"); if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");} } </script> <!--Script by hscripts.com-->