<!-- 
var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function toggleLyr(id) {

	var x;

	x=MM_findObj(id);

	if (x.style.display == "")
		x.style.display = "none";	
	else
		x.style.display = "";
}

function showLyr(id) {

	var x;

	x=MM_findObj(id);
	x.style.display = "";
}

function hideLyr(id) {

	var x;

	x=MM_findObj(id);
	x.style.display = "none";	
}

function newslettercontrol(theForm)
{ 

	if (theForm.company.value == "")
	{ 
		alert("Vänligen ange företag.");
		theForm.company.focus();
		return false;
	} 

	if (theForm.name.value == "")
	{ 
		alert("Vänligen ange namn på kontaktperson.");
		theForm.name.focus();
		return false;
	} 

	if (theForm.email.value == "")
	{ 
		alert("Vänligen ange e-postadress.");
		theForm.email.focus();
		return false;
	} 
	
	if (theForm.email.value.length > 0)
	{
		if (theForm.email.value.search(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i))
			{
				alert("Angiven e-postadress verkar felaktig. Vänligen kontrollera den igen.");
				theForm.email.focus();
				return false;
			}	
	}

return true;
	
}

function customerlogin(theForm)
{ 

	if (theForm.fUserId.value == "")
	{ 
		alert("Du behöver ange ditt användarnamn.");
		theForm.fUserId.focus();
		return false;
	} 

	if (theForm.fUserPW.value == "")
	{ 
		alert("Du behöver ange ditt lösenord.");
		theForm.fUserPW.focus();
		return false;
	} 

return true;
	
}


-->
