
function pop(url,width,height){
	popup = window.open(url, 'popup', 'width=' + width + 
					',height=' + height + ',scrollbars=no,resizable=yes,top=20,left=80');

	popup.focus();
	return;
}

function popprint(url,width,height){
	popup = window.open(url, 'popup', 'width=' + width + 
					',height=' + height + ',scrollbars=yes,resizable=yes,top=20,left=80');

	popup.focus();
	return;
}

function changepic(img_name,img_src) {
	document[img_name].src=img_src;
}


function Confirm(){
	return confirm("Ben je zeker dat je dit record wil verwijderen?");
}

function submitform(fname){ 
	fname.submit();
}

function move(fbox, tbox) {
     var arrFbox = new Array();
     var arrTbox = new Array();
     var arrLookup = new Array();
     var i;
     for(i=0; i<tbox.options.length; i++) {
          arrLookup[tbox.options[i].text] = tbox.options[i].value;
          arrTbox[i] = tbox.options[i].text;
     }
     var fLength = 0;
     var tLength = arrTbox.length
     for(i=0; i<fbox.options.length; i++) {
          arrLookup[fbox.options[i].text] = fbox.options[i].value;
          if(fbox.options[i].selected && fbox.options[i].value != "") {
               arrTbox[tLength] = fbox.options[i].text;
               tLength++;
          } else {
               arrFbox[fLength] = fbox.options[i].text;
               fLength++;
          }
     }
     arrFbox.sort();
     arrTbox.sort();
     fbox.length = 0;
     tbox.length = 0;
     var c;
     for(c=0; c<arrFbox.length; c++) {
          var no = new Option();
          no.value = arrLookup[arrFbox[c]];
          no.text = arrFbox[c];
          fbox[c] = no;
     }
     for(c=0; c<arrTbox.length; c++) {
     	var no = new Option();
     	no.value = arrLookup[arrTbox[c]];
     	no.text = arrTbox[c];
     	tbox[c] = no;
     }
}

function selectAll(box) {
     for(var i=0; i<box.length; i++) {
     box[i].selected = true;
     }
}

function mailto(domain,user) { 
	document.location.href = "mailto:" + user + "@" + domain;
}

function DisplayMail(Server, Login, Display){  
	if ((Display.length == 0) || (Display.indexOf('@')+1)) {  
		document.write('<a href=' + '"mai' + 'lto:' + Login.replace(/_5_/g,".") + '@' + Server.replace(/_5_/g,".") + '">' + Login.replace(/_5_/g,".") + '@' + Server.replace(/_5_/g,".") + '<\/a>'); }  
	else  {  
		document.write('<a href=' + '"mai' + 'lto:' + Login.replace(/_5_/g,".") + '@' + Server.replace(/_5_/g,".") + '">' + Display + '<\/a>'); }  
} 
