// JavaScript Document
function switch_class(elem,c1,c2){
	if(elem.className == c1){
		elem.className = c2;
	} else {
		elem.className =c1;
	}
	
}

// JavaScript Document
function show_hide(elem){
	if (document.getElementById(elem).style.display == 'none'){
		document.getElementById(elem).style.display = 'block';
	}	else {
		document.getElementById(elem).style.display = 'none';
	}
}

// javascript popup maken
function doPopUp(url, name, w, h, scrollbars){
	var doPopUpX = (screen.width/2)-(w/2);
	var doPopUpY = (screen.height/2)-(h/2);
	var pos = "left="+doPopUpX+",top="+doPopUpY;
	doPopUpWindow = window.open(url,name,"scrollbars=" + scrollbars + ",width=" + w + ",height=" + h + ","+pos);
}

// fireCommand
function fireCommand(formname, command, commandId) {
	eval('document.'+formname+'.fldCommand.value=command');
	eval('document.'+formname+'.fldCommandId.value=commandId');
	eval('document.'+formname+'.submit()');
}

function promptCommand(formname, command, commandId, message) {
	returnvalue = prompt(message,'');
	if (returnvalue != null) {
		eval('document.'+formname+'.fldCommand.value=command');
		eval('document.'+formname+'.fldCommandId.value=commandId');
		eval('document.'+formname+'.fldPrompt.value=returnvalue');
		eval('document.'+formname+'.submit()');
	}
}

// confirmCommand
function confirmCommand(formname, command, commandId, message) {
	if (confirm(message)) {
		eval('document.'+formname+'.fldCommand.value=command');
		eval('document.'+formname+'.fldCommandId.value=commandId');
		eval('document.'+formname+'.submit()');
	}
}

