/* old sidenav function*/
function sidenav(highlight1,subnav1) {
	var strTemp = new String();
	if ( highlight1 != '' ) {
		document.getElementById(highlight1).className = 'topicon1';	
	}
	if ( subnav1 != '' ) {
		document.getElementById(subnav1).className = 'subtopicson1';
  	}
	if (arguments.length >= 3) { 
		var subhead2 = arguments[2];
  	  	document.getElementById(subhead2).className = 'topicon1';
		if (arguments.length >= 4){
			var subcat2 = arguments[3];
			document.getElementById(subcat2).className = 'subtopicson1';
			if (arguments.length >= 5){
				var subhead3 = arguments[4];
				document.getElementById(subhead3).className = 'topicon1';
			}
		}			
	}
	document.getElementById('sidenav').style.visibility = "visible"; 
}

startList = function(){
if (document.all&&document.getElementById){
  navRoot = document.getElementById("nav-sec");
  for (i=0; i<navRoot.childNodes.length; i++){
    node = navRoot.childNodes[i];
    if (node.nodeName=="LI"){
		node.onmouseover=function(){
			this.className+=" over";
			}
		node.onmouseout=function(){
			this.className=this.className.replace(" over", "");
			}
		}
	}
  }
}
window.onload=startList;


var win = null;
function newWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function writeIndicator(expires,what) {
	var today = new Date();
	if (what == 'new' && today < expires) {
		document.write("<span class='accenttext'><strong>New!</strong></span>");
	} else if (what == 'updated' && today < expires) {
		document.write("<span class='accenttext'><strong>Updated!</strong></span>");
	} else {
		document.write("");
	}
}

function setupRollovers() {
  if (!document.getElementsByTagName)
    return;
  var all_links = document.getElementsByTagName('a');
  for (var i = 0; i < all_links.length; i++) {
    var link = all_links[i]; 
    if (link.className &&
        (' ' + link.className + ' ').indexOf(' rollover ') != -1) {
      if (link.childNodes &&
          link.childNodes.length == 1 &&
          link.childNodes[0].nodeName.toLowerCase() == 'img') {
        link.onmouseover = mouseover;
        link.onmouseout = mouseout;
      }
    }
  }
}

function find_target(e)
{

	var target; 
	
	if (window.event && window.event.srcElement) 
		target = window.event.srcElement;
	else if (e && e.target)
		target = e.target;
	if (!target)
		return null;
	
	while (target != document.body && target.nodeName.toLowerCase() != 'a')
		target = target.parentNode;
	
	if (target.nodeName.toLowerCase() != 'a')
		return null;
	
	return target;
}

function mouseover(e) {
	var target = find_target(e);
	if (!target) return;
	var img_tag = target.childNodes[0];
	img_tag.src = img_tag.src.replace(/(\.[^.]+)$/, '_over$1');
}

function mouseout(e) {
	var target = find_target(e);
	if (!target) return;
	var img_tag = target.childNodes[0];
	img_tag.src = img_tag.src.replace(/_over(\.[^.]+)$/, '$1');
}

// When the page loads, set up the rollovers
window.onload = setupRollovers;

function toggleLayer(whichLayer)
{
	if (document.getElementById)	{
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all) {
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers) {
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}
// Basic Flash Functions
var requiredVersion = 6; 
var useRedirect = false;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var flash7Installed = false;
var flash8Installed = false;
var flash9Installed = false;
var maxVersion = 9;
var actualVersion = 0;
var hasRightVersion = false;
var jsVersion = 1.0;

var isAOL = (navigator.appVersion.indexOf("AOL") != -1) ? true : false;
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
jsVersion = 1.1;
if(isIE && isWin){
  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
  document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
  document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
  document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
  document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
  document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
  document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
  document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
  document.write('<\/SCR' + 'IPT\> \n');
}

var x;
function detectFlash() {

  if (navigator.plugins) {
   if (navigator.plugins["Shockwave Flash 2.0"]
        || navigator.plugins["Shockwave Flash"]) {
	 var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
	  var flashVersion = parseInt(flashDescription.substring(16));
	  flash2Installed = (flashVersion == 2 ? true : false);    
      flash3Installed = (flashVersion == 3 ? true : false);
      flash4Installed = (flashVersion == 4 ? true : false);
      flash5Installed = (flashVersion == 5 ? true : false);
      flash6Installed = (flashVersion == 6 ? true : false);
      flash7Installed = (flashVersion == 7 ? true : false);
      flash8Installed = (flashVersion == 8 ? true : false);
      flash9Installed = (flashVersion >= 9 ? true : false);
    }
  }
  for (var i = 2; i <= 9; i++) {  
    if (eval("flash" + i + "Installed") == true){ actualVersion = i;}
  }
  if (requiredVersion <= actualVersion) {
  	x=1;
  } 
  else {  
  	x=0;
  }
}
detectFlash();