function openPopup(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function ToBasket(kvanti, name, item, price)
{
  location.href='basket.asp?action=add&kvanti='+kvanti+'&name='+name+'&item='+item +'&price='+price;
}
			function on(me)
			{
				me.style.backgroundColor='#CCCCCC';
			}
			function out(me)
			{
				me.style.backgroundColor='';
			}
			
function changeBasket(kvanti,item)
  		{
   		location.href='?page=basket&doit=change&kvanti='+kvanti+'&item='+item;
   		}
function deleteBasket(item)
		{
		location.href='?page=basket&doit=delete&item='+item;
   		}
   		
function veri()
		{
		if (document.brev.EMAIL.value == "" ||
		document.brev.EMAIL.value.indexOf('@', 0) == -1)
		{
		alert("Ogiltig E-postadress!")
		return false;
		}

else{
document.brev.submit();
}
}

var lobj = 0;

function show(id) {
var obj = document.getElementById(id);
if (!lobj) {
obj.style.display = "block";
lobj = obj
} else {
if (obj.getAttribute("id") == lobj.getAttribute("id")) {
obj.style.display = "none";
lobj = 0;
} else {
lobj.style.display = "none";
obj.style.display = "block";
lobj = obj
}
}
}

function togglefaq(id) {
  if (id.style.display == "block")
    id.style.display = "none";
  else
    id.style.display = "block";
    nudgeFireFox();
}

function nudgeFireFox(){
	document.getElementsByTagName('body')[0].style.width='99%';
	document.getElementsByTagName('body')[0].style.width='auto';
}

function activate(id,typ,modul)
{
if (typ == "1")
{
//inactive
parent.hidden.location.href='active.asp?id=' + id + '&state=1&module=' + modul
}
else
{
//active
parent.hidden.location.href='active.asp?id=' + id + '&state=0&module=' + modul
}
}

function activatecity(id,typ,modul)
{
if (typ == "1")
{
//inactive
parent.hidden.location.href='active.asp?city=' + id + '&state=1&module=' + modul
}
else
{
//active
parent.hidden.location.href='active.asp?city=' + id + '&state=0&module=' + modul
}
}

function CheckNewMember()
{

	if (document.lista.fnamn.value =="")
		{
		alert("Du måste ange förnamn!");
		document.lista.enamn.focus();
		}
	else if (document.lista.enamn.value =="")
		{
		alert("Du måste ange efternamn!");
		document.lista.fnamn.focus();
		}
		else if (document.lista.epost.value.indexOf("@") == -1)
		{
		alert("Du har skrivit din epostadress fel!\rAdressen måste innehålla minst ett @ tecken");
		document.lista.epost.focus();
		}
		else
	{
	document.lista.submit();
	}
	}

