function HSinfo(Id)
{
	document.all("Winkels").innerHTML="<table cellspacing=0 cellpadding=10px style='margin-left: 20px; margin-top: 10px; background: rgb(255,255,255); border: 2 solid rgb(198,178,60);'><tr><td>"+document.all("Woonplaats"+Id).innerHTML+"</td></tr></table>"
}

function htmlPag(M, Pnr, Nr, Taal)
{
	location="htmlPag.php?Mutatie="+M+"&Dia="+Pnr+"&Nr="+Nr+"&Taal="+Taal
}

function MutatieFormulier(TabelNaam)
{
	L=location
	location=L+"&Formulier="+TabelNaam
}

function DiaKeuze(M,Taal)
{
	if(M==-1){
		M=Dia.value
	}
		location="index.php?Link=diashow.php&Dia="+M+"&Taal="+Taal
}

function Verkooppunt(Soort,Taal)
{
	if(Soort==1){
		location="?Aktie=Selectie&Niveau=2&Volgorde=200&HoofdId=14&SubId=25&PaginaId=25&Taal="+Taal
	} else if (Soort==2) {
		location="?Aktie=Selectie&Niveau=2&Volgorde=200&HoofdId=14&SubId=24&PaginaId=24&Taal="+Taal
	}	

}

function Gegevens(TabelNaam, IdVeld)
{
	T=TabelNaam
	MerkId=merken.value
	SerieId=series.value
	ProduktId=produkten.value
	ArtikelId=artikelen.value
	PrijsId=prijzen.value
	VerpakkingId=verpakkingen.value
	SubverpakkingId=subverpakking.value
	VitolaId=vitolas.value
	FabricageId=fabricage.value
	LandId=landen.value

	IdWaarde=document.all(TabelNaam).value

	if(T=="merken"){
		T="produkten"
		ProduktId=""
		SerieId=""
	}
	if(T=="produkten"){
		T="artikelen"
		ArtikelId=""
	}
	if(T=="artikelen"){
		PrijsId=""
	}

	location="index.php?Aktie=Produkten&MerkId="+MerkId+"&SerieId="+SerieId+"&ProduktId="+ProduktId+"&ArtikelId="+ArtikelId+"&PrijsId="+PrijsId+"&VerpakkingId="+VerpakkingId+"&SubverpakkingId="+SubverpakkingId+"&VitolaId="+VitolaId+"&FabricageId="+FabricageId+"&LandId="+LandId+"&Tabel="+TabelNaam+"&IdVeld="+IdVeld+"&IdWaarde="+IdWaarde
}

function GaNaar(L)
{
	location=L
}

function SelAfb()
{
	var Afb, Breedte

	Afb=document.all("Lijst").value
	Breedte="200px"

	if(Afb=="GEEN"){
		Afb=""
		Breedte="0px"
	}

	document.all("Afb").value=Afb
	document.all("Image").src="afb/"+Afb
	document.all("Image").style.width=Breedte
}

function pagina(M,Aktie,Niveau,Volgorde,HoofdId,SubId,PaginaId,Taal,L)
{
	var Para, Titel

	if(L==undefined || L==""){
		if(Niveau==1){
			Titel=document.all(M).innerText
		} else {
			Titel=""
		}
		Para="index.php?Aktie="+Aktie+"&Niveau="+Niveau+"&Volgorde="+Volgorde+"&HoofdId="+HoofdId+"&SubId="+SubId+"&PaginaId="+PaginaId+"&Taal="+Taal+"&Titel="+Titel+"&Soort="+M
 		location=Para	
	} else {
		location="index.php?Link="+L+"&Taal="+Taal
	}
}

function fragment(M,Aktie,Niveau,Volgorde,HoofdId,SubId,PaginaId,FragmentId,Taal)
{
	var Para

	Para="index.php?Aktie="+Aktie+"&Niveau="+Niveau+"&Volgorde="+Volgorde+"&HoofdId="+HoofdId+"&SubId="+SubId+"&PaginaId="+PaginaId+"&FragmentId="+FragmentId+"&Taal="+Taal+"&Soort="+M
	parent.location=Para	
}

function selectie(P,N,Volgorde,SubId)
{
  var Soort, Id, Niveau, Bewerken
  Id=P.substring(1)
  Niveau=N.substring(2,1)

  Soort=P.substring(0,1)
  switch(Soort){
    case "p": Soort="Pagina"; break;
    case "f": Soort="Fragment"; break;
  }

  if(Soort=="Pagina") {
    location="index.php?Aktie=Selectie&Id="+Id+ "&Niveau="+Niveau
  }

  if(parent.header!=undefined){
    parent.header.Soort.value=Soort
    parent.header.Volgorde.value=Volgorde
    parent.header.Inhoud.value=document.all(P).innerText
    if(Soort=="Pagina"){
      parent.header.Niveau.value=Niveau
      if(SubId==0){
        parent.header.SubId.value=Id
      } else {
        parent.header.SubId.value=SubId
      }
    }
    if(Soort=="Fragment"){
	parent.header.Fid.value=Id
    } else {
        parent.header.Id.value=Id
    }
  }
}

function selfrag()
{
  alert("Test")
}

function markeer(M,V)
{
	document.all(M).style.color="rgb(255,255,255)"
//	document.all(M).style.background="url(menu2.jpg)"
}

function demarkeer(M)
{
	document.all(M).style.color="rgb(198,178,60)"
//	document.all(M).style.background="url(menu.jpg)"
}

function menumarkeer(M,V)
{
	document.all(M).style.color="rgb(255,255,255)"
	document.all(M).style.background="url(achterhs2.jpg)" 
}

function menudemarkeer(M)
{
	document.all(M).style.color="rgb(198,178,60)"
	document.all(M).style.background=""
}

function submarkeer(M,V)
{
	document.all(M).style.color="rgb(0,0,0)"
	document.all(M).style.background="rgb(255,255,255)" 
}

function subdemarkeer(M)
{
	document.all(M).style.color="rgb(255,255,255)"
	document.all(M).style.background=""
}