
function do_nav_html(pagetitle) {
	
	var testarray = new Array();

    testarray[0] = new Array("Home", "/newsite/");
	testarray[1] = new Array("Products", "#", "Products Home", "#", "Material", "#", "Components", "#");
    testarray[2] = new Array("Applications", "/newsite/applications/app_isolator.htm", "Isolator", "/newsite/applications/app_isolator.htm", "Ellipsometry", "/newsite/applications/app_ellips.htm", "E-O Switch", "/newsite/applications/app_EOswitch.htm", "DPSS", "/newsite/applications/app_DPSS.htm");
    testarray[3] = new Array("Exhibitions", "/newsite/exhibitions/exhibitions.htm");
    testarray[4] = new Array("About us", "/newsite/about/profile.htm", "Company Profile", "/newsite/about/profile.htm", "Contact us", "/newsite/about/contact.htm", "Distributor", "/newsite/about/distributor.htm");
    testarray[5] = new Array("News", "/newsite/news/news.htm");

    var Material_array = new Array("Birefringent Crystals", "biref_crystals/biref_crystals.htm", "Laser Crystal", "laser_crystal/laser_crystal.htm", "NLO Crystal", "NLO_crystal/NLO_crystal.htm", "Passive Crystals", "passive_crystal/passive_crystal.htm", "E-O Crystal", "electro_optics/electro_optics.htm", "Farady Crystal", "farady_crystal/farady_crystal.htm", "Optical Crystal", "optical_crystal/optical_crystal.htm", "Optical Glass", "optical_glass/optical_glass.htm", "Color Glass", "color_glass/color_glass.htm");
    var Components_array = new Array("Waveplate", "waveplate/waveplate.htm", "Polarizer", "polarizer/polarizer.htm", "Birefringent Filter Plate", "biref_filter/biref_filter.htm", "Lens", "lens/lens.htm", "Prism", "prism/prism.htm", "Windows", "windows/windows.htm", "E-O Switch", "E-O/EO_switch.htm", "A-O Switch", "A-O/AO_switch.htm");

	var HTMLCode = "";
	HTMLCode += "<ul class=\"contain\">";
	for (i=0; i<testarray.length; i++)
	{
		if (testarray[i].length < 3) {
		   if (testarray[i][0] == pagetitle) 
		   {
			   HTMLCode += "<li class=\"active\"><a href=\"" + testarray[i][1] + "\" class=\"toppernav\">" + testarray[i][0] + "</a></li>";
		   } else {
			   HTMLCode += "<li class=\"top\"><a href=\"" + testarray[i][1] + "\">" + testarray[i][0] + "</a></li>";
		   }		    
		} else {
		   if (testarray[i][0] == pagetitle) 
		   {
			   HTMLCode += "<li class=\"active\"><a href=\"" + testarray[i][1] + "\" class=\"toppernav\">" + testarray[i][0] + "</a><ul>";
		   } else {
			   HTMLCode += "<li class=\"top\"><a href=\"" + testarray[i][1] + "\">" + testarray[i][0] + "</a><ul>";
		   }

		   for (j=1; j<testarray[i].length/2; j++)
		   {
			   if (testarray[i][2*j] == 'Material')
			   {
				  HTMLCode += "<li class=\"opensubnav\"><a href=\"" + testarray[i][2*j+1] + "\">" + testarray[i][2*j] + "</a><ul>";
				  for (k=0; k<Material_array.length/2; k++)
				  {
					  HTMLCode += "<li><a href=\"/newsite/products/material/" + Material_array[2*k+1] + "\">" + Material_array[2*k] + "</a></li>";
				  }
				  HTMLCode += "</ul></li>";
			   } else if (testarray[i][2*j] == 'Components') {
				  HTMLCode += "<li class=\"opensubnav\"><a href=\"" + testarray[i][2*j+1] + "\">" + testarray[i][2*j] + "</a><ul>";
				  for (k=0; k<Components_array.length/2; k++)
				  {
					  HTMLCode += "<li><a href=\"/newsite/products/components/" + Components_array[2*k+1] + "\">" + Components_array[2*k] + "</a></li>";
				  }
				  HTMLCode += "</ul></li>";
			   } else {
				  HTMLCode += "<li class=\"\"><a href=\"" + testarray[i][2*j+1] + "\">" + testarray[i][2*j] + "</a></li>";		   
			   }
		   }
		   HTMLCode += "</ul></li>";
	    }    
	}
	HTMLCode += "</ul>";
	//document.write (HTMLCode); 
	if (navigator.appName=='Microsoft Internet Explorer') 
	{
       pageHeaderNav.innerHTML=HTMLCode;
	} else {
       document.write(HTMLCode);
	}
}

//footer info of all webpages
function do_footer_html() {
    var footer_str = "";
	footer_str += "<p>&copy;2007 Dayoptics Company. All rights reserved.</p>";
	if (navigator.appName=='Microsoft Internet Explorer') 
	{
       footer.innerHTML=footer_str;
	} else {
       document.write(footer_str);
	}
}