
var invLines;

	function signupNewsletter(){
			frm = document.getElementById("signupFrm")
			n = document.getElementById("name")
			m = document.getElementById("email")
			
			if(n.value == ""){
				n.focus();
				n.className="frmInpErr"
				return false;
			}else{
				n.className="frmInp"
			}
			
			if(m.value == "" || m.value.indexOf("@")==-1){
				m.focus();
				m.className="frmInpErr"
				return false
			}else{
				m.className="frmInp"
			}
			
			frm.submit();
		}
			

	function addToBasket(id,num,retUrl){
		num++;
		document.location="/mod_inc/funclib/addToBasket.asp?"+id+"="+ num +"&returnUrl="+retUrl
	}
	

	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
	}
	
function printPage(){
	MM_openBrWindow('/print.asp','print','scrollbars=yes,resizable=yes,width=650,height=650')	
}

function openSitemap(){
	MM_openBrWindow('/mod_inc/?p=siteMap&thisPage=','siteMap','scrollbars=yes,resizable=yes,width=440,height=550')	
}

function hndlInp(obj,state){
	if(state){
		obj.className = obj.className+"Active"	
	}else{
		obj.className = obj.className.toString().replace(/Active/gi,"")
	}
	}

function zoom(){			
	var exp = new Date()
	expCalc = exp.getTime() + (7*24*60*60);
	exp.setTime(expCalc);
	if(document.cookie.indexOf("zoomed=true")>-1){
		document.body.style.zoom="100%"
		document.cookie = "zoomed=false; expires=" + exp.toGMTString();
		document.getElementById("zoomIcon").src="/gfx/icons/zoom.gif"
	}else{
		document.body.style.zoom="150%"
		document.cookie = "zoomed=true; expires=" + exp.toGMTString();
		document.getElementById("zoomIcon").src="/gfx/icons/zoomOut.gif"
	}
}

function login(obj){
		ic=document.getElementById("iconCell")
		lw = document.getElementById("loginWidget")
		
		lw.style.top="15";
		lw.style.left=iconCell.offsetLeft+240;
		
	if(lw.style.visibility=="visible"){
			if(document.all){
				lw.filters[0].apply();
				lw.style.visibility="hidden";
				lw.filters[0].play();
			}else{
				lw.style.visibility="hidden";	
			}
	}else{
		
		if(document.all){
			lw.style.filter='progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.25,duration=0.1,wipestyle=0,motion=reverse) alpha(opacity=93) progid:DXImageTransform.Microsoft.Shadow(color="#909090",Direction=135,Strength=5)'//'progid:DXImageTransform.Microsoft.Iris(irisstyle=circle,motion=in) progid:DXImageTransform.Microsoft.Fade(Overlap=0.5,percent=11,Duration=0.2) alpha(opacity=95) progid:DXImageTransform.Microsoft.Shadow(color="#000000",Direction=135,Strength=3)';//document.filt[document.useFilter]+" "+document.filt[7];
			lw.filters[0].apply();
			lw.style.visibility="visible";
			lw.filters[0].play();
		}else{
			lw.style.visibility="visible";
		}
	document.getElementById("username").focus();	
	}
}

function zoom(){			
	var exp = new Date()
	expCalc = exp.getTime() + (7*24*60*60);
	exp.setTime(expCalc);
	if(document.cookie.indexOf("zoomed=true")>-1){
		document.body.style.zoom="100%"
		document.cookie = "zoomed=false; expires=" + exp.toGMTString() + "; path=/";
		document.getElementById("zoomIcon").src="/gfx/icons/zoom.gif"
	}else{
		document.body.style.zoom="150%"
		document.cookie = "zoomed=true; expires=" + exp.toGMTString() + "; path=/";
		document.getElementById("zoomIcon").src="/gfx/icons/zoomOut.gif"
	}
}

function documentLoaded(){
	//set zoom level 
	
}

function login(){
	MM_openBrWindow('/archive/scripts/extranetUsers/login.asp','extranet','scrollbars=yes,resizable=yes,width=320,height=320')	
}

function newUser(){
	MM_openBrWindow('/archive/scripts/extranetUsers/addUser.asp','extranet','scrollbars=yes,resizable=yes,width=550,height=650')	
}

function editUser(){
	MM_openBrWindow('/archive/scripts/extranetUsers/editUser.asp','extranet','scrollbars=yes,resizable=yes,width=550,height=650')	
}

function usage(){
MM_openBrWindow('/archive/scripts/extranetUsers/vejledning.htm','extranet','scrollbars=yes,resizable=yes,width=550,height=650')	
}

function popBasket(){
	MM_openBrWindow("/mod_inc/?p=showBasket",'basket','scrollbars=yes,resizable=yes,width=550,height=650')
}

function popWin(url,width,height){
	MM_openBrWindow(url,'siteMap','scrollbars=yes,resizable=yes,width='+width+',height='+height)	
}