/* scripts */

//  Force getElementById to work
if(!document.getElementById){
	if(document.all)
	document.getElementById=function(){
		if(typeof document.all[arguments[0]]!="undefined")
		return document.all[arguments[0]]
		else
		return null
	}
	else if(document.layers)
	document.getElementById=function(){
		if(typeof document[arguments[0]]!="undefined")
		return document[arguments[0]]
		else
		return null
	}
}




function rolls(whatDiv) {
	document.getElementById(whatDiv).style.border = "3px solid #f00";
}



function popWindow(url, id, width, height) {

	var x = (screen.width  / 2) - (width  / 2);
	var y = (screen.height / 2) - (height / 2) - 20;
	newWindow = window.open(url,id,"width="+ width +",height="+ height +",scrollbars=yes,location=no,menubar=no,toolbar=no,resizable=no,left="+ x +",top="+ y);
	newWindow.focus();
}



function SwapJpg(daImage){
  var objStr,obj;

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      var path = "images/"
      var ext = ".jpg"
      obj.src = path + daImage + ext;
    } else if ((typeof(daImage) == 'object') && daImage) {
      daImage.src = path + daImage + ext;
    }
  }
}



function SwapGif(daImage){
  var objStr,obj;

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      var path = "images/"
      var ext = ".gif"
      obj.src = path + daImage + ext;
    } else if ((typeof(daImage) == 'object') && daImage) {
      daImage.src = path + daImage + ext;
    }
  }
}




// blocking()
// Source: www.xs4all.nl/~ppk

var supported = (document.getElementById || document.all);

if (supported)
{
	document.write("<style type='text/css'>");
	document.write(".dropdown { display:none; }");
	document.write("</style>");
	
	var max = 100;
	var shown = new Array();

//	for (var i=1;i<=max;i++)
//	{
//		shown[i+1] = false;
//	}

}



function blocking(name)
{
	
	if (!supported)
	{
		alert('This link does not work in your browser.');
		return;
	}
	
	var section = '"' + name + '"';
	
	
	shown[section] = (shown[section]) ? false : true;
	

	current = (shown[section]) ? 'block' : 'none';
	

	if (document.getElementById)
	{
	document.getElementById(name).style.display = current;
//	document.getElementById.style.display = current;

	alert(document.getElementById(menu2).style.display);

	}
	else if (document.all)
	{
		document.all[name].style.display = current;	
	}
	
	
	

}



function blocking2(name1, name2, name3, name4, name5)
{
	
	if (!supported)
	{
		alert('This link does not work in your browser.');
		return;
	}
	
	var section = '"' + name1 + '"';

	var start = document.getElementById(name1).style.display;

	if (start == 'none') {
	shown[section] = false;
	}
	
	
//	alert(shown[section]);
	
	shown[section] = (shown[section]) ? false : true;
	
//	alert(shown[section]);
	
	current = (shown[section]) ? 'block' : 'none';
	
//		alert(current);

	

	if (document.getElementById)
	{
	document.getElementById(name1).style.display = current;
	document.getElementById(name2).style.display = 'none';
	document.getElementById(name3).style.display = 'none';
	document.getElementById(name4).style.display = 'none';
	document.getElementById(name5).style.display = 'none';


	}
	else if (document.all)
	{
		document.all[name1].style.display = current;	
	}
	
	
//	shown[section] = (shown[section]) ? false : true;

//	alert(shown[section]);


	

}
