//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, width, height) {
			var screenWidth  = screen.availWidth;
			var screenHeight = screen.availHeight;
			var left = (screenWidth - width)/2;
			var top = (screenHeight - height)/2;
			si_window=window.open('', "_blank", "toolbar=no, location=no, menubar=no, resizable=no, status=no, scrollbars=1, width="+width+", height="+height+",left="+left+",top="+top);
			si_window.document.open();
			si_window.document.writeln('<html><head>');
			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('<img src="' + url + '">');
			si_window.document.writeln('</body></html>');
			si_window.document.close();
}

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(){
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)



