oldonload_nav=window.onload;
window.onload=function()
{
	return;
	
	mainnav=new Nav();
	
	var navas=document.getElementById('menu').getElementsByTagName('ul')[0].getElementsByTagName('a');
	for(var i=0;i<navas.length;i++)
	{
		mainnav.addlink(navas[i]);
	}
}

function Nav()
{
	this.navdiv=document.getElementById('menu');
	
	// create the subthing
	this.chaser=document.createElement('div');
	this.chaser.id="menu_chaser";
	
	// attach the subthing
	this.navdiv.appendChild(this.chaser);
	
	this.a='';
	this.offsetleft=((document.all ? document.body.clientWidth : window.innerWidth)-790)/2;
	
	// creating the used members
	this.anw=null; // an animation object
	this.anx=null; // an animation object
	this.ana=null; // an animation object
	this.ow=5; // original width
	this.ox=15; // original left pos
	this.oa=0; // original alpha
	this.propw=null; // width props
	this.propl=null; // left pos props
	this.propa=null; // alpha props
		
	var p=this;
	window.onresize=function()
	{
		p.onresize();
	}
}
$pr=Nav.prototype;

$pr.addlink=function(a)
{
	a.navref=this;
	a.onmouseover=function()
	{
		this.navref.rollover(this);
	}
	a.onmouseout=function()
	{
		this.navref.rollout(this);
	}
	
	// if it's the current link
	var cname=a.parentNode.className;
	if(cname.indexOf('current') != -1)
	{
		this.a=a;

		var p=this.getpos(a);

		this.ox=p.x;
		this.ow=p.w;
		this.oa=p.a;
	}
	
	// setup
	this.onresize();
//	this.setstyle(this.ow,this.ox,this.oa);
}
$pr.rollover=function(a)
{
	var p=this.getpos(a);
	this.dorollover(p.w,p.x,p.a);
}
$pr.getpos=function(a)
{
	var x=8;
	if(typeof browser != 'undefined' && browser.isIE6up)
	{
		x=-1;
		var p=a;
		while(true)
		{
			if(typeof p.offsetLeft == 'undefined')
				break;
			x+=p.offsetLeft;
			if(p.parentNode==document.body)
				break;
			else
				p=p.parentNode;
		}
	} else
	{
		x+=a.offsetLeft;
	}
	x=this.normx(x);
//	var x=this.normx(a.offsetLeft+8);
	var w=a.offsetWidth-17;
	var a=100;
	return {w:w,x:x,a:a};
}
$pr.rollout=function(a)
{
	var x=this.ox;
	var w=this.ow;
	var a=this.oa;
	this.dorollover(w,x,a);
}

$pr.dorollover=function(endw,endx,enda)
{
	// kill animator objects
	this.killanimator();
	
	// animation params - alpha
	this.propa={};
	if(browser.isIE6up && typeof this.chaser.filters=='object')
	{
		var element=this.chaser.filters.alpha;
		var property='opacity';
		this.propa.begin=Number(element[property]);
		this.propa.change=enda-this.propa.begin;
	} else
	{
		var element=this.chaser.style;
		var property='opacity';
		this.propa.begin=Number(element[property])*100;
		this.propa.change=enda-(this.propa.begin);
	}
	// animation params - width
	var element = this.chaser.style;
	var property = 'width';
	this.propw={begin:Number(element[property].split('px')[0]),change:endw-(Number(element[property].split('px')[0]))};
	// animation params - left
	var property = 'left';
	var bx=this.normx(Number(element[property].split('px')[0]));
	var changex=endx-this.normx(Number(element[property].split('px')[0]));
	this.propx={begin:bx,change:changex};
	
	// set up the animation
	this.an=phocus.Runtime.addrun(this,'runani',null,0,30,this,'endani');
}
$pr.runani=function(t,tt)
{
	var _t=tt-t;
	
	var x=this.outCirc(_t,this.propx.begin,tt,this.propx.change);
	var w=this.outCirc(_t,this.propw.begin,tt,this.propw.change);
	var a=this.outCirc(_t,this.propa.begin,tt,this.propa.change);
	
	this.setstyle(w,x,a);
}
$pr.endani=function()
{
}
$pr.onresize=function()
{
	this.offsetleft=((document.all ? document.body.clientWidth : window.innerWidth)-790)/2;
	
	if(this.a!='' && typeof this.a.offsetWidth != 'undefined')
	{
		var p=this.getpos(this.a);
		this.ox=p.x;
	}
	this.setstyle(this.ow,this.ox,this.oa);
}
$pr.normx=function(x)
{
	return x-this.offsetleft;
}

$pr.setstyle=function(w,x,a)
{
	this.chaser.style.width=w+'px';
	this.chaser.style.left=(x+this.offsetleft)+'px';
	if(typeof browser != 'undefined' && browser.isIE6up && typeof this.chaser.filters=='object')
		this.chaser.filters.alpha.opacity=Math.round(a);
	else
		this.chaser.style.opacity=(a==0 ? 0 : a/100);
}
$pr.killanimator=function()
{
	if(this.an != null && typeof this.an != 'undefined' && this.an.escape != 'undefined')
	{
		this.an.escape();
		this.an=null;
	}
	this.propw=null; // width props
	this.propl=null; // left pos props
	this.propa=null; // alpha props
}
$pr.outCirc=function(t,b,d,c)
{
	return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
}
