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 popBasket(){
			MM_openBrWindow("/mod_inc/?p=showBasket&templateFile=popbasket",'basket','scrollbars=yes,resizable=yes,width=300,height=300')
	}
	
	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 
	if(document.cookie.indexOf("zoomed=true")>-1){
		document.body.style.zoom="150%";
		document.getElementById("zoomIcon").src="/gfx/icons/zoomOut.gif"
	}else{
		document.getElementById("zoomIcon").src="/gfx/icons/zoom.gif"
	}
}

function print(){
	MM_openBrWindow('/print.asp','print','scrollbars=yes,resizable=yes,width=650,height=650')	
}

	function loginExtranet(){
			un = document.getElementById("username")	
			ps = document.getElementById("password")
			frm = document.getElementById("form1")
			if(un.value==""){
				un.focus();
				un.className="frmInpErr";
				return false;
			}else{
				un.className="frmInp";
			}
			
			if(ps.value==""){
				ps.focus();
				ps.className="frmInpErr";
				return false;
			}else{
				ps.className="frmInp";
			}
			
			frm.submit();
		}