var DHTML = (document.getElementById || document.all); //geen Netscape 4
var menutext = ""; //tekstopbouw van het menu voor Explorer
var menutextf = ""; //tekstopbouw van het menu voor Firefox
var screensize = 0; //geeft drie schermformaten weer: 800, 1024 en 1280
var portretimg = "";// geeft aan wat het portret image is
var portretdetailimg = "";// geeft aan wat het portretdetail image is
var fotoimg = "";// geeft aan wat het foto image is
var fotodetailimg = "";// geeft aan wat het fotodetail image is
//var popupheightdifference = 64;
var popupheightdifference = 2;
var popupwidthdifference = 20;
var popupheight = screen.height-popupheightdifference;
var popupwidth = screen.width-popupwidthdifference;
var popuptop = 5;
var popupleft = 5;
var popupactive = "false";
var url ="";
var popupspecs = "width="+popupwidth + ",height=" + popupheight+"'";
var ontheweb = "false";
var teststring = "jaja";

//vullen menutext

menutext += '<span id="menubase"><span id="menu">'
menutext += '<span id="menublockleft"><a href="index.htm" OnClick="popup(\'index.htm\')">home</a><br><br>'
menutext += '<a href="index.htm#product" OnClick="popup(\'index.htm#product\')">product</a><br><br>'
menutext += '<a href="voorbeelden.htm" OnClick="popup(\'voorbeelden.htm\')">samples</a><br><br>conditions:<br>'
menutext += '<a href="index.htm#intkort" OnClick="popup(\'index.htm#intkort\')">- in short</a><br>'
menutext += '<a href="index.htm#prijs" OnClick="popup(\'index.htm#prijs\')">- price</a><br>'
menutext += '<a href="index.htm#levertijd" OnClick="popup(\'index.htm#levertijd\')">- delivery time</a><br>'
menutext += '<a href="index.htm#garantie" OnClick="popup(\'index.htm#garantie\')">- guarantee</a><br>'
menutext += '<a href="index.htm#procedure" OnClick="popup(\'index.htm#procedure\')">- procedure</a></span>'
menutext += '<span id="menublockright"><a href="index.htm#bestellen" OnClick="popup(\'index.htm#bestellen\')">order</a><br><br>'
menutext += '<a href="index.htm#overons" OnClick="popup(\'index.htm#overons\')">about us</a><br><br>'
menutext += '<a href="index.htm#contact" OnClick="popup(\'index.htm#contact\')">contact</a><br><br>'
menutext += '<a href="index.htm#overdesite" OnClick="popup(\'index.htm#overdesite\')">about this site</a><br><br>'
menutext += '<a href="index.htm#links" OnClick="popup(\'index.htm#links\')">links</a><br><br><br>'
menutext += '</span>'
menutext += '<span id="menupicture"></span></span></span>'
menutext += '<span id="hidemenu" onMouseOver="hide(\'menubase\');hide(\'hidemenu\');show(\'totalarea\');show(\'showmenu\')">hide menu</span>'
menutext += '<span id="showmenu" onMouseOver="show(\'menubase\');show(\'hidemenu\');hide(\'totalarea\');hide(\'showmenu\')">menu</span>'



if (ontheweb=="true") {
menutext = menutextf;
}


//functions

function show(name)
{
	if (!DHTML) return;
	{
		var x = getObj(name);
		x.visibility = 'visible';
	}
}

function hide(name)
{
	if (!DHTML) return;
	{
		var x = getObj(name);
		x.visibility = 'hidden';
	}
}

function getObj(name)
{
  if (document.getElementById)
  {
    return document.getElementById(name).style;
  }
  else if (document.all)
  {
    return document.all[name].style;
  }
  else return false;
}

function ispopupactive() {
if (document.body.clientWidth==popupwidth&&document.body.clientHeight==popupheight) {
popupactive = "true";
}
else {
popupactive = "false";
}
}


function popup(DeUrl) {
url = DeUrl;
ispopupactive();
if (popupactive=="true") {
window.location=url;
}
else {
popupspecs = "menubar=yes,toolbar=yes,width="+popupwidth + ",height=" + popupheight+"'";
window.open(url,'testje','top=5, left=5,'+popupspecs);
}
}

function startpagina() {
ispopupactive();
if (popupactive=="true") {
teststring = "true";
}
else {
teststring="false"
}
}

function forall() {

//scherm vergroten als het te klein is

if (document.body.clientWidth<(popupwidth-10)||document.body.clientHeight<(popupheight-10)) {
window.moveTo(0,0); 
if (document.all) { 
top.window.resizeTo(screen.availWidth,screen.availHeight); 
} 
else if (document.layers||document.getElementById) { 
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){ 
top.window.outerHeight = screen.availHeight; 
top.window.outerWidth = screen.availWidth; 
}}
}
}

function determinescreensize() {
if (screen.width>=1280&&screen.height>=1024) {
screensize=1280;
}
else if (screen.width>=1024&&screen.height>=768) {
screensize=1024;
}
else {
screensize=800;
}
}