<!-- JS Navigeren binnen hetzelfde venster -->
function go (url)  {
    document.location.href=url;
}

function toggleLayer(layerID)  {
    var myLayer = eval('document.all.'+layerID);
    myLayer.style.display = (myLayer.style.display != 'none') ?  'none' : 'inline'   ;
}

function showLayer(layerID)  {
    var myLayer = eval('document.all.'+layerID);
    myLayer.style.display = 'inline';
}

function hideLayer(layerID)  {
	var myLayer = eval('document.all.'+layerID);
	if (myLayer != null) {
		myLayer.style.display = 'none';
	}
}

function showPopup(url, name, windowWidth, windowHeight)  {
	if (windowWidth == null && windowWidth != '') windowWidth = 600;
	if (windowHeight == null && windowHeight != '') windowHeight = 350;
	//windowLeft = ((window.screen.availWidth-windowWidth)/2);
	//windowTop = ((window.screen.availHeight-windowHeight)/2) + document.body.scrollTop;
	param = "width=" + windowWidth + ",height=" + windowHeight + ",toolbar=no,titlebar=no,menubar=no";
	//alert("param=" + param);
	//alert('url: ' + url);
	//alert('name: ' + name);
	w = window.open(url, name, param);
	w.focus();
}

function showWindow(url, name, windowWidth, windowHeight)  {
	if (windowWidth == null && windowWidth != '') windowWidth = 600;
	if (windowHeight == null && windowHeight != '') windowHeight = 350;
	//windowLeft = ((window.screen.availWidth-windowWidth)/2);
	//windowTop = ((window.screen.availHeight-windowHeight)/2) + document.body.scrollTop;
	param = "width=" + windowWidth + ",height=" + windowHeight + ",toolbar=no,titlebar=no,menubar=no,resizable=yes,scrollbars=yes";
	//alert("param=" + param);
	w = window.open(url, name, param);
	w.focus();
}

function showUrlPopup(url) {
   //alert('url= ' + url);
   showPopup(url, "preview", 600, 480);
}

function annuleren(url) {
   if (!url) {
      url = 'index.php';
   }
   var answer = confirm("Weet u zeker dat u wilt annuleren?");
   if (answer) {
      window.location = url;
   }
}

function toggleDetails(show) {		
	if (show) {
		showLayer('help');
		hideLayer('showhelpbutton');
		showLayer('hidehelpbutton');
	}
	else {
		hideLayer('help');
		showLayer('showhelpbutton');
		hideLayer('hidehelpbutton');
	}		
}

/** filtrem */
function fillSortForm(sort_type, sort_order) {
    document.filterForm.sort_type.value = sort_type;
    document.filterForm.sort_order.value = sort_order;
    document.filterForm.submit();
}
/** paginating */
function goToPage(p) {
    document.filterForm.page_nr.value=p; 
    document.filterForm.submit();
}
