
			
			if (document.getElementById){

document.write('<style type="text/css">\n')

document.write('.plus{display: block;}\n')  //use this in a function to hide/show items in a certain class
document.write('.minus{display: none;}\n')  //use this in a function to hide/show items in a certain class

document.write('</style>\n')

}

function getElements()
  {
  var x=document.getElementsByTagName("tr");
  alert(x.length);
  
  }
				
function SwitchMenu(obj, obj2){

	if(document.getElementById){
    
	var el = document.getElementById(obj); //obj is the id of each
	var el2 = document.getElementById(obj2);
    
	var ar = document.getElementById("masterdiv").getElementsByTagName(obj, obj2); 
	
		if(el.style.display != "block")
		{   //el is the id of each

			for (var i=0; i<ar.length; i++)
			{
                
				if (ar[i].className=="plus")  //copy this if for submenu

				ar[i].style.display = "none";

			}

			el.style.display = "block";              //shows item passed
			el2.style.display = "none";
		    
		}
		if(el.style.display != "block")
		{   //el is the id of each

			for (var i=0; i<ar.length; i++)
			{
                
				if (ar[i].className=="minus")  //copy this if for submenu
				
				ar[i].style.display = "none";

			}

			el.style.display = "block";              //shows item passed
			//el2.style.display = "none";
		    
		}
		
	}

}
///////////////////////////////////////////////////////////////////////////////////////////////////

var xmlHttp

function showHint(str)
{
if (str.length==0)
  { 
  document.getElementById("txtHint").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="gethint.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

			
