// JavaScript Document

function lowerLinkHover(button)
{
	var images = button.getElementsByTagName("img");
	if (images != null)
	{
		if (images[0] != null)
		{
			images[0].src = "SUB-BUTTON_ON.jpg";
		}
	}
	button.style.color = "#16B03E";

}
function lowerLinkOut(button)
{
	var images = button.getElementsByTagName("img");
	if (images != null)
	{
		if (images[0] != null)
		{
			images[0].src = "SUB-BUTTON_OFF.jpg";
		}
	}
	button.style.color = "#7BD597";
}
function NavigationBlockOn(block)
{
	var images = block.getElementsByTagName("img");
	if (images != null)
	{
		if (images[0] != null)
		{
		
			var imageURL = images[0].src;
			var imageExt = imageURL.substring(imageURL.indexOf("off",imageURL.lastIndexOf("/")) + 3);
			var imageURL = imageURL.substring(0,imageURL.indexOf("off",imageURL.lastIndexOf("/")));
			images[0].src = imageURL + "on" + imageExt;
		}
	}
	var links = block.getElementsByTagName("a");
	if (links != null)
	{
		if (links[0] != null)
		{
			links[0].style.color = "#FFFFFF";
		}
	}
	block.style.color = "#FFFFFF";
	
}
function NavigationBlockOff(block)
{
	var images = block.getElementsByTagName("img");
	if (images != null)
	{
		if (images[0] != null)
		{
		
			var imageURL = images[0].src;
			var imageExt = imageURL.substring(imageURL.indexOf("on",imageURL.lastIndexOf("/")) + 2);
			var imageURL = imageURL.substring(0,imageURL.indexOf("on",imageURL.lastIndexOf("/")));
			images[0].src = imageURL + "off" + imageExt;
		}
	}
	var links = block.getElementsByTagName("a");
	if (links != null)
	{
		if (links[0] != null)
		{
			links[0].style.color = "#EEEEED";
		}
	}
	block.style.color = "#EEEEED";
}

function initScrollLayer() 
{
	// arguments: id of layer containing scrolling layers (clipped layer), id of layer to scroll, 
	// if horizontal scrolling, id of element containing scrolling content (table?)
	var wndo = new dw_scrollObj('wn1', 'lyr1','TextTable');
	
	// bSizeDragBar set true by default (explained at www.dyn-web.com/dhtml/scroll/ )
	// wndo.bSizeDragBar = false;
	
	// arguments: dragBar id, track id, axis ("v" or "h"), x offset, y offset
	// (x/y offsets of dragBar in track)
	//wndo.setUpScrollbar("dragBar", "track", "v", 1, 1);
	
	// pass id('s) of scroll area(s) if inside table(s)
	// i.e., if you have 3 (with id's wn1, wn2, wn3): dw_scrollObj.GeckoTableBugFix('wn1', 'wn2', 'wn3');
	dw_scrollObj.GeckoTableBugFix('wn1'); 
	
	// sometimes ns6+ needs extra help to position correctly
	dw_scrollObj.rePositionGecko(); 
}

function initScrollLayerNoTable() 
{
	// arguments: id of layer containing scrolling layers (clipped layer), id of layer to scroll, 
	// if horizontal scrolling, id of element containing scrolling content (table?)
	var wndo = new dw_scrollObj('wn1', 'lyr1');
	
	// bSizeDragBar set true by default (explained at www.dyn-web.com/dhtml/scroll/ )
	// wndo.bSizeDragBar = false;
	
	// arguments: dragBar id, track id, axis ("v" or "h"), x offset, y offset
	// (x/y offsets of dragBar in track)
	//wndo.setUpScrollbar("dragBar", "track", "v", 1, 1);
	
	// pass id('s) of scroll area(s) if inside table(s)
	// i.e., if you have 3 (with id's wn1, wn2, wn3): dw_scrollObj.GeckoTableBugFix('wn1', 'wn2', 'wn3');
	dw_scrollObj.GeckoTableBugFix('wn1'); 
	
	// sometimes ns6+ needs extra help to position correctly
	dw_scrollObj.rePositionGecko(); 
}

