function JSAccordian(hnd){
	var d = document;
	d.dragging = false;
	this.ie = d.all ? 1 : 0
	this.ns4 = d.layers ? 1 : 0
	this.dom = d.getElementById ? 1 : 0
	this.name = hnd;
	this.id = hnd;
	eval(this.name+"=this");
	this.panel=new Array();
	var argv=JSAccordian.arguments;
	this.numPanels=argv.length;
	for(var i=1;i<this.numPanels;i++){ this.panel[i]=new Object();this.panel[i].id=argv[i]; }
	this.getLayers();
}
JSAccordian.prototype.getLayers = function(){
	var d=document;
	this.container = this.dom ? d.getElementById(this.name) : this.ie ? d.all[this.name] : d.layers[this.name]
	for (i=1;i<this.numPanels;i++){
		this.panel[i].hnd = this.dom ? d.getElementById(this.panel[i].id) : this.ie ? d.all[this.panel[i].id] : d.layers[this.panel[i].id]
	}
	if (!this.panel[i-1].hnd){
		window.setTimeout(this.name + ".getLayers()", 100);
	}  else {
		this.container=this.container.style;
		this.setUp();
	}
}
JSAccordian.prototype.setUp = function(){
	var d=document;
	this.current=1;
	this.container["height"]="243px";
	this.container["overflow"]="hidden";
	for(i=1;i<this.numPanels;i++){
	this.panel[i].ss=this.panel[i].hnd.style;
	this.panel[i].ss["zIndex"]=this.numPanels-i;
	}
	for(i=2;i<this.numPanels;i++){
	this.panel[i].ss["marginTop"]="-130px";
	this.panel[i].target=this.panel[i].cv=-130;
	}
	this.panel[1].ss["marginTop"]="0px";
	this.panel[1].cv=0;

	for(i=1;i<this.numPanels;i++){
	for(a=0;a<d.anchors.length;a++){
		if (d.anchors[a].name==this.panel[i].id){
			d.anchors[a].id=i;
			d.anchors[a].owner=this;
			d.anchors[a].onmouseover=function(){
				if (this.owner.animating==true) return;
				this.owner.show(this.id);
			}
		}
	}
	}
}
JSAccordian.prototype.show = function(id){
	if (id==this.current) return;
	this.panel[this.current].target=-130;
	this.panel[id].target=0;
	this.current=id;
	clearTimeout(this.timer);
	this.timer=setTimeout(this.name+".animate(5)", 1000/30);
}
JSAccordian.prototype.animate = function(v){
	this.animating=true;
	pos = ((Math.sin(Math.asin((v/5)-1)))*-130);
	for(i=1;i<this.numPanels;i++){
		cv =this.panel[i].cv;
		if (Math.round(cv)!=this.panel[i].target){
			if (cv>this.panel[i].target){
				this.panel[i].cv=-Math.round(pos);
			} else {
				this.panel[i].cv=Math.round(pos)-130;
			}
		}
	}
	for(i=1;i<this.numPanels;i++){
		this.panel[i].ss["marginTop"]=Math.round(this.panel[i].cv)+"px";
	}
	if (v-->0){
		this.timer=setTimeout(this.name+".animate("+v+")", 1000/30);
	} else { this.animating=false;}
}
