	function openUrl(_url) {
        _openUrl = window.open(_url,'externWindow');
        return false;
    }

	
function checkSegnalaAppuntamento(Obj) {
    if(Obj.form.titolo.value=="") {
        window.alert('Attenzione il titolo dell\'evento è necessario per continuare!');
        return false;
    }
    if(Obj.form.nome.value=="") {
        window.alert('Attenzione il nome è necessario per continuare!');
        return false;
    }
    if(Obj.form.email.value=="") {
        window.alert('Attenzione l\'email è necessaria per continuare!');
        return false;
    }    
    if(Obj.form.data_inizio.value=="") {
        window.alert('Attenzione è necessario inserire almeno la data di inizio appuntamento!');
        return false;
    }
    if(!checkDate(Obj.form.data_inizio.value, Obj.form.data_inizio, 'inizio appuntamento'))
    {
        return false;
    }    
    if(Obj.form.data_fine.value!="") {
        if(!checkDate(Obj.form.data_fine.value, Obj.form.data_fine, 'fine appuntamento'))
        {
            return false;
        }
    }
    return true;
}

function checkDate(date, object, name) {
    Str = new String(date);    
    if(Str.length<10) {
        _err = 'Il formato della data ' + name + ' è sbagliato! ( usare gg/mm/yyyy ) ';
        window.alert(_err);
        return false;
    }
    DD=Str.substr(0,2);
    MM=Str.substr(3,2);
    YY=Str.substr(6,4);
// 	HH=Str.substr(11,2);
// 	NN=Str.substr(14,2);
    if(DD.indexOf('/')>-1 || MM.indexOf('/')>-1 || YY.indexOf('/')>-1) {
        _err = 'Il formato della data ' + name + ' è sbagliato! ( usare gg/mm/yyyy ) ';
        window.alert(_err);
        return false;
    }
    if(DD.substr(0,1)=='0') DD=DD.substr(1,1);
    if(MM.substr(0,1)=='0') MM=MM.substr(1,1);
    DD=parseInt(DD,10);
    MM=parseInt(MM,10);
    YY=parseInt(YY,10);    
    if(isNaN(DD) || isNaN(MM) || isNaN(YY)) {
        _err = 'Il formato della data ' + name + ' non è valido! ( usare gg/mm/yyyy ) ';
        window.alert(_err);
        return false;
    }
    check = new Date(YY,MM-1,DD);
    DD=check.getDate();
    if(DD<10) DD=String('0')+String(DD);
    MM=check.getMonth()+1;
    if(MM<10) MM=String('0')+String(MM);    
    ret = DD + '/' + MM + '/' + check.getFullYear();
    //ret = check.getFullYear() +  '/' + MM + '/' + DD;
    object.value = ret;
    return true;
}