function LoadPage(destination){
	switch(destination){
		case 'WELKOM':
        this.window.location.href = 'Welkom.htm';
        break;
        case 'PEATWELLS':
        this.window.location.href = 'Overpeatwells.htm';
        break;
        case 'CONTACT':
        this.window.location.href = 'Contact.htm';
        break;
        case 'LINKS':
        this.window.location.href = 'Links.htm';
        break;
        case 'PRINCESS':
        this.window.location.href = 'Princess.htm';
        break;
        case 'PRINCESSEN':
        this.window.location.href = 'PrincessEN.htm';
        break;
        case 'WENDOLYNE':
        this.window.location.href = 'Wendolyne.htm';
        break;
        case 'NOISETTE':
        this.window.location.href = 'Noisette.htm';
        break;
        case 'BRAVEHEART':
        this.window.location.href = 'Braveheart.htm';
        break;
        case 'BRAVEHEARTEN':
        this.window.location.href = 'BraveheartEn.htm';
        break;
        case 'LEANDRA':
        this.window.location.href = 'Leandra.htm';
        break;
        case 'WHITCHAZEL': 
        this.window.location.href = 'Whitchazel.htm';
        break;
        case 'HANDSOME': 
        this.window.location.href = 'Handsome.htm';
        break;
        case 'HANDSOMEEN': 
        this.window.location.href = 'HandsomeEN.htm';
        break;
        case 'BIANCA': 
        this.window.location.href = 'Bianca.htm';
        break;
        case 'PONYS': 
        this.window.location.href = 'Ponys.htm';
        break;
        case 'CHARMING': 
        this.window.location.href = 'Charming.htm';
        break;
        case 'CHARMINGEN': 
        this.window.location.href = 'CharmingEN.htm';
        break;
        case 'GOODLUCK': 
        this.window.location.href = 'Goodluck.htm';
        break;
        case 'KALANDRA': 
        this.window.location.href = 'Kalandra.htm';
        break;
        case 'LOVELY': 
        this.window.location.href = 'Lovely.htm';
        break;
        case 'HADJA': 
        this.window.location.href = 'Hadja.htm';
        break;
		case 'VEULENS2009': 
        this.window.location.href = 'Veulens2009.htm';
        break;    
    }
}
        
function ChangeStyle(th){
  th.className ="ACTIVE";
}
function ResetStyle(th){
  th.className = "INACTIVE";
}
function ChangeSubStyle(th){
  th.className ="SubACTIVE";
}
function ResetSubStyle(th){
  th.className = "SubINACTIVE";
}
// openenen van foto in window
function OpenImage(name,width,height){
    var look='resizable=yes, top=100,left=100,width='+width+',height='+height;
	popwin=window.open("","",look);
	popwin.document.open();

    var html = "<html><head>" 
    html += "<title>Peatwells - Klik om het venster te sluiten</title>"
    html += "<style type='text/css'>body { BACKGROUND-COLOR:  #f9e5b0; margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;} </style>"
    html += "</head><body>"
    html += "<table width='100%'  border='0' cellspacing='0'><tr>"
    html += "<td align='center' valign='middle' style='padding-top:0px;padding-left:0px;padding-right:0px;'>"
    html += "<IMG align=center border=2 style='border-color:#990033' src='images/"+name+".jpg'  onclick='self.close()' title='Klik om te sluiten'>"
    html += "</td></tr></table></body></html>"

    popwin.document.write(html);
	popwin.document.close()
}

// openenen van foto in window, english version 
function OpenImageEn(name,width,height){
    var look='resizable=yes, top=100,left=100,width='+width+',height='+height;
	popwin=window.open("","",look);
	popwin.document.open();

    var html = "<html><head>" 
    html += "<title>Peatwells - Click to close this window</title>"
    html += "<style type='text/css'>body { BACKGROUND-COLOR:  #f9e5b0; margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;} </style>"
    html += "</head><body>"
    html += "<table width='100%'  border='0' cellspacing='0'><tr>"
    html += "<td align='center' valign='middle' style='padding-top:0px;padding-left:0px;padding-right:0px;'>"
    html += "<IMG align=center border=2 style='border-color:#990033' src='images/"+name+".jpg'  onclick='self.close()' title='Click to close'>"
    html += "</td></tr></table></body></html>"

    popwin.document.write(html);
	popwin.document.close()
}

function DL_GetElementLeft(eElement){
    if (!eElement && this)                       // if argument is invalid
    {                                            // (not specified, is null or is 0)
        eElement = this;                         // and function is a method
    }                                            // identify the element as the method owner
    var nLeftPos = eElement.offsetLeft;          // initialize var to store calculations
    var eParElement = eElement.offsetParent;     // identify first offset parent element  
    while (eParElement != null)
    {                                            // move up through element hierarchy
        nLeftPos += eParElement.offsetLeft;      // appending left offset of each parent
        eParElement = eParElement.offsetParent;  // until no more offset parents exist
    }
    return nLeftPos;                             // return the number calculated
}
function DL_GetElementTop(eElement){
    if (!eElement && this){
        eElement = this;
    }
    var nTopPos = eElement.offsetTop;
    var eParElement = eElement.offsetParent;
    while (eParElement != null){
        nTopPos += eParElement.offsetTop;
        eParElement = eParElement.offsetParent;
    }
    return nTopPos+20;
}
function LoadSubMenu(submenu){
  //HideSubMenu('0');//first hide the current submenu then load and show the new one
  currentSubMenu = submenu;
  PositionSubMenu(submenu);
}
function PositionSubMenu(submenu){
    var elementReference;
    var fromTop = 0; 
	var fromLeft = 0; 
	elementReference = document.getElementById('menuitem'+submenu);
	fromTop = DL_GetElementTop(elementReference);
	document.getElementById('submenudiv'+submenu).style.top = fromTop;
	fromLeft = DL_GetElementLeft(elementReference);
	//fromLeft += elementReference.offsetWidth;
	document.getElementById('submenudiv'+submenu).style.left = fromLeft;
	ShowSubMenu(submenu);
}
function ShowSubMenu(submenu){
	document.getElementById('submenudiv'+submenu).style.display = "" ;
}
function HideSubMenu(submenu){
    if (submenu == '0'){
	 submenu = currentSubMenu;
	}
	if (submenu != 'none'){
		document.getElementById('submenudiv'+submenu).style.display = "none" ;
    	document.getElementById('menuitem'+submenu).className = "INACTIVE" ;
		currentSubMenu = 'none';
	}
	
}

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller





