// JavaScript Document
activateMenu = function(nav) {

    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
        
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {                       
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}
window.onload= function(){
    /* pass the function the id of the top level UL */
    /* remove one, when only using one menu */
    activateMenu('mainnavul'); 

}


/* begin toggle div tags  */

function toggleVisibility() {
  var inc, endInc=arguments.length;
  for (inc=0; inc<endInc; inc+=2) {
    var id = arguments[inc];
    if (arguments[inc+1] == 'hidden') param = "hidden";
    else if(arguments[inc+1]=='visible') param = "visible";
    if (document.layers) document.layers['container'].layers[id].visibility = param;
    else if (document.all) eval("document.all." + id + ".style.visibility = \"" + param + "\"");
    else if (document.getElementById) eval("document.getElementById(id).style.visibility = \"" + param + "\"");
  }
}

/* end toggle div tags */

/* ***********************Begin Flash*********************** */
function activateFlash(swfURL) {
	if ( plugin ) {   
				var width = '450';
				var height = '300';
				var bgcolor = '#FFF';
				document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id="myMovieName" width="' + width + '" height="' + height + '">');
			 	document.write('<param name="movie" value="' + swfURL + '" />');
				document.write('<param name="quality" value="autohigh" />');
				document.write('<param name="menu" value="false" />');
				document.write('<param name="wmode" value="transparent" />');
				document.write('<param name="bgcolor" value="' + bgcolor + '" />');
			 	document.write('<embed src="' + swfURL + '" quality="autohigh" swLiveConnect="false" width="' + width + '" height="' + height + '"  wmode="transparent" bgcolor="' + bgcolor + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" menu="false"></embed>');
				document.write('</object>');
			}
			else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
				document.write('You will need flash player to view this movie.');
			}
}
/* ***********************End Flash*********************** */