function ma_naar2(n,d,c){
    nam= n + "@" + d;
    document.write("<\a href='mailto:" +nam +"'>" +c +"<\/a>");
}



function ma_naar(n,d,i){
    nam= n + "@" + d;
    document.write("<\a href='mailto:" +nam +"?"+i+"'>" +nam +"<\/a>");
}

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};


(function(){
    jQuery.fn.formValidation=function(config,filters,errors){
        var form=this;var a="";
        config=jQuery.extend({
            err_class:"f_errorinput",
            err_list:true,
            callback:"",
            mark:true,
            marksymbol:"*",
            frm:'',
            ps:'',
            display_alert:true

        },config);

        filters=jQuery.extend({
            email:{
                test:/^([\w.+%-])+\@(([\w-])+\.)[a-zA-Z0-9]{2,}/,
                mess:"Invalid e-mail"
            },
            domain:{
                test:/^(http:\/\/)([\w]+\.){1,}[A-Z]{2,4}\b/gi,
                mess:"Invalid domain"
            },
            phone:{
                test:/([0-9]){2,3}-([0-9]){5,8}$/,
                mess:"Invalid phone-number"
            },
            postcode:{
                test:/^[0-9]{4}[a-zA-Z]{2}$/gi,
                mess:"Not a zipcode"
            },
            zip:{
                test:/^[0-9]{4,}$/gi,
                mess:"Not a zipcode"
            },
            numeric:{
                test:/^[0-9]+$/gi,
                mess:"Not a number"
            },
            image:{
                test:/[\w]+\.(gif|jpg|bmp|png|jpeg)$/gi,
                mess:"No image file"
            },
            ewvt:{
                test:/[\w]+\.(htm|html|php|txt)$/gi,
                mess:"Invalid file"
            },
            media:{
                test:/[\w]+\.(avi|mov|mpeg|wmv)$/gi,
                mess:"No media-file"
            },
            pdf:{
                test:/[\w]+\.(pdf)$/gi,
                mess:"No pdf"
            },
                  required:{
                test:/[a-zA-Z0-9]+/,
                mess:"Required"
            }
            },filters);
            errors=jQuery.extend({
            error:"Red fields are required or invalid"
        },errors);

            url = form.attr('action')+config.frm+config.ps;
            if(config.mark){
            form.find(".required").prev().after(" <span> "+config.marksymbol+"</span>")
            }
            form.find(".required").blur(function(){e($(this))}).change(function(){e($(this))})

            form.submit(function(){

            config.enable=true;a="";frm=true;
                form.find(".required").filter("input, select, textarea").each(function(){
                e($(this))
                });
                $(".submit-message").remove();

                if(frm){
                wait = $("<img style='border:none;padding:20px;' src='images/loader1.gif'>")
                wait.insertAfter(form);
                form.hide('fast');

                $.post(url,
                $(this).serialize()
            ,
            function(data){
             if (data.status > 0){
                $(data.content).insertBefore(form).show('slow');
                $(form).parent().css('background-color','#75DF6F').animate( {backgroundColor:"#ffffff"}, 2000 );
                $(form).remove();
                wait.remove();
		try{
		pageTracker._trackPageview("/form_ok_"+location.href);
		}
		catch(err) {}
               }
            else {
                $(data.content).insertBefore(form).show('slow');
                $(form).parent().css('background-color','#FF3F3F').animate( {backgroundColor:"#ffffff"}, 2000 );
                 wait.remove();
                  $(form).show('slow');
		try{
		pageTracker._trackPageview("/form_error_"+location.href);
		}
		  catch(err) {}
            }
            }, "json");
            return false;
                }


             else if(config.display_alert&&!frm){
                               $("<div class='submit-message'><p>"+a+"</p></div>").insertAfter(form).show("slow");form.find('.check').addClass(config.err_class);
            }
            return frm

            })


            function e(h){


            h.parents().removeClass(config.err_class);


            if(h.is(":radio") || h.is(":checkbox")){
                if(!h.attr("checked")){
                    h.parent().addClass(config.err_class);a=errors.error;
                    frm=false;
                    return false
                    }
                }
                var g=h.attr("class");
                tests=g.split(" ");

                for(i=0;i<tests.length;i++){
                if(!filters[tests[i]]){
                    continue
                }
                regex=filters[tests[i]].test;if(regex){
                ret=regex.exec(h.val());
                 if(!ret){
                        h.parent().addClass(config.err_class);if(config.err_list){
                            a=errors.error
                            }
                            frm=false;
                            return false
                        }
                    }
                }return true
            }
        }
    })(jQuery);

$(document).ready(function(){
   



   
  
});


