<!--
function domlay(id,trigger) {
if(top.nav.document.readyState =='complete' || top.nav.document.body || document.layers){
// Layer visible
if (trigger=="1"){
	if (document.layers) document.layers[''+id+''].visibility = "show"
	else if (document.all) document.all[''+id+''].style.visibility = "visible"
	else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"				
	}
// Layer hidden
else if (trigger=="0"){
	if (document.layers) document.layers[''+id+''].visibility = "hide"
	else if (document.all) document.all[''+id+''].style.visibility = "hidden"
	else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"				
	}
}
}

function setBar(here){
if(top.nav.document.readyState =='complete' || top.nav.document.body){

domlay('bg_over',0);
domlay('bg_down',0);
domlay('bg_ex',0);
domlay('bg_typo',0);
domlay('bg_col',0);
domlay('bg_con',0);
domlay('' + here + '',1);
}

}

// The navigation

function navigate(id,trigger,lax,lay,content) {
/*	(original function name: "domlay") 
 * Cross browser Layer visibility / Placement Routine
 * Done by Chris Heilmann (mail@ichwill.net)
 * Feel free to use with these lines included!
 * Created with help from Scott Andrews.
 * The marked part of the content change routine is taken
 * from a script by Reyn posted in the DHTML
 * Forum at Website Attraction and changed to work with
 * any layername. Cheers to that!
 * Welcome DOM-1, about time you got included... :)
 */

// Layer visible

if (trigger=="1"){
	if (document.layers) top.main.document.layers[''+id+''].visibility = "show"
	else if (document.all) top.main.document.all[''+id+''].style.visibility = "visible"
	else if (document.getElementById) top.main.document.getElementById(''+id+'').style.visibility = "visible"				
	}
// Layer hidden
else if (trigger=="0"){
	if (document.layers) top.main.document.layers[''+id+''].visibility = "hide"
	else if (document.all) top.main.document.all[''+id+''].style.visibility = "hidden"
	else if (document.getElementById) top.main.document.getElementById(''+id+'').style.visibility = "hidden"				
	}
// Set horizontal position	
if (lax){
	if (document.layers){top.main.document.layers[''+id+''].left = lax}
	else if (document.all){top.main.document.all[''+id+''].style.left=lax}
	else if (document.getElementById){top.main.document.getElementById(''+id+'').style.left=lax+"px"}
	}
// Set vertical position
if (lay){
	if (document.layers){top.main.document.layers[''+id+''].top = lay}
	else if (document.all){top.main.document.all[''+id+''].style.top=lay}
	else if (document.getElementById){top.main.document.getElementById(''+id+'').style.top=lay+"px"}
	}
	
// change content

if (content){
	//	var pages = content + "Pages";
	//	var urls = content + "Urls";

//	define content for various sections
		 if (content == "overview"){
		var pages = overviewPages;
		var urls = overviewUrls;
		//var icon = aboutIcon;
		}
		else if (content == "downloads"){
		var pages = downloadsPages;
		var urls = downloadsUrls;
		//var icon = contactIcon;
		}
		else if (content == "examples"){
		var pages = examplesPages;
		var urls = examplesUrls;
		//var icon = studyIcon;
		}
		else if (content == "colors"){
		var pages = colorsPages;
		var urls = colorsUrls;
		//var icon = newsIcon;
		}
		else{
		var pages = '0';
		var urls = '0';
		var icon = '0';
	}	

		var spacer = "<img src=nav_images/shim.gif width=124 height=16 border=0>";
	
//end definition bit

if (document.layers){

	sprite=top.main.document.layers[''+id+''].document;
	// add father layers if needed! document.layers[''+father+'']...
  	sprite.open();
  	sprite.write('<layer onMouseOut="navigate(\'menu\',0)";><img src=nav_images/shim.gif width=1 height=8 border=0><br>');
  	for (var i = 0; i < pages.length; i++) {
  	sprite.write('<img src=nav_images/shim.gif width=10 height=16 border=0><a href=' + urls[i] + ' class=subnav>' + pages[i] + '</a><img src=nav_images/shim.gif width=6 height=6 border=0><br>'); 	
	}
	sprite.write(spacer +'</layer>');
	sprite.close();
	}
else if (document.all) {

top.main.document.all[''+id+''].innerHTML= '';

	for (var i = 0; i < pages.length; i++) {	
text ='<img src=nav_images/shim.gif width=10 height=16 border=0><a href=' + urls[i] + ' class=subnav>' + pages[i] + '</a><img src=nav_images/shim.gif width=6 height=6 border=0><br>';
top.main.document.all[''+id+''].innerHTML= top.main.document.all[''+id+''].innerHTML + text;
}	
top.main.document.all[''+id+''].innerHTML= top.main.document.all[''+id+''].innerHTML + spacer;
}
else if (document.getElementById){
	//Thanx Reyn!

	rng = top.main.document.createRange();
	el = top.main.document.getElementById(''+id+'');
	rng.setStartBefore(el);
	

	htmlFrag = rng.createContextualFragment(content)
	
	while(el.hasChildNodes()) el.removeChild(el.lastChild);
		for (var i = 0; i < pages.length; i++) {
		el.appendChild(rng.createContextualFragment('<img src=nav_images/shim.gif width=10 height=16 border=0><a href=' + urls[i] + ' class=subnav>' + pages[i] + '</a><img src=nav_images/shim.gif width=6 height=6 border=0><br>'));
	}
		el.appendChild(rng.createContextualFragment(spacer));
	// end of Reyn ;)
   }	
   } 
}

function jump(toPage){

var toPage;
window.top.main.location.href = toPage;

}

function swoop(){
window.top.main.document.location.href = window.top.main.document.location.href + '#start';
}

// stop hiding -->
