

var TABS={
tabs: Array(),

register_tabs: function(tabname, count, actcol, deactcol)
{
this.tabs[tabname]=Array();
this.tabs[tabname]['count']=count;
this.tabs[tabname]['actcol']=actcol;
this.tabs[tabname]['deactcol']=deactcol;
},

show_tab: function(tabname, tabid)
{
for (i=1; i<=this.tabs[tabname]['count']; i++)
if (i!=tabid)
this.deact(tabname, i);
this.act(tabname, tabid);
},

act: function(tabname, tabid){
document.getElementById(tabname+"_tab"+tabid).className=this.tabs[tabname]['actcol']+"_header";
document.getElementById(tabname+"_content"+tabid).style.display="block";
document.getElementById(tabname+"_tab"+tabid).style.zIndex=6;
},

deact: function(tabname, tabid){
document.getElementById(tabname+"_tab"+tabid).className=this.tabs[tabname]['deactcol']+"_header";
document.getElementById(tabname+"_content"+tabid).style.display="none";
document.getElementById(tabname+"_tab"+tabid).style.zIndex=tabid;
}
};

var SCROLLBLOCKS={
delta:2, //speed
saves: Array(),

addLst: function(obj, type, fn){

			if (obj.attachEvent) 
			 obj.attachEvent('on' + type, fn);
			else
			obj.addEventListener(type, fn, false);
},
		
scrollleft: function(id, c, d)
{
if (!d)
d=1;
	if (c)
	{
		this.scrollleft(id, 0);
	

	if ((!(window.ActiveXObject)) && (!(document.childNodes && !document.all && !navigator.taintEnabled)) && ((document.getBoxObjectFor != null)))
	ff = 1;
	else
	ff=0;
		if (
			(d>0 && (
			(ff && parseInt(document.getElementById(id+"_container").offsetWidth)>parseInt(document.getElementById(id+"_scrollline").style.width))
			||
			(!ff && parseInt(document.getElementById(id+"_container").style.marginLeft)+parseInt(document.getElementById(id+"_container").offsetWidth)>parseInt(document.getElementById(id+"_scrollline").style.width))
			)) ||
			
			(d<0 && parseInt(document.getElementById(id+"_container").style.marginLeft)<0)
			)
		{
		this.saves[id]=setTimeout('SCROLLBLOCKS.scrollleft("'+id+'", 1, '+d+')', 10);
		document.getElementById(id+"_container").style.marginLeft=(parseInt(document.getElementById(id+"_container").style.marginLeft)-d*this.delta)+"px";
		}
		
	}
	else
	{
		clearTimeout(this.saves[id]);
	}
},

scrollright: function(id, c)
{
	this.scrollleft(id, c, -1);
},
	
setup: function(id)
{
	var left = document.getElementById(id+"_right");
	var right = document.getElementById(id+"_left");
	
	document.getElementById(id+"_container").style.marginLeft="0px";
	
	try{
	eval("this.addLst(left, 'mouseover', function(){SCROLLBLOCKS.scrollleft(\""+id+"\",1)})");
	eval("this.addLst(right, 'mouseover', function(){SCROLLBLOCKS.scrollright(\""+id+"\",1)})");
	eval("this.addLst(left, 'mouseout', function(){SCROLLBLOCKS.scrollleft(\""+id+"\",0)})");
	eval("this.addLst(right, 'mouseout', function(){SCROLLBLOCKS.scrollright(\""+id+"\",0)})");
	}catch(e){
	;
	}
}
};