// *****  Invisible labeles/search-boxes  *****
// set the searchbox value to label value
function setInputValue(inputId, labelId){
   document.getElementById(inputId).value = document.getElementById(labelId).innerHTML;
}
// clear a search box if it contains default text (label text)
function clearOnFocus(inputId, labelId){
   if(document.getElementById(inputId).value == document.getElementById(labelId).innerHTML) 
   document.getElementById(inputId).value = '';
}
// *****  Printing  *****
function printContent(){
if(window.frames.length > 0) // frames exists
{
	if (window.frames['printFrame']) { // printFrame exists
		window.frames['printFrame'].focus();
		window.frames['printFrame'].print();
	}else
		alert("This page can not be printed normally.\nTry to load the frame separately ")
} else {
	
	var printDiv = document.getElementById('content').innerHTML;
	document.open();
	document.write('<html><head><title>DPB - print</title></head><body onload="window.print()">');
	document.write(printDiv);
	document.write('</body></html>');
	document.close();
	}
return false;
}

// *****  Adding and changing id's in menu and stylesheet  *****
// make the breadcrumns in the menu
// I can't make webtop do it by itself :-(
function validateMenu(){
	if(document.getElementById("greenA5")){
		document.getElementById("greenA5").id = "greenA";
		return ;}
	if(document.getElementById("greenA4")){
		document.getElementById("greenA4").id = "greenA";
		return ;}
	if(document.getElementById("greenA3")){
		document.getElementById("greenA3").id = "greenA";
		return ;}
	if(document.getElementById("greenA2")){
		document.getElementById("greenA2").id = "greenA";
		return ;}
}
// makes the sitemap id's right 
// I can't make webtop do it by itself :-(
function validateSitemap(){
     if(document.getElementById("sitemap")){
	var sm = document.getElementById("sitemap").childNodes;
        sm.item(0).id = "sitemap1";
        sm.item(1).id = "sitemap2";
        sm.item(2).id = "sitemap3";
        sm.item(3).id = "sitemap4";
     }
     return;
}



