function setup() {

	var tbl = document.getElementById('container');

	if (window.innerHeight){
		winHeight = window.innerHeight;
	} else if (document.body.clientHeight) {
		winHeight = document.body.clientHeight;
	}
	
	if (winHeight > tbl.offsetHeight) {

	} else if (winHeight < tbl.offsetHeight) {

	}

/*var myDivs = document.getElementsByTagName("div");
	
	//make sure the right border isn't over the menu
	
	if (window.innerWidth){
		winWidth = window.innerWidth;
	} else if (document.body.clientWidth) {
		winWidth = document.body.clientWidth;
	}
	alert (winWidth);

	//make sure the bottom bar isn't higher than the content or the menu
	
	//get the window height & width
	
	if (window.innerHeight){
		winHeight = window.innerHeight;
	} else if (document.body.clientHeight) {
		winHeight = document.body.clientHeight;
	}

	//establish the lowest DIV and furthest right, get the bottom right position of each
	
	var lowest = 0;
	var rightest = 0;
	for (var i = 0; i < myDivs.length; ++i) {
		myBottom = myDivs[i].offsetTop + myDivs[i].offsetHeight;
		if (myBottom > lowest) {
			lowest = myBottom;
		}
		myRight = myDivs[i].offsetLeft + myDivs[i].offsetWidth;
		if (myRight > rightest) {
			rightest = myRight;
		}
		}

	//check which is the lowest and whether that is lower than the bottom of the window
	maxHeight = (Math.max((lowest),winHeight)) ;
	maxWidth = (Math.max((rightest),winWidth)) ;

	//put the bottom bar at the lowest point and stretch the right border to match
	
	myDivs['footer'].style.top = maxHeight - 43 + 'px';
	myDivs['footer'].style.display = 'block';
	myDivs['menu00Bg'].style.height = maxHeight + 'px';
	myDivs['rightBorder'].style.height = maxHeight + 'px';
	
	myDivs['rightBorder'].style.left = maxWidth + 'px';
	myDivs['cnr01'].style.left = maxWidth + 'px';
	myDivs['cnr03'].style.left = maxWidth  + 'px';
	myDivs['footer'].style.width = maxWidth;
	myDivs['banner'].style.width = maxWidth;
*/}

function toggleTag(tag,type,id) {
	
	divs = document.body.getElementsByTagName(tag);
		for (var i = 0; i < divs.length; ++i) {
			if (divs[i].id.indexOf(type + '_') > -1) {
		        divs[i].style.display = 'none';
			}
		}
	
		var evDet = document.getElementById(type + '_' + id);
		if (evDet.style.display == 'none'){
			if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >=4) && (tag == "tbody")) {
			  evDet.style.display = 'table-row';
			  } else {
     	  	  evDet.style.display = 'block';
			  }
		  }
		else  {
		  evDet.style.display = 'none';
		  }
		setup();  
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function openPop(content,width,height) {
window.open(content,'popUp','height='+ height +',width='+ width +',scrollbars,resizable=yes')
}

function openCrPop(content,width,height) {
window.open('pop.shtml?object=' + content,'popUp','height='+ height +',width='+ width +',scrollbars,resizable=yes')
}

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
	  var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

var secs
var timerID = null
var timerRunning = false
var delay = 1

function menuOn(ID) {
  timerInit()
  var divs = document.body.getElementsByTagName('ul');
  for (var i = 0; i < divs.length; ++i) {
    if (divs[i].id.indexOf('sub_') > -1) {
	  divs[i].style.display = 'none';
	  }
	}

	var myMenu = divs[(ID)];
	  if (myMenu.style.display == 'none'){
        myMenu.style.display = 'block';
		}
	  else {
	    myMenu.style.display = 'none';
	    }	
}

function timerInit()
{
    // Set the length of the timer, in seconds
    timerStop()
    secs = 100
}

function timerStop()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function timerStart()
{
    if (secs==0)
    {
        timerStop()
		hideSubs()
    }
    else
    {
 //       self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("timerStart()", delay)
    }
}

function hideSubs(){
  var divs = document.body.getElementsByTagName('ul');
  for (var i = 0; i < divs.length; ++i) {
    if (divs[i].id.indexOf('sub_') > -1) {
	  divs[i].style.display = 'none';
	  }
	}
}

function getURL (aWindow,aForm) {
  if (aForm.options.value == '---') { return false; }
  aWindow.document.location = escape(aForm.options[aForm.selectedIndex].value);
}

  // this function is need to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }   

 function stripe(id) {

    // the flag we'll use to keep track of 
    // whether the current row is odd or even
    var even = false;
  
    // if arguments are provided to specify the colours
    // of the even & odd rows, then use the them;
    // otherwise use the following defaults:
    var evenColor = arguments[1] ? arguments[1] : "#fff";
    var oddColor = arguments[2] ? arguments[2] : "#eee";
  
    // obtain a reference to the desired table
    // if no such table exists, abort
    var table = document.getElementById(id);
    if (! table) { return; }
    
    // by definition, tables can have more than one tbody
    // element, so we'll have to get the list of child
    // &lt;tbody&gt;s 
    var tbodies = table.getElementsByTagName("tbody");

    // and iterate through them...
    for (var h = 0; h < tbodies.length; h++) {
    
     // find all the &lt;tr&gt; elements... 
      var trs = tbodies[h].getElementsByTagName("tr");
      
      // ... and iterate through them
      for (var i = 0; i < trs.length; i++) {

	    // avoid rows that have a class attribute
        // or backgroundColor style
	    if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
 
         // get all the cells in this row...
          var tds = trs[i].getElementsByTagName("td");
        
          // and iterate through them...
          for (var j = 0; j < tds.length; j++) {
        
            var mytd = tds[j];

            // avoid cells that have a class attribute
            // or backgroundColor style
	        if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
        
		      mytd.style.backgroundColor = even ? evenColor : oddColor;
              
            }
          }
        }
        // flip from odd to even, or vice-versa
        even =  ! even;
      }
    }
  }