function openWin(url,name,args) {
	popupWin = window.open(url,name,args);
	popupWin.focus();
}

function chkFrm(daform){
  out = '';
 
 if (daform.elements.length>5){
   if(daform.Naam.value ==''){
     out += '- Naam moet ingevuld zijn.\n';
	 }
    if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(daform.Email_adres.value))){
     out += '- e-mailadres is ongeldig.\n';
	 } 
   if(daform.tekst.value ==''){
     out += '- U heeft geen reactie geschreven.\n';
	 } 

 
 }
}

function openEditor(id){
var width = 600;
	var height = 400;
	var properties = "width="
	        +width+",height="
					+height+", toolbar=no,status=no,resizable=yes,scrollbars=yes";
	var screenY = window.screen.availHeight;
	var screenX = window.screen.availWidth;
	var leftvar = Math.round((screenX - width) / 2);
	var rightvar = Math.round((screenY - height) / 2);
	properties += ",left=" + leftvar +",top=" + rightvar;
	popupHandle = window.open( '/lib/ceditor.asp?id='+id, 'WebFormBrowser', properties);
	setTimeout('popupHandle.focus();',250);
}
function openItemEditor(query){

var width = 640;
	var height = 400;
	var properties = "width="
	        +width+",height="
    	+height+", toolbar=no,status=no,resizable=yes,scrollbars=yes";
	var screenY = window.screen.availHeight;
	var screenX = window.screen.availWidth;
	var leftvar = Math.round((screenX - width) / 2);
	var rightvar = Math.round((screenY - height) / 2);
	properties += ",left=" + leftvar +",top=" + rightvar;
	popupHandle = window.open( '/lib/editor.php?'+query, 'WebFormBrowser', properties);
	setTimeout('popupHandle.focus();',250);

}
var popupHandle = null;
function openItemEditorRAW(query,editor){

var width = 600;
	var height = 400;
	var properties = "width="
	        +width+",height="
    	+height+", toolbar=no,status=no,resizable=yes,scrollbars=yes";
	var screenY = window.screen.availHeight;
	var screenX = window.screen.availWidth;
	var leftvar = Math.round((screenX - width) / 2);
	var rightvar = Math.round((screenY - height) / 2);
	properties += ",left=" + leftvar +",top=" + rightvar;
	if(popupHandle != null){
	popupHandle.close();
	}
	popupHandle = window.open( ''+editor+"&t="+query, 'WebFormBrowser', properties);
	setTimeout('popupHandle.focus();',250);

}
function openHelp(query){

var width = 600;
	var height = 400;
	var properties = "width="
	        +width+",height="
    	+height+", toolbar=no,status=no,resizable=yes,scrollbars=yes";
	var screenY = window.screen.availHeight;
	var screenX = window.screen.availWidth;
	var leftvar = Math.round((screenX - width) / 2);
	var rightvar = Math.round((screenY - height) / 2);
	properties += ",left=" + leftvar +",top=" + rightvar;
	popupHandle = window.open( '/lib/help.php?'+query, 'HELP', properties);
	setTimeout('popupHandle.focus();',250);

}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// functions by Dim
//
function OnChange(dropdown)
{
	// require URLMinusQuerystring()
	var myindex  = dropdown.selectedIndex;
	var SelValue = dropdown.options[myindex].value;
	var baseURL  = URLMinusQuerystring() + '?lang=' + SelValue;
	top.location.href = baseURL;
	//alert(baseURL);    
	return true;
}

function URLMinusQuerystring()
	{
	var strNaam = new String( document.location );
	var intA = strNaam.lastIndexOf('?');
	var cleanURL = strNaam.substr( 0, strNaam.length - (strNaam.length - intA));	
	return cleanURL;
	}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// /functions by Dim
//
