// JavaScript Document
var huidigePagina=1



function decode_utf8(s)
{
return decodeURIComponent( escape( s ) );
}
 
function loadXMLDoc(url)
{
document.getElementById('contentHolder').innerHTML="<div class='xmlPageTop' align='center' style='font-size:16px'>Bezig met laden<br>Een moment geduld aub<br /><img src='image/progressbar.gif' /></div>" ;
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_Change;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
    document.getElementById('contentHolder').innerHTML=xmlhttp.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttp.statusText);
    }
  }
}

function loadCartXMLDoc(url)
{
document.getElementById('cartHolder').innerHTML="<div style='padding:10px; text align:center'><img style='margin:auto;' src='/image/progressbar.gif' /></div>" ;
xmlhttpCart=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttpCart=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttpCart=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttpCart!=null)
  {
  xmlhttpCart.onreadystatechange=state_ChangeCart;
  xmlhttpCart.open("GET",url,true);
  xmlhttpCart.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function state_ChangeCart()
{
if (xmlhttpCart.readyState==4)
  {// 4 = "loaded"
  if (xmlhttpCart.status==200)
    {// 200 = "OK"
    document.getElementById('cartHolder').innerHTML=xmlhttpCart.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttpCart.statusText);
    }
  }
}
function loadSuggestXMLDoc(url)
{
document.getElementById('SuggestHolder').innerHTML="<div style='padding:10px; text align:center'><img style='margin:auto;' src='/image/progressbar.gif' /></div>" ;
xmlhttpSuggest=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttpSuggest=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttpSuggest=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttpSuggest!=null)
  {
  xmlhttpSuggest.onreadystatechange=state_ChangeSuggest;
  xmlhttpSuggest.open("GET",url,true);
  xmlhttpSuggest.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function state_ChangeSuggest()
{
if (xmlhttpSuggest.readyState==4)
  {// 4 = "loaded"
  if (xmlhttpSuggest.status==200)
    {// 200 = "OK"
    document.getElementById('SuggestHolder').innerHTML=xmlhttpSuggest.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttpSuggest.statusText);
    }
  }
}
function loadTsXMLDoc(url)
{
document.getElementById('TsHolder').innerHTML="<div style='padding:10px; text align:center'><img style='margin:auto;' src='/image/progressbar.gif' /></div>" ;
xmlhttpTs=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttpTs=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttpTs=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttpTs!=null)
  {
  xmlhttpTs.onreadystatechange=state_ChangeTs;
  xmlhttpTs.open("GET",url,true);
  xmlhttpTs.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function state_ChangeTs()
{
if (xmlhttpTs.readyState==4)
  {// 4 = "loaded"
  if (xmlhttpTs.status==200)
    {// 200 = "OK"
    document.getElementById('TsHolder').innerHTML=xmlhttpTs.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttpTs.statusText);
    }
  }
}

function loadNbXMLDoc(url)
{
document.getElementById('NbHolder').innerHTML="<div style='padding:10px; text align:center'><img style='margin:auto;' src='/image/progressbar.gif' /></div>" ;
xmlhttpNb=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttpNb=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttpNb=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttpNb!=null)
  {
  xmlhttpNb.onreadystatechange=state_ChangeNb;
  xmlhttpNb.open("GET",url,true);
  xmlhttpNb.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function state_ChangeNb()
{
if (xmlhttpNb.readyState==4)
  {// 4 = "loaded"
  if (xmlhttpNb.status==200)
    {// 200 = "OK"
    document.getElementById('NbHolder').innerHTML=xmlhttpNb.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttpNb.statusText);
    }
  }
}



function loadparamXMLDoc(url)
{
document.getElementById('paramHolder').innerHTML="<img src='image/progressbar.gif' />" ;
pxmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  pxmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  pxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (pxmlhttp!=null)
  {
  pxmlhttp.onreadystatechange=paramstate_Change;
  pxmlhttp.open("GET",url,true);
  pxmlhttp.send(null);
  }
else
  {
  //alert("Your browser does not support XMLHTTP.");
  }
}


function paramstate_Change()
{
if (pxmlhttp.readyState==4)
  {// 4 = "loaded"
  if (pxmlhttp.status==200)
    {// 200 = "OK"
    document.getElementById('paramHolder').innerHTML=pxmlhttp.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + pxmlhttp.statusText);
    }
  }
}



function showBookPage(pagina)
	{
	////alert("pagina:"+pagina)
	for (var i = 1; i <=aantalPaginas; i++)
		{
		document.getElementById("page"+i).style.display="none"
		document.getElementById("pageLink"+i).style.color="#000000"		
		}
		document.getElementById("page"+pagina.toString()).style.display=""
		document.getElementById("pageLink"+pagina.toString()).style.color="#FF0000"
		huidigePagina=parseInt(pagina)
		setLinks()
}

function setLinks()
	{
		if (huidigePagina < aantalPaginas)
			{
				document.getElementById("volgendeLink").style.display=''
			}
		else
			{
				document.getElementById("volgendeLink").style.display='none'
			}

		if (huidigePagina > 1)
			{
				document.getElementById("vorigeLink").style.display=''
			}
		else
			{
				document.getElementById("vorigeLink").style.display='none'
			}
	}



function copyToClipboard(s)

{
Copied = document.getElementById(s).createTextRange(); 
Copied.execCommand("Copy");
}




