function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function showHideLayers() {
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function getCoords(element){
		for (var lx=0,ly=0;element!=null;
			lx+=element.offsetLeft,ly+=element.offsetTop,element=element.offsetParent);
		return {x:lx,y:ly}
	}

function trimString(sInString) {
  sInString = sInString.replace( /^\s+/g, "" );// strip leading
  return sInString.replace( /\s+$/g, "" );// strip trailing
}


function isNumeric(sText) {
   var ValidChars = "0123456789.,";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) IsNumber = false;
   }
   return IsNumber;
}

function simpleslide(){// v2.2, Mod'd
if (arguments.length<4){return;}var v1=arguments,v2=v1[0];if (v2==""){return;}var	v3=eval("findObj('"+v2+"')");if (v3==null){return;}var v4=parseInt(v1[1]),v5=parseInt(v1[2]),v6=parseInt(v1[3]);var v7=(v1.length>4)?parseInt(v1[4]):0,v8=(v1.length>5)?parseInt(v1[5]):0;var v9=10,v10=document.layers?v3:v3.style;if (v3.SL2!=null){clearTimeout(v3.SL2);}var v11=isNaN(parseInt(v10.left))?v3.offsetLeft:parseInt(v10.left);var v12=isNaN(parseInt(v10.top))?v3.offsetTop:parseInt(v10.top);if (v8!=0){if (v8==1){v4=v11-v4;v5=v12;}else if (v8==2){v4=v11+v4;v5=v12;}else if (v8==3){v5=v12-v5;v4=v11;}else {v5=v12+v5;v4=v11;}}var v13=v4,v14=v5;if ((v11!=v4)||(v12!=v5)){if (v7>0){v9=v6;var v15=v7,v16=v7,v17=Math.abs(v11-v4),v18=Math.abs(v12-v5);if (v17<v18){v16=(v17!=0)?((v18/v17)*v7):v7;}else {v15=(v18!=0)?((v17/v18)*v7):v7;}if (v15>=v17){v15=Math.min(Math.ceil(v15),v7);}if (v16>=v18){v16=Math.min(Math.ceil(v16),v7);}if ((v11<v4)&&(v11+v15<v4)){v4=v11+v15;}if ((v11>v4)&&(v11-v15>v4)){v4=v11-v15;}if ((v12<v5)&&(v12+v16<v5)){v5=v12+v16;}if ((v12>v5)&&(v12-v16>v5)){v5=v12-v16;}}else {var v17=((v4-v11)/v6),v18=((v5-v12)/v6);v17=(v17>0)?Math.ceil(v17):Math.floor(v17);v4=v11+v17;v18=(v18>0)?Math.ceil(v18):Math.floor(v18);v5=v12+v18;}var v19=((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera))?"px":"";if (v17!=0){eval("v10.left = '"+v4+v19+"'");}if (v18!=0){eval("v10.top = '"+v5+v19+"'");}var v20="simpleslide('"+v2+"',"+v13+","+v14+","+v6+","+v7+",0)";v3.SL2=setTimeout(v20,v9);}}


function advslide(){// v2.2, Mod'd
if (!(isNumeric(arguments[arguments.length -1]))) doAfter = arguments[arguments.length -1];
if (arguments.length<4){return;}var v1=arguments,v2=v1[0];if (v2==""){return;}var	v3=eval("findObj('"+v2+"')");if (v3==null){return;}var v4=parseInt(v1[1]),v5=parseInt(v1[2]),v6=parseInt(v1[3]);var v7=(v1.length>4)?parseInt(v1[4]):0,v8=(v1.length>5)?parseInt(v1[5]):0;var v9=10,v10=document.layers?v3:v3.style;if (v3.SL2!=null){clearTimeout(v3.SL2);}var v11=isNaN(parseInt(v10.left))?v3.offsetLeft:parseInt(v10.left);var v12=isNaN(parseInt(v10.top))?v3.offsetTop:parseInt(v10.top);if (v8!=0){if (v8==1){v4=v11-v4;v5=v12;}else if (v8==2){v4=v11+v4;v5=v12;}else if (v8==3){v5=v12-v5;v4=v11;}else {v5=v12+v5;v4=v11;}}var v13=v4,v14=v5;if ((v11!=v4)||(v12!=v5)){if (v7>0){v9=v6;var v15=v7,v16=v7,v17=Math.abs(v11-v4),v18=Math.abs(v12-v5);if (v17<v18){v16=(v17!=0)?((v18/v17)*v7):v7;}else {v15=(v18!=0)?((v17/v18)*v7):v7;}if (v15>=v17){v15=Math.min(Math.ceil(v15),v7);}if (v16>=v18){v16=Math.min(Math.ceil(v16),v7);}if ((v11<v4)&&(v11+v15<v4)){v4=v11+v15;}if ((v11>v4)&&(v11-v15>v4)){v4=v11-v15;}if ((v12<v5)&&(v12+v16<v5)){v5=v12+v16;}if ((v12>v5)&&(v12-v16>v5)){v5=v12-v16;}}else {var v17=((v4-v11)/v6),v18=((v5-v12)/v6);v17=(v17>0)?Math.ceil(v17):Math.floor(v17);v4=v11+v17;v18=(v18>0)?Math.ceil(v18):Math.floor(v18);v5=v12+v18;}var v19=((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera))?"px":"";if (v17!=0){eval("v10.left = '"+v4+v19+"'");}if (v18!=0){eval("v10.top = '"+v5+v19+"'");}var v20="advslide('"+v2+"',"+v13+","+v14+","+v6+","+v7+",0)";v3.SL2=setTimeout(v20,v9);} else eval(doAfter);}


// Set active or inactive
	function activate(target) {
		if (targetobj = findObj(target)) {
			if (!(targetobj.className.match('active'))) {
				targetobj.className = trimString(targetobj.className + ' active');
			}
		}
	}
	function deactivate(target) {
		if (targetobj = findObj(target)) 
		targetobj.className = trimString(targetobj.className.replace("active", ""));
	}

var delayaction;

function show(obj,parentbtn) {
	clearTimeout(delayaction);
	// special case: the showing of sitespopup (includes repositioning)
	if (obj == 'sitespopup') {	
			findObj('sitespopup').style.top = getCoords(findObj('btn_sites')).y - findObj('sitespopup').offsetHeight + 25 + "px";
		}
	// special cases: the showing of categoriespopups (includes repositioning)
	if (obj == 'categoriespopup') {
			findObj('categoriespopup').style.top = getCoords(findObj('btn_categories')).y + "px";
			findObj('categoriespopup').style.left = getCoords(findObj('btn_categories')).x - getCoords(findObj('container')).x + "px";
			findObj('categoriespopup').style.display = 'block';
		}
	if (obj == 'categoriespopup1') {
			findObj('categoriespopup1').style.top = getCoords(findObj('btn_categories1')).y + "px";
			findObj('categoriespopup1').style.left = getCoords(findObj('btn_categories1')).x - getCoords(findObj('container')).x + "px";
			findObj('categoriespopup1').style.display = 'block';
		}
	if (obj == 'categoriespopup2') {
			findObj('categoriespopup2').style.top = getCoords(findObj('btn_categories2')).y + "px";
			findObj('categoriespopup2').style.left = getCoords(findObj('btn_categories2')).x - getCoords(findObj('container')).x + "px";
			findObj('categoriespopup2').style.display = 'block';
		}
	// special case: the showing of languagespopup (includes repositioning)
	if (obj == 'languagespopup') {
			findObj('languagespopup').style.top = getCoords(findObj('btn_languages')).y + "px";
			findObj('languagespopup').style.left = getCoords(findObj('btn_languages')).x - getCoords(findObj('container')).x + "px";
			findObj('languagespopup').style.display = 'block';
		}
		
	// if parentobj is defined and found
	if ((parentbtn != undefined) && (parentobj=findObj(parentbtn)) && (showobj=findObj(obj))) {		
			//showobj.style.top = getCoords(parentobj).y - showobj.offsetHeight + parentobj.offsetHeight + "px";
			showobj.style.top = getCoords(parentobj).y - showobj.offsetHeight + parentobj.offsetHeight - 380 + "px";
			showobj.style.left = getCoords(parentobj).x - getCoords(findObj('container')).x -14 + "px";
		}
	showHideLayers(obj,'','show')
	}
	
	
function hide(obj,delaytime) {
	if (delaytime != undefined) {
		delayaction = setTimeout("showHideLayers('" + obj + "','','hide');if ('" + obj + "'.match('popup')) findObj('" + obj + "').style.top = '0px'",10);
	}
	else {
		showHideLayers(obj,'','hide');
	}
}

function focusfld(fieldid,action) {
		if (action==1) {
			findObj(fieldid).className = 'focused';
		}
		if (action==0) {
			findObj(fieldid).className = '';
		}
	}
	
function menuflip(tabnmbr) {
		if (tabnmbr==1) findObj('leftcol').className = 'menutab1';
		if (tabnmbr==2) findObj('leftcol').className = 'menutab2';
	}


//this one takes care of the submenus
function submenu(subnmbr) {
	
	//hide submenus
	
	var divs = document.getElementsByTagName('div');	//get all divs
	for(i=0;i<divs.length;i++){				//loop through divs
		if(divs[i].id.match(/sub\d/)){			//if their name has 'sub'
			hide(divs[i].id)			//hide them
		}
	}
	
	if (subnmbr!=null) {
	
		// get menu item y-coordinate
		var obj,locV;
		if (obj=findObj('item' + subnmbr)) {
			myElement = getCoords(obj);
			locV = myElement.y;
		}
		
		// set submenu to same coordinate -1
		// show menu	
		var obj;
		if (obj=findObj('sub' + subnmbr)) {
			obj.style.top = locV -2 + 'px';
			show('sub' + subnmbr);
		}
	}
}

var activepath = 0;


// switching tabs
function tab(tabnmbr) {
	// hide all tab contents	
		var divs = document.getElementsByTagName('div');	
		for(i=0;i<divs.length;i++){							
			if(divs[i].id.match(/tabcontent\d/)){					
				if (targetobj = findObj(divs[i].id)) targetobj.className = trimString(targetobj.className.replace("active", ""));							
			}
		}

	// set all tabs to inactive	
		var lis = document.getElementsByTagName('li');
		for(i=0;i<lis.length;i++){	
			if(lis[i].id.match(/tab\d/)){
				if (targetobj = findObj(lis[i].id)) targetobj.className = trimString(targetobj.className.replace("active", ""));
			}
		}

	// activate given tab
	if (tabnmbr != 'undefined') {
		if (targetobj = findObj('tab' + tabnmbr)) targetobj.className = trimString(targetobj.className + ' active');
		if (targetobj = findObj('tabcontent' + tabnmbr)) targetobj.className = trimString(targetobj.className + ' active');
	}
}


// Handle home page paths
	function openpath(pathnmbr) {
		if (pathnmbr != activepath) {
			if (findObj('campaign')) simpleslide('campaign',-2,293,5,0,0);
			for (i=1;i<5;i++) {
				if (i <= pathnmbr) simpleslide('path' + i,0,i*35-15,5,0,0);	
				if (i > pathnmbr) simpleslide('path' + i,0,i*35+82,5,0,0);
				if (i != pathnmbr) simpleslide('pathinfo' + i,0,-74,5,0,0); deactivate('path' + i);
			
			}
			advslide('pathinfo' + pathnmbr,0,23,5,0,0,'activate("path' + pathnmbr + '")') 	// name, x, y, spd, todoafter
			activepath = pathnmbr;
		}
		else {
			for (i=1;i<5;i++) {
				simpleslide('path' + i,0,i*35-15,5,0,0);
				simpleslide('pathinfo' + i,0,-74,5,0,0);
			}
			deactivate('path' + activepath);
			activepath = 0;
			if (findObj('campaign')) simpleslide('campaign',-2,179,5,0,0);
		}
	}



var mapstatusdefault;

function mapstatus(txt) {
	if (obj=findObj('mapstatus')) {
		if (mapstatusdefault == undefined) {
			mapstatusdefault = obj.innerHTML;	
		}
		
		
		if (txt != undefined) {
			obj.innerHTML = txt;	
		}
		else {
			obj.innerHTML = mapstatusdefault;
		}
	}	
}

function switchmap(regionnum) {
	if (regionnum != undefined) {
		if (obj = findObj("smallmap")) obj.style.display = "block";
		if (obj = findObj("largemap")) obj.style.display = "none";
		mapstatusdefault = "Välj land";
		mapstatus("Välj land");
		
		// activate the right region
		if (obj = findObj("mapregion" + regionnum)) activate(obj.id);
		
	}
	else {
		if (obj = findObj("smallmap")) obj.style.display = "none";
		if (obj = findObj("largemap")) obj.style.display = "block";
		mapstatusdefault = "Välj region";	
		mapstatus("Välj region");
		
		// Deactivate map regions
		var divs = document.getElementsByTagName('div');	
		for(i=0;i<divs.length;i++){							
			if(divs[i].className.match("mapregion")){					
				deactivate(divs[i].id);
			}
		}
		// hide scrollbar
		findObj('scroll0').style.visibility = "hidden";
		
	}
	// activate / deactivate region info
	showregion(regionnum);

}


function showregion(regionnum){
	switchcountrylist(regionnum);
	if (regionnum!=null) {
		// reset scroller
		findObj('scroll0').style.top = getCoords(findObj('mapselector')).y - getCoords(findObj('container')).y + 6 + 'px';
		
		findObj('main0').style.top = 0;
		findObj('scrollbar0').style.top = '17px';
		
		//check content height
		if (findObj('main0').offsetHeight > 278) {
			findObj('scroll0').style.visibility = "visible";
			setup(0);
		}
	}
}


// switch country list
function switchcountrylist(regionnum) {
	// hide all country lists
	var divs = document.getElementsByTagName('div');
	for(i=0;i<divs.length;i++){
		if(divs[i].id.match('mapselector_countrylist')){
			deactivate(divs[i].id);
		}
	}
	//show selected country list
	activate('mapselector_countrylist' + regionnum);
}


// activate country
function activatecountry(countrynum) {
	// deactivate all countries 
	var as = document.getElementsByTagName('a'); 
	for(i=0;i<as.length;i++)
	{	
		if(as[i].id.match(/listitem/))
		{
		 deactivate(as[i].id);
		}
	}	

	//activate selected country in the list
	activate('listitem' + countrynum);
	
	// show country specific content
	showHint(countrynum);

	tab("4-7");
}

var xmlHttp

// CONTACT TAB SEARCH

function showHint(objCountry)
{ 	
	if(objCountry.length>0) 
	{
		var url="aspx/ContactInfo.aspx?sid=" + Math.random() + "&Index=" + objCountry
		xmlHttp=GetXmlHttpObject(stateChanged)
		xmlHttp.open("GET", url , true)
		xmlHttp.send(null)
   	 }
	else
	{
		window.document.getElementById("tabcontent4-7").innerHTML = "";	
	}
} 

function stateChanged() 
{
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
 	window.document.getElementById("tabcontent4-7").innerHTML = xmlHttp.responseText;	
    } 

} 

function GetXmlHttpObject(handler)
{ 
    var objXmlHttp=null
    if (navigator.userAgent.indexOf("Opera")>=0)
    {
        try
        { 
        objXmlHttp=new XMLHttpRequest()
        objXmlHttp.onload=handler
        objXmlHttp.onerror=handler 
        return objXmlHttp
        } 
        catch(e)
        { 
            alert("Error. Try newer version of Opera browser.") 
            return 
        }  
    }
    if (navigator.userAgent.indexOf("MSIE")>=0)
    { 
        var strName="Msxml2.XMLHTTP"
        if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
        {
            strName="Microsoft.XMLHTTP"
        } 
        try
        { 
            objXmlHttp=new ActiveXObject(strName)
            objXmlHttp.onreadystatechange=handler 
            return objXmlHttp
        } 
        catch(e)
        { 
            alert("Error. ActiveX might be disabled") 
            return 
        } 
    } 

    if (navigator.userAgent.indexOf("Mozilla")>=0)
    {
        objXmlHttp=new XMLHttpRequest()
        objXmlHttp.onload=handler
        objXmlHttp.onerror=handler 
        return objXmlHttp
    }
}

/*
*	DHTML SCROLLER BY THOMAS EVENSEN ( www.thomasevensen.org )
*	[free to use if you keep these two lines]
*/

//INIT VARIABLES...MESS
var scrollnum = 2;	// number of scrollers on this page..THIS IS THE ONLY VARIABLE THAT MUST BE SET!
var interval = 25; // number of miliseconds between each scrollupdate..recommended to 25... lower = faster
var speed = 3;	// speed of movement pr. interval - normal scroll
var barspeed = 6; // speed of movment pr. interval - click on scrollbg
var wheelspeed = 20; //	speed of movment pr. interval  - mousewheel

var agent = navigator.userAgent.toLowerCase();
var os = navigator.platform.toLowerCase();
var win = (os.indexOf('win32') != -1);
var mac = (os.indexOf('mac') != -1);
var ie5 = (agent.indexOf('msie 5') != -1);
var ie6 = (agent.indexOf('msie 6') != -1);
var nn = (agent.indexOf('netscape') != -1);
var mz = (agent.indexOf('gecko') != -1 && !nn);
var op5  = (agent.indexOf('opera 5') != -1);
var op6  = (agent.indexOf('opera 6') != -1);
if (op5||op6)	{	ie5 = false; ie6 = false;	nn = false;	 }

if (!document.getElementById||op5) {    window.location = "http://www.webstandards.org/upgrade/"	}

var d = document;
var px = (op5||op6)?'':'px';

function getel(el)	{	return d.getElementById(el);	}
function gety(el)		{	if(op5) return getel(el).style.pixelTop; else return getel(el).offsetTop;	}
function geth(el)		{	if(op5) return getel(el).style.pixelHeight; else return getel(el).offsetHeight;	}
function sety(el,y)	{	getel(el).style.top=y+px;	}

var scrollers = new Array();
var dobarscroll,orgslide,loadedscroll,dowheelscroll = false;
var thenum,thetimer,evy;

d.onmouseup=mup; 
d.onmousemove=mmove; 
d.onmousedown=mdown;	

function mdown(e)	{

	if(!loadedscroll) return;

		var ev=(ie5||ie6||op6)?event:e;	
		var el = (ie5||ie6) ? ev.srcElement : ev.target;
		
		if(el.nodeType==3||el.tagName.toLowerCase() == 'img')	el = el.parentNode;

		var theid=el.id;
		var thefunc = theid.slice(0,theid.length-1);
		thenum = theid.charAt(theid.length-1);

		//if the function is scrolldown or scrollup
		if(thefunc=='scrollup'||thefunc=='scrolldown')	 {	

			if(thefunc=='scrollup') scrollers[thenum].currspeed= speed;
			else	scrollers[thenum].currspeed= -speed;

			doscroll();	

			return;

		}
	
		// if the function is  scrollbg
		if(thefunc=='scrollbg')	 {

			evy=(ie5||ie6||op6)?ev.offsetY:ev.layerY;
			var ratio = scrollers[thenum].main_endy / scrollers[thenum].scroll_height;
			evy= evy - (scrollers[thenum].bar_height/2);

				if(evy<gety(scrollers[thenum].bar_id))	 {

					scrollers[thenum].currspeed = barspeed;
					scrollers[thenum].main_starty = Math.round(evy*ratio);

					if(scrollers[thenum].main_starty>scrollers[thenum].main_starty_org) scrollers[thenum].main_starty = scrollers[thenum].main_starty_org;

				}

				if(evy>gety(scrollers[thenum].bar_id))	 {

					scrollers[thenum].currspeed = -barspeed;

					if(evy>scrollers[thenum].scroll_height_org) evy = scrollers[thenum].scroll_height_org;

					scrollers[thenum].main_endy = Math.round(evy*ratio);
					scrollers[thenum].scroll_height = evy;

				}

			doscroll();

			return;

		}
	
		// if the function is scrollbar
		if(thefunc=='scrollbar')	{	
			dobarscroll=true;
			evy=(ie5||ie6||op6)?ev.offsetY-scrollstatus():ev.layerY-scrollstatus();	

			return;

		}

}


function mup()	{

	if(thetimer)	clearTimeout(thetimer);
	if(dobarscroll)	dobarscroll = false;

		if(thenum)	{
		scrollers[thenum].main_starty = scrollers[thenum].main_starty_org;
		scrollers[thenum].main_endy = scrollers[thenum].main_endy_org;
		scrollers[thenum].scroll_height = scrollers[thenum].scroll_height_org;

		}

}

function mmove(e)	{

	if(!dobarscroll||!thenum)	return;
	
	var ev=(ie5||ie6||op6)?event:e;	
	var my = ev.clientY;	
	var y = (my-evy) - scrollers[thenum].scroll_top;

	if(y<scrollers[thenum].bar_starty)	y = scrollers[thenum].bar_starty;	
	if(y>scrollers[thenum].bar_endy)	y = scrollers[thenum].bar_endy;
	sety(scrollers[thenum].bar_id, y);	
	var barslide = Math.round((gety(scrollers[thenum].bar_id)-(scrollers[thenum].bar_starty))*(1/scrollers[thenum].slidelength));
	sety(scrollers[thenum].main_id, -barslide);
	if(barslide == 0 && gety(scrollers[thenum].main_id)!=scrollers[thenum].main_starty) sety(scrollers[thenum].main_id, scrollers[thenum].main_starty);
	return false
}

// wheelscroll function
function wheelscroll()	{
	if(!dowheelscroll)	 {
		var el = event.srcElement;
	if(el.id.slice(0,el.id.length-1)!='main')	{
		do {
			el = el.parentNode;
		}	while(el.tagName.toLowerCase()!='div'||el.id.slice(0,el.id.length-1)!='main')	 
	}
		thenum = el.id.charAt(el.id.length-1);
		if(thenum)		oldnum = thenum;
		if(!thenum)	thenum = oldnum;
	    if (event.wheelDelta >= 120)	scrollers[thenum].currspeed = wheelspeed;
		else if (event.wheelDelta <= -120)	scrollers[thenum].currspeed = -wheelspeed;
     	dowheelscroll = true;
		doscroll();
		return;
	}
}

// main scrolling function
function doscroll()	{
	if(!thenum) return;
	if(gety(scrollers[thenum].main_id)+scrollers[thenum].currspeed>scrollers[thenum].main_starty) scrollers[thenum].currspeed = scrollers[thenum].main_starty - gety(scrollers[thenum].main_id);
	if(gety(scrollers[thenum].main_id)+scrollers[thenum].currspeed<scrollers[thenum].main_endy) scrollers[thenum].currspeed = scrollers[thenum].main_endy - gety(scrollers[thenum].main_id);	 
	sety(scrollers[thenum].main_id, gety(scrollers[thenum].main_id)+scrollers[thenum].currspeed);
	var mainslide = Math.round(gety(scrollers[thenum].main_id)/(scrollers[thenum].main_endy/scrollers[thenum].scroll_height));
	if(mainslide<0) mainslide = 0;
	if(mainslide>scrollers[thenum].scroll_height) mainslide = scrollers[thenum].scroll_height;
	sety(scrollers[thenum].bar_id, scrollers[thenum].bar_starty+mainslide);
	if(!dowheelscroll)	thetimer = setTimeout('doscroll()', interval);
	dowheelscroll = false;
	return false
}

function setup(scrollernum)	{
		var i = scrollernum;
		scrollers[i] =	{
		bar_starty				: gety('scrollup'+i)+geth('scrollup'+i),
		bar_height				: geth('scrollbar'+i),
		bar_endy				: gety('scrolldown'+i)-geth('scrollbar'+i),
		bar_id					: 'scrollbar'+i,
		scroll_height			: geth('scrollbg'+i)-geth('scrollbar'+i),
		scroll_height_org		: geth('scrollbg'+i)-geth('scrollbar'+i),
		scroll_top				: gety('scroll'+i),
		main_starty				: gety('main'+i),
		main_starty_org	 		: gety('main'+i),
		main_endy				: ((geth('main'+i)*-1)+geth('cont'+i))-5,
		main_endy_org			: ((geth('main'+i)*-1)+geth('cont'+i))-5,
		main_id					: 'main'+i,
		currspeed				: -speed,
		slidelength				: ((geth('scrollbg'+i)-geth('scrollbar'+i))/((geth('main'+i)+5)-geth('cont'+i)))
		}

	if (ie6&&!mac)	{	getel(scrollers[i].main_id).onmousewheel = function(){wheelscroll();};	}

loadedscroll = false;
}

/* Addition to scroller */
function scrollstatus() {
	var scrollY;
	if (self.pageYOffset) { // all except Explorer
		scrollY = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
		scrollY = document.documentElement.scrollTop;
	}
	else if (document.body) { // all other Explorers
		scrollY = document.body.scrollTop;
	}
	return scrollY;
}
















