// JavaScript Document


function showpage($pageid){

// create object of all div tags in the document
var tag = document.getElementsByTagName('div')

// create the child layer object using the argument passed to the function


//the show/hide layer has an attribute nav="yes" in it
// to distiguish it from other DIV elements in the page
// by determining if that DIV element has the attribute
// i can make sure i'm affecting the show/hide layer DIV


for(x=0; x<tag.length; x++)
	{
	//hide all div layers with the 'nav' attribute
	if(tag[x].getAttribute("nav"))
		{
		tag[x].style.display="none";

			// show only the layer with the id passed as the argument
			// by the main function
		
		}
	}

document.getElementById('cpage'+$pageid).style.display = 'block';


}



