//ADD BOOKMARK
function addBookmark(title,url) {
		if (window.sidebar) {
		    window.sidebar.addPanel(title, url,"");
		} else if( document.all ) {
		    window.external.AddFavorite( url, title);
		} else if( window.opera && window.print ) {
		    return true;
		}
	}
	
	

// PRINT
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

//CENTERED WINDOW
function openCenteredWindow(url, w, h) {
	var screenWidth  = screen.availWidth;
   	var screenHeight = screen.availHeight;

	var left = (screenWidth - w)/2;
	var top = (screenHeight - h)/2;

	var winName = Math.round(Math.random() * 10000000);

	window.open(url,winName,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h+",left="+left+",top="+top)
}
function openCenteredFlash(url, width, height, title) {
			var screenWidth  = screen.availWidth;
			var screenHeight = screen.availHeight;
			var left = (screenWidth - width)/2;
			var top = (screenHeight - height)/2;
			si_window=window.open('', "_blank", "width="+width+", height="+height+",left="+left+",top="+top);
			si_window.document.open();
			si_window.document.writeln('<html><head><title>' + title + '</title>');
			si_window.document.writeln('<style type="text/css" media="screen">');
			si_window.document.writeln('<!--');
			si_window.document.writeln('  body { margin: 0px; padding: 0px; }');
			si_window.document.writeln('-->');
			si_window.document.writeln('</style>');
			si_window.document.writeln('</head><body">');
			si_window.document.writeln('<object width="' + width + '" height="' + height + '"><param name="movie" value="' + url + '"></param><param name="wmode"></param><embed src="' + url + '" type="application/x-shockwave-flash" wmode="transparent" width="' + width + '" height="' + height + '"></embed></object>');
			si_window.document.writeln('</body></html>');
			si_window.document.close();
}


//-----------------------------------------
// SUB MENU
//-----------------------------------------



var menuids=["menulist"]



function buildsubmenus(){
	if (document.getElementById("menulist"))
{
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
		if (ultags[t].parentNode.parentNode.id==menuids[i])
			ultags[t].style.right=ultags[t].parentNode.offsetWidth+"px"
		else
		  ultags[t].style.right=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px"
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
		for (var t=ultags.length-1; t>-1; t--){
		ultags[t].style.visibility="visible"
		ultags[t].style.display="none"
		}
  }
  
}
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)

function show(itemID,srcID) {
	el = document.getElementById(itemID);
	if (el) {
		el.style.visibility = 'visible';
		el.style.display = 'block';
	}
		if (srcID)
		{
			el2.src='images/hide.gif';
		}
}

function hide(itemID,srcID) {
	el = document.getElementById(itemID);
	if (el) {	
		el.style.visibility = 'hidden';
		el.style.display = 'none';
	}
			if (srcID)
		{
		el2.src='images/show.gif';
		}
}