//Topnav javascript
// Saved to Buttons_\topnav.js

/*
Scrollable Menu Links- By Dynamicdrive.com
For full source, TOS, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

//configure path for left and right arrows

//configure menu width
var menuwidth=700;
//configure menu height
var menuheight=25;
//configure scroll speed (1-10), where larger is faster
var scrollspeed=6;
var menucontents='';

////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom=document.all||document.getElementById;
if (iedom)
	document.write('<span id="temp" style="visibility:hidden; position:absolute; top:-100; left:-1000">'+menucontents+'</span>');var actualwidth='';
var cross_scroll, ns_scroll;
var loadedyes=0;

function fillup()
{
if (iedom)
	{
	cross_scroll=document.getElementById ? document.getElementById("test2") : document.all.test2;
	cross_scroll.innerHTML=menucontents;
	actualwidth=document.all ? cross_scroll.offsetWidth : document.getElementById("temp").offsetWidth;	}
else if (document.layers)
	{
	ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2;
   ns_scroll.document.write(menucontents);
	ns_scroll.document.close();
	actualwidth=ns_scroll.document.width;
	}
loadedyes=1;
}


function moveleft()
{
if (loadedyes)
	{
	if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth))
		{
		cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed;
		}
	else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
		ns_scroll.left-=scrollspeed;
	}
lefttime=setTimeout("moveleft()",50);
}

function moveright()
{
if (loadedyes)
	{
	if (iedom&&parseInt(cross_scroll.style.left)<0)
	   cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed;
	else if (document.layers&&ns_scroll.left<0)
   	ns_scroll.left+=scrollspeed;
	}
righttime=setTimeout("moveright()",50);
}

function insertcode()
{
if (iedom||document.layers)
	{
	with (document)
		{
		write('<table border="0" cellspacing="0" cellpadding="0">');
		write('<td valign="middle"><a href=#" onMouseover="moveright()" onMouseout="clearTimeout(righttime)">&lt;&lt;&nbsp;</a> </td>');		write('<td valign="top">');
		if (iedom)
			{
			write('<div style="position:relative; width:'+menuwidth+';">');
			write('<div style="position:absolute; width:'+menuwidth+'; height:'+menuheight+'; overflow:hidden;">');			write('<div id="test2" style="position:absolute; left:0; top:0">');
			write('</div></div></div>');
			}
		else if (document.layers)
			{
         write('<ilayer width='+menuwidth+' height='+menuheight+' name="ns_scrollmenu">');         write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>');
			}
		write('</td>');
		write('<td valign="middle"> <a href="#" onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)">');		write('&nbsp;>></a>');
		write('</td></table>');
		}
	}
}

