function objRef(id) {if (document.getElementById(id)) return document.getElementById(id)}
function styleRef(id) {return this.objRef(id).style}

function hl(id){
	b=id.src
	s=(b.substring(b.length-4,b.length-5)==0)?'1':'0'
	id.src=(b.substring(b.length-5,0)+s+b.substring(b.length,b.length-4))
}

function invoer(meldtekst,standaardwaarde) {
	if (window.showModalDialog) return showModalDialog('/prompt.asp',meldtekst,'dialogWidth:400px;dialogHeight:200px;status:no;center:yes')
	else return prompt(meldtekst)
}

function init() {
	setMiddle('website',0)
}

function setMiddle(id,offset) {
	breedte=parseInt(objRef(id).offsetWidth)
	if (breedte>0) {
		xOffset=parseInt(parseInt(objRef('dummy').offsetWidth-breedte)/2)
		xOffset=xOffset+offset
		if (xOffset<0) xOffset=0
		styleRef(id).marginLeft=xOffset+'px'
		if (objRef('submenu')) {
			styleRef('submenu').marginLeft=(xOffset+426)+'px'
			styleRef('submenu').visibility='visible'
		}
		styleRef(id).visibility='visible'
	}
}


