/* voor de een-stap-terug-button die met JS werkt */
function schrijfButton(){
document.write('<a href="#" title="Een pagina terug" onClick="history.go(-1); return false;" class="terugLink">&eacute;&eacute;n stap terug</a>');
}


/*  floating up-button */
positie = null;
function bepaalPositie() {
	if(window.innerHeight) {
	positie = window.innerHeight -210;
	}
	else {
	positie = 230;
	}
}
bepaalPositie()

function zetIcon() {
document.write('<a id="icontop" style="top: '+ positie +'px;" href="#" title="Terug naar bovenkant" onclick="scrollTo(0,0); return false;"><img src="http://www.gilbertisabella.nl/pix/icon_top1.gif" alt="Terug naar bovenkant" width="12" height="17" hspace="0" vspace="0" border="0" onMouseOver="wisselAfb(this,\'http://www.gilbertisabella.nl/pix/icon_top2.gif\');" onMouseOut="herstelAfb(this);"></a>')
}

function floatButton() {
	if (document.all && document.all.icontop != null) // IE
	{
		document.all.icontop.style.pixelTop = document.body.scrollTop + positie;
	}
	else if (document.layers && document.icontop != null) // NS 4
	{
		document.icontop.top = window.pageYOffset + positie;
	}
	else if (document.getElementById && document.getElementById('icontop') != null) // NS 6 & IE 5.5
	{
		document.getElementById('icontop').style.top = window.pageYOffset + positie;
	}
}

if (document.all) { window.onscroll = floatButton; }
else { setInterval ('floatButton()', 100); }

window.onresize=bepaalPositie;


/* wisselen van button */
oudeAfb = null;
function wisselAfb(element,nieuweAfb) {
oudeAfb = element.src;
element.src = nieuweAfb;
}

function herstelAfb(element){
element.src = oudeAfb;
}





var popupScherm = 0;
function doePopup(pagina,breedte,hoogte,scrollen,resize) {
    var t = (screen.availHeight  - hoogte)/2 -50;
    var l = (screen.availWidth - breedte)/2;
    if(popupScherm) {
        if(!popupScherm.closed) {
            popupScherm.close();
        }
    }
    popupScherm = window.open(pagina,'popupScherm', 'location=no,menubar=no,toolbar=no,status=no,directories=no,scrollbars='+scrollen+',resizable='+resize+',height='+hoogte+',width='+breedte+',left='+l+',top='+t+' ');
}
