﻿// JScript File

<!-- Begin

function visa()
{
var ett=document.getElementById('ettan');
ett.style.visibility='visible';
}

function visameny()
{
var meny2=document.getElementById('meny2');
meny2.style.visibility='visible';
}

function doljmeny()
{
var meny2=document.getElementById('meny2');
meny2.style.visibility='hidden';
}

function testlank()
{
window.location="http://www.ilmaofsweden.se";

}

function ddLyx()
{

var bottentext = document.getElementById('bottentext');
var lyx = document.getElementById('lyx');
var om = document.getElementById('om');
var mattor=document.getElementById('handukaromattor');
var ett=document.getElementById('ettan');
ett.style.visibility='hidden';
mattor.style.visibility='hidden';
om.style.visibility='hidden';
bottentext.style.visibility='hidden';
lyx.style.visibility='visible';
lyx.scrollTop='0';

}



function ddBottentext()
{

var bottentext = document.getElementById('bottentext');
var lyx = document.getElementById('lyx');
var om = document.getElementById('om');
var mattor=document.getElementById('handukaromattor');
var ett=document.getElementById('ettan');
ett.style.visibility='hidden';
mattor.style.visibility='hidden';
om.style.visibility='hidden';
bottentext.style.visibility='visible';
lyx.style.visibility='hidden';
bottentext.scrollTop='0';


}


function ddProduktinfo()
{
var bottentext = document.getElementById('bottentext');
var lyx = document.getElementById('lyx');
var om = document.getElementById('om');
var mattor=document.getElementById('handukaromattor');
mattor.style.visibility='hidden';
om.style.visibility='visible';
bottentext.style.visibility='hidden';
lyx.style.visibility='hidden';
om.scrollTop='0';
}

function ddMattor()
{
var bottentext = document.getElementById('bottentext');
var lyx = document.getElementById('lyx');
var om = document.getElementById('om');
var mattor=document.getElementById('handukaromattor');
var ett=document.getElementById('ettan');
ett.style.visibility='hidden';
mattor.style.visibility='visible';
om.style.visibility='hidden';
bottentext.style.visibility='hidden';
lyx.style.visibility='hidden';
mattor.scrollTop='0';
}







function showTip(tipText, bcolor, wwidth)
			{
			var tipspace = document.getElementById('tipspace');
				tipspace.style.visibility=''
				tipspace.innerText=tipText
				tipspace.style.backgroundColor=bcolor
				tipspace.style.width=wwidth
				
				
				
				
				
			}
			
			function hideTip()
			{
			
			var tipspace = document.getElementById('tipspace');
				tipspace.style.visibility='hidden'
				
			}
				
			function currentPosition()
			{
			
			var tipspace = document.getElementById('tipspace');
				posY = event.y + 75
				posX = event.x + 150
				tipspace.style.top=posY+'px'
				tipspace.style.left=posX+'px'
	
			}
function popUp(bild) {

props=window.open(bild, 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=440, height=660 left = 100, top = 100');
}

function popUp2(bild) {

props=window.open(bild, 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=700, height=470 left = 100, top = 100');
}

function popUp3(bild) {

props=window.open(bild, 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=934, height=350 left = 100, top = 100');
}

function popUp4(bild) {

props=window.open(bild, 'Webshop', 'toolbars=1, scrollbars=1, location=0, statusbars=1, menubars=1, resizable=1, width=950, height=650 left = 100, top = 100');
}
function popUp5(bild) {

props=window.open(bild, 'Webshop', 'toolbars=1, scrollbars=1, location=0, statusbars=1, menubars=1, resizable=1, width=400, height=500 left = 100, top = 100');
}

var menu=function(){

   
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
			
			
			
			
			
			
			
			
			
			
			
		}
		
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
		
		
		
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();
// End -->

