// JavaScript Document
function addLoadEvent(func) 
{
  var oldonload = window.onload;
  if (typeof window.onload != 'function') 
  {
    window.onload = func;
  } 
  else
  {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function addOnMouse()
{
	qArr = getElementByClass("h4", "q");
	//alert(qArr.length);
	for(var k=0; k<=qArr.length-1;k++)
	{
		qArr[k].onmouseover = function()
		{
			this.className+=" over";
			this.style.cursor='pointer';
			return false;
		}
		qArr[k].onmouseout = function()
		{
			this.className=this.className.replace(" over", "");
			return false;
		}
	}
	document.getElementById("sTit").onmouseover = function()
	{
		this.className+="over";
		this.style.backgroundImage = "url(./img/arrowd.jpg)";
		this.style.cursor='pointer';
		return false;
	}
	document.getElementById("sTit").onmouseout = function()
	{
		this.className=this.className.replace("over", "");
		var theList = document.getElementById("dropins");
		if(theList.style.display == "none")
		{
			this.style.backgroundImage = "url(./img/arrow.jpg)";
		}
		return false;
	}
	document.getElementById("dTit").onmouseover = function()
	{
		this.className+="over";
		this.style.backgroundImage = "url(./img/arrowd.jpg)";
		this.style.cursor='pointer';
		return false;
	}
	document.getElementById("dTit").onmouseout = function()
	{
		this.className=this.className.replace("over", "");
		var theList = document.getElementById("docsList");
		if(theList.style.display == "none")
		{
			this.style.backgroundImage = "url(./img/arrow.jpg)";
		}
		return false;
	}
	document.getElementById("lTit").onmouseover = function()
	{
		this.className+="over";
		this.style.backgroundImage = "url(./img/arrowd.jpg)";
		this.style.cursor='pointer';
		return false;
	}
	document.getElementById("lTit").onmouseout = function()
	{
		this.className=this.className.replace("over", "");
		var theList = document.getElementById("linksList");
		if(theList.style.display == "none")
		{
			this.style.backgroundImage = "url(./img/arrow.jpg)";
		}
		return false;
	}
	document.getElementById("fTit").onmouseover = function()
	{
		this.className+="over";
		this.style.backgroundImage = "url(./img/arrowd.jpg)";
		this.style.cursor='pointer';
		return false;
	}
	document.getElementById("fTit").onmouseout = function()
	{
		this.className=this.className.replace("over", "");
		var theList = document.getElementById("faqList");
		if(theList.style.display == "none")
		{
			this.style.backgroundImage = "url(./img/arrow.jpg)";
		}
		return false;
	}
	document.getElementById("gdTit").onmouseover = function()
	{
		this.className+="over";
		this.style.backgroundImage = "url(./img/arrowd.jpg)";
		this.style.cursor='pointer';
		return false;
	}
	document.getElementById("gdTit").onmouseout = function()
	{
		this.className=this.className.replace("over", "");
		var theList = document.getElementById("faqList");
		if(theList.style.display == "none")
		{
			this.style.backgroundImage = "url(./img/arrow.jpg)";
		}
		return false;
	}
	
}
function getElementByClass(ele, c)
{
	var eleArr = new Array();
	var retArr = new Array();
	var j = 0;
	var cClassStr = new String();
	//alert(ele+" "+c);
	eleArr = document.getElementsByTagName(ele);
	for(var i=0; i<=eleArr.length-1;i++)
	{
		var cClass = eleArr[i].className;
		cClassStr += cClass+" ";
		if(cClass == c)
		{
			retArr[j] = eleArr[i];
			j++;
		}
	}
	//alert(cClassStr);
	return retArr;
}
addLoadEvent(addOnMouse);