// Prototype
// # $('ID') voor het vinden van een element ID
// # $F('ID') voor de waar de van een input veld ID
// -

// Init
function init() {
}
// -

//- Popup CMS
function CMSPopUp(url, wi, he, winm) {
	if (winm == 0) {
		window.open(url, '', 'toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=no,width=' + wi + ',height=' + he);
	} else {
		window.open(url, '', 'toolbar=1,location=1,directories=1,menubar=1,scrollbars=1,resizable=yes,width=' + (wi + 16) + ',height=' + he);
	}
}
// -

// Set Flash
// # element ID waar de Flash in geplaatst wordt
// # parameters : 'movie:"movie.swf", width:"100", height:"100"'
function setFlash(element, parameters) {
	eval('array = {' + parameters + '}');
	
	html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + array.width + '" height="' + array.height + '">';
	html = html + '<param name="allowScriptAccess" value="sameDomain" />';
	html = html + '<param name="movie" value="' + array.movie + '" />';
	html = html + '<param name="quality" value="high" />';
	html = html + '<param name="scale" value="noscale" />';
	html = html + '<param name="wmode" value="transparent" />';
	html = html + '<param name="menu" value="false" />';
	html = html + '<param name="bgcolor" value="#ffffff" />';
	html = html + '<embed src="' + array.movie + '" quality="high" scale="noscale" wmode="transparent" bgcolor="#ffffff"  width="' + array.width + '" height="' + array.height + '" allowScriptAccess="sameDomain" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	html = html + '</object>';
	
	$(element).innerHTML = html;
}
// -

// MenuOpenClose
// # voor het open en sluiten van een menu
var onmenu;

function submenuOpenClose(tmpelement, show, xpos, act) {
	element = $(tmpelement);
	element_act = $(act);

	if(element_act){
		if(element_act.style.display == '') {
			element_act.style.display = 'none';
		}
	}
//	alert(element_act.style.display);
	if (element) {
		if (show == 1) {
			elems = showfields.elements;
			for (i = 0; i < elems.length; i++) {
				element_tmp = $(elems[i].name.replace('show_', ''));
				if (element_tmp) {
					element_tmp.style.display = 'none';
				}
			}
			element.style.display = '';
			theTimer = setTimeout("submenuOpenClose('" + tmpelement + "', 0, 0)", 1000);
			if (xpos > 0) {
					element.style.paddingLeft = xpos;
			}
		} else {
			if (onmenu == 0) {
				element.style.display = 'none';
				$(submenu_act).style.display = '';
				theTimer = null;
			} else {
				theTimer = setTimeout("submenuOpenClose('" + tmpelement + "', 0, 0)", 1000);
			}
		}
	}
}
// -



























