// JavaScript Document

//cross browser event handling for IE5+, NS6+ and Mozilla/Gecko
//By Scott Andrew

/*
function addEvent(obj, evType, fn, useCapture) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, useCapture);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent('on' + evType, fn);
		return r;
	} else {
		obj['on' + evType] = fn;
	}
}

addEvent(window, 'load', Init, false);



function Init() {
	var myDivs = document.getElementsByClassName('showIt');
	var myLinks = document.getElementsByClassName('showItToggle');
	var myAccordion = new fx.Accordion(myLinks, myDivs, {opacity: true, duration: 400});
	
	myLinks.each(function(h3, i){
		if (window.location.href.indexOf(h3.title) > 0) {
			myAccordion.showThisHideOpen(myDivs[i]);
			found = true;
		}
		
	});
	
}

*/

//

		function toggleLayer(whichLayer)
		{
			if (document.getElementById)
				{
					// this is the way the standards work
					var style2 = document.getElementById(whichLayer).style;
					style2.display = style2.display? "":"none";
				}
			else if (document.all)
				{
					// this is the way old msie versions work
					var style2 = document.all[whichLayer].style;
					style2.display = style2.display? "":"none";
				}
			else if (document.layers)
				{
					// this is the way nn4 works
					var style2 = document.layers[whichLayer].style;
					style2.display = style2.display? "":"none";
				}
		}
//



		function toggleStyle(whichLayer) 
		{
			var navi = document.getElementById(whichLayer)
			if (navi.className == ""+whichLayer+"") 
				{
					navi.className = ""+whichLayer+"Active"
				} 
			else 
				{
					navi.className = ""+whichLayer+""
				}
		}
		
		
	function tgcc()
		{
			toggleStyle('TLcc');
			document.getElementById('TLp2').className='TLp2';
			document.getElementById('TL35').className='TL35';
			document.getElementById('TL69').className='TL69';
			document.getElementById('TL912').className='TL912';
			
			
			// testing
			
			}
		

	function tgpk()
		{
			toggleStyle('TLp2');
			document.getElementById('TLcc').className='TLcc';
			document.getElementById('TL35').className='TL35';
			document.getElementById('TL69').className='TL69';
			document.getElementById('TL912').className='TL912';
			
			
			// testing
			
			}
			
	function tg35()
		{	
			toggleStyle('TL35');
			document.getElementById('TLcc').className='TLcc';
			document.getElementById('TLp2').className='TLp2';
			document.getElementById('TL69').className='TL69';
			document.getElementById('TL912').className='TL912';
			}
			
	function tg69()
		{
			toggleStyle('TL69');
			document.getElementById('TLcc').className='TLcc';
			document.getElementById('TLp2').className='TLp2';
			document.getElementById('TL35').className='TL35';
			document.getElementById('TL912').className='TL912';
			}
			
	function tg912()
		{
			toggleStyle('TL912');
			document.getElementById('TLcc').className='TLcc';
			document.getElementById('TLp2').className='TLp2';
			document.getElementById('TL35').className='TL35';
			document.getElementById('TL69').className='TL69';
			}
			
	function clearDefault(el) {
			if (el.defaultValue==el.value) el.value = ""
	}
	
	
/*    function validateQT() {
        if(document.SeekForm.SearchTextArea.value.length == 0) 
            document.SeekForm.SearchTextArea.focus();
            alert("Please enter a question or keyword to search.");
       
			
		else if(document.SeekForm.SearchTextArea.value == "Enter search term(s)"; 
			document.SeekForm.SearchTextArea.focus();
			alert("Please enter a question or keyword to search.");
		
     
	}*/

	  function validateQT() {
        if(document.SeekForm.SearchTextArea.value.length == 0) {
            document.SeekForm.SearchTextArea.focus();
            alert("Please enter a search term.");
            return false;
       		}
       		
   			
			
		else if(document.SeekForm.SearchTextArea.value == "Enter search term(s)") {
			document.SeekForm.SearchTextArea.focus();
			alert("Please enter a search term.");
			return false;
			}
			
		else {
			 document.SeekForm.submit();
			}
			return true;
			
			}
			
	    function submitFunction(URL) {
        document.SearchForm.action=URL;
        document.SearchForm.submit();
    }
    