/*******************/
/*   SEARCHBOX    */
/*******************/

function searchboxes(inp,defaultText,isFocus)
{
	if (isFocus==1)
	{
		if (inp.value==defaultText){inp.value='';}
	}
	else
	{
		if (inp.value==''){inp.value=defaultText;}
	}
}

function toggleElm()
{
	a=toggleElm.arguments;
	for(i=0; i<a.length; i++)
	{
		try
		{
			elm=document.getElementById(a[i]);
			if (elm.style.display=='none'){elm.style.display='';}
			else {elm.style.display='none';}
		}catch(e){}
	}
}



function BreadcrumbCss()
{
	var bc = document.getElementById('breadcrumbs');
	var a = bc.getElementsByTagName('A');
	if (a.length > 0)
	{
		for (var i = 0; i < a.length; i++)
		{
			a[i].className = '';
			a[i].className = 'level' + (i + 1);
		}
		a[a.length - 1].className += 'home';
	}
}

function SubNavCSS()
{
	var sN = document.getElementById('subNav');
	var aLI = sN.getElementsByTagName('LI');
	var a;
	var l1href;

	for (var i = 0; i < aLI.length; i++)
	{
		a = aLI[i].getElementsByTagName('A');
		if (a[0].href.toLowerCase() == location.href.toLowerCase())
		{
			aLI[i].className += ' on';
		}
		else
		{
			if (aLI[i].className == 'level1')
			{
				l1href = new String(a[0].href);
				l1href = l1href.replace('index.htm', '');
				if (location.href.substr(0, l1href.length).toLowerCase() == l1href.toLowerCase())
				{
					aLI[i].className += ' within';
				}
			}
		}
	}
}

<!--
function MM_jumpMenu(targ,selObj,restore)
{
  eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
  if (restore) selObj.selectedIndex=0;
}

function doTower()
{
	var m; m = ge('towerpos_td');
	var t; t = ge('tower');
	if(m && t)
	{
		var d = new dims(m);
		showElm(t);
		posElm(t, (d.left+d.width)+15, d.top );
	}
}

function showSearch(me)
{
	var d = new dims(me);
	var g = ge('searchdiv');
	showElm(g);
	posElm(g,d.left-4,d.top-4);
}

function dims(elm)
{
	var top=0;
	var height=0;
	var width=0;
	var left=0;
	
	if(elm)
	{
		this.height=elm.offsetHeight;
		this.width=elm.offsetWidth;
		
		while(elm)
		{
			left+=elm.offsetLeft;
			top+=elm.offsetTop;
			elm=elm.offsetParent;
		}
		this.left=left;
		this.top=top;
	}
}

function ge(id){return document.getElementById(id);}

function hideElm(elm)
{
	if(elm)
	{
		if(elm.style)
		{
			elm.style.visibility='hidden';
			elm.style.display='none';
		}
	}
}

function showElm(elm)
{
	if(elm)
	{
		if(elm.style)
		{
			elm.style.visibility='visible';
			elm.style.display='';
		}
	}
}

function posElm(elm,x,y)
{
	if(elm)
	{
		if(elm.style)
		{
			elm.style.top=y+'px';
			elm.style.left=x+'px';
		}
	}
}

function js_taf()
{
	var taf = window.open('/tellafriend.htm?qstref=' + escape(location.href.toString()),'','height=600,width=500,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0');
	try{taf.focus();}
	catch(e){}
}
//-->
