function ControlMail(lev)
{
if (lev==1)
{
var_err_global = '';
email = document.MAILING2.email.value;
error_email = 0;
if(email.length >0)
{
error_email = 1;
if(email.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){ error_email = 0; }
}
if(error_email == 0){ var_err_global = 'Veuillez indiquer une adresse email valide du type \'nom@domaine.com\''; }
if (var_err_global != '')
{
scroll(0,0);
document.getElementById('msg_action').innerHTML = var_err_global;
}
else
{
document.getElementById('msg_action').innerHTML = 'enregistrement en cours ....';
document.MAILING2.submit();
}
}
else
{
var_err_global = '';
email = document.MAILING1.email.value;
error_email = 0;
if(email.length >0)
{
error_email = 1;
if(email.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){ error_email = 0; }
}
if(error_email == 0){ var_err_global = 'Veuillez indiquer une adresse email valide du type \'nom@domaine.com\''; }
if (var_err_global != '')
{
scroll(0,0);
alert(var_err_global);
}
else
{
document.MAILING1.submit();
}
}
}
function send_to_speed()
{
document.devis.action = "http://www.speedresa.com/moteurs/voyages/devis";
document.devis.submit();
}
function send_moteur_data()
{
type_val = document.moteur_search.type.options[document.moteur_search.type.selectedIndex].value;
if (type_val == "513")
{
document.moteur_search.method = "POST";
document.moteur_search.action = "/partir/voyage/croisieres-costa.php";
}
else
{
document.moteur_search.submit();
}
}
function ShowDiv(kel_div,valeur)
{
if (valeur > 0)
{
document.getElementById(kel_div).style.display = "block";
document.getElementById(kel_div).style.visibility = "visible";
}
else
{
document.getElementById(kel_div).style.display = "none";
document.getElementById(kel_div).style.visibility = "hidden";
}
}
var ie=document.all;
var ns6=document.getElementById&&!document.all;
function ietruebody(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function zoom(which){
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("gde_foto") : document.all.showimage;
crossobj.innerHTML='
'
return false
}
else //if NOT IE 4+ or NS 6+, affiche image ds le navigateur en pleine page
return true
}
function favoris() {
if ( navigator.appName != 'Microsoft Internet Explorer' )
{
window.sidebar.addPanel("Clubpartir - des vacances passionnément différentes !","http://www.clubpartir.fr","");
}
else
{
window.external.AddFavorite("http://www.clubpartir.fr","Clubpartir - des vacances passionnément différentes !");
}
}
function validation_alacarte(f)
{
campaign_id = f.campaign_id.value;
assigned_user_id = f.assigned_user_id.value;
req_id = f.req_id.value;
val_civilite = "";
els_civilite = f.civilite;
for (k=0; k0)
{
error_mail = 1;
if(mail.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null)
{
error_mail = 0;
}
}
if(error_mail == 0)
{
document.getElementById('err_mail').innerHTML = 'merci de saisir un email valide';
document.getElementById('err_mail').className = 'error_of_alacarte';
activ_error = 1;
}
else
{
document.getElementById('err_mail').innerHTML = '';
document.getElementById('err_mail').className = '';
}
if (activ_error == 1)
{
//scroll(0,0);
document.getElementById('err_global').innerHTML = 'merci de compléter les informations manquantes';
document.getElementById('err_global').className = 'error_of_alacarte';
}
else
{
f.submit();
}
}