// JavaScript Document
function showit(id) 
{
/* this function i can call myown, it started out with 
http://rasmusen.org/t/2007/10/arvind-satyanarayans-toggle-visibility.html#
which was a simple show hide function for one element
with lots of modification i reached this function which toggels on element
to Block (whihc is show) and it turns all other elements to none (whihc is 
hide. the only requirement is that the Id for the elements used be numbers
**this will control the top navigation, and show data relative to what is 
pressed where as hiding all data of all other buttons of the nav
Layth Sudairy
*/


// to make the iframes go to black instead of holding the loaded doc in them
document.getElementById('iframe_search').setAttribute('src','none.html');
document.getElementById('iframe_adv_search').setAttribute('src','none.html');
// end o fmake iframe blank

var z = document.getElementById(id); 
//alert(id);
z.style.display = 'block'; //makes the elelement that was clicked be displayed
//this is the loop that will make everything else be hidden.. change the number
//5 to whatever number .. i only have 5 buttons so it is 5
for (n=1;n<=12;n++)
	{
var o= document.getElementById(n); //from 1 to 5 we will make the element hidden 
// unless they are the element that was clicked -- accomplished by this if statement
if(id != n ){ // if the element does not match what we pressed we make it hidden
//alert(n);
o.style.display = 'none';
			}

	}


// these are the additional stuff to do 
//alert("before");
/*

if(id == 4 || id==5 || id==7)
		{
	//alert ("if id =4 then show 9 also");
	document.getElementById('9').style.display = 'block';
	document.getElementById('search').src =  "none.php";
		}
if(id==7)
		{
	document.addstore.reset();
		}
*/
}
// end of function showit
//



// i dont we are gonna use this
function showit2(id)
{
	
var x = document.getElementById(id);
if (x.style.display == 'block')
	{
		
x.style.display = 'none';
	}else 
	{
		x.style.display = 'block';
		
	}
}
//	obj = document.getElementById(obj);
//	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';



