function write_mt(x,y,z){ document.write("<a href='mailto:", y, "@", x, "'>", z, "</a>"); }
function write_ml(x,y){ document.write("<a href='mailto:", y, "@", x, "'>", y, "@", x, "</a>"); }

function textClear(id) {if (id.value == id.defaultValue) id.value = "";}
function textRestore(id){ if (id.value == "") id.value = id.defaultValue;}


function toggle(id) {
if(document.getElementById(id).style.display=='block') 
	document.getElementById(id).style.display='none';
else
	document.getElementById(id).style.display='block';
}


function SelectText(id){

		if(document.getElementById('block0'+id).style.display!='block'){
			
			ClearAll();
			document.getElementById('block0'+id).style.display='block';
			document.getElementById('menu0'+id).className='buttonAct';
			}

}

function ClearAll(){
	for(i=1; i<4; i++){
		if(document.getElementById('block0'+i).style.display=='block'){
			   document.getElementById('block0'+i).style.display='none';
			   document.getElementById('menu0'+i).className= "button";
			  }
	}
			  

}

function OverNav(id){

		if(document.getElementById('block0'+id).style.display=='none'){
			document.getElementById('menu0'+id).className="buttonOn";
			}

}


function OutNav(id){

		if(document.getElementById('block0'+id).style.display=='none'){
			document.getElementById('menu0'+id).className="button";
			}

}

function initDoc(){

	document.getElementById('block00').style.display='block';
	document.getElementById('block01').style.display='block';
	document.getElementById('block02').style.display='none';
	document.getElementById('block03').style.display='none';

 if(window.location.href == "http://"+window.location.host+"/dark/#web")
 	{ SelectText(1); }
 	else if(window.location.href == "http://"+window.location.host+"/dark/#id")
 	{ SelectText(2); }
 	else if(window.location.href == "http://"+window.location.host+"/dark/#gui")
 	{ SelectText(3); }


}