function menuOn(index)
{
	document.getElementById('menu_' + index).src = 'Images/Menu/' + index + '_on.jpg';
	
	/*
	if (index == 1 || index == 9 || index == 10)
		document.getElementById('subMenu_1').style.display = 'block';
	else if (index == 4 || index == 11 || index == 12)
		document.getElementById('subMenu_4').style.display = 'block';		
	*/
}

function menuOff(index)
{
	document.getElementById('menu_' + index).src = 'Images/Menu/' + index + '.jpg';	
	
	/*
	if (index == 1 || index == 9 || index == 10)
		document.getElementById('subMenu_1').style.display = 'none';
	else if (index == 4 || index == 11 || index == 12)
		document.getElementById('subMenu_4').style.display = 'none';		
	*/
}


var displayId = '01';

function displayDIV(id)
{
	
	document.getElementById('div_' + displayId).style.display = 'none';
	document.getElementById('div_' + id).style.display = 'block';
	
	document.getElementById('link_' + displayId).style.color = '#FFF';
	document.getElementById('link_' + id).style.color = '#473C8B';
	displayId = id;

	if (id==14)
	{
		var scrollbar_14 = new Control.ScrollBar('scrollbar_content_14','scrollbar_track_14');			
		
		$('scroll_down_50_14').observe('click',function(event){
			scrollbar_14.scrollBy(-50);
			event.stop();
		});
		
		$('scroll_up_50_14').observe('click',function(event){
			scrollbar_14.scrollBy(50);
			event.stop();
		});
	}
}

function clientSideInclude(id, url) {
	var req = false;
  	
	// For Safari, Firefox, and other non-MS browsers
	if (window.XMLHttpRequest) {
    	try {
      		req = new XMLHttpRequest();
	    } catch (e) {
    		req = false;
    	}
	}else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    	try {
			req = new ActiveXObject("Msxml2.XMLHTTP");
    	} catch (e) {
      		try {
        		req = new ActiveXObject("Microsoft.XMLHTTP");
      		} catch (e) {
        		req = false;
      		}
    	}
 	}
 
	var element = document.getElementById(id);

	if (!element) {
		return;
	}
 	if (req) {
    	// Synchronous request, wait till we have it all
    	req.open('GET', url, false);
    	req.send(null);
    	element.innerHTML = req.responseText;
	} else {
    	element.innerHTML ="Sorry, your browser does not support XMLHTTPRequest objects. This page requires Internet Explorer 5 or better for Windows, " +
      		"or Firefox for any system, or Safari. Other compatible browsers may also exist.";
	}
}

var t;
var doLoop = true;

function scrollDivToTop(id)
{
	var div = document.getElementById(id);

	if (div.scrollTop>0 && doLoop)
	{
		div.scrollTop-=3;
		t = setTimeout("scrollDivToTop('" + id + "')", 1);
	}
	else 
		clearTimeout(t);
}

function scrollDivToBottom(id)
{
	var div = document.getElementById(id);

	if (div.scrollTop<999999999 && doLoop)
	{
		div.scrollTop+=3;
		t = setTimeout("scrollDivToBottom('" + id + "')", 1);
	}
	else 
		clearTimeout(t);
}

function stop()
{
	doLoop = false;
	setTimeout('doLoop = true;', 5);
}


