

<!--

$(function () {

    $('.datepicker').datepicker({
        dateFormat: 'yy-mm-dd', mindate: new Date()
    });

    // basic version is: $('div.demo marquee').marquee() - but we're doing some sexy extras

    $('div#marquee marquee').marquee('pointer').mouseover(function () {
        $(this).trigger('stop');
    }).mouseout(function () {
        $(this).trigger('start');
    }).mousemove(function (event) {
        if ($(this).data('drag') == true) {
            this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
        }
    }).mousedown(function (event) {
        $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
    }).mouseup(function () {
        $(this).data('drag', false);
    });
});
//-->

<!--//--><![CDATA[//><!--

sfHover = function() {

    var sfEls = document.getElementById("nav").getElementsByTagName("LI");

    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

validateBudget=function() {
    if(!/\d+\.*\d*/.match(document.getElementById("budget").value)) {
}

}
//--><!]]>

function validateEmail() {
    if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.getElementById("newsemail").value)) {
        return true;
    }

    else {
        alert("Votre email n'est pas valide");
        return false;
    }
}


function emailInput(action, control){
    
    if(action == 'onfocus'){
        if(control.value == 'Votre adresse e-mail ici'){
            control.value = '';
            control.style.color =  '#333333';
        }
    }
    
    if(action == 'onblur'){
        if(control.value == ''){
            control.value = 'Votre adresse e-mail ici';
            control.style.color =  'lightgrey';
        }
        
    }

}
