function init_(){
//cache/ajax_redaction_1.js
var CacheTexte_AUTHENTIFY = new Object();
var texte_AUTHENTIFY = new Object();
if ($('bt_AUTHENTIFY')) $('bt_AUTHENTIFY').replace('' + $('bt_AUTHENTIFY').innerHTML + '');
CacheTexte_AUTHENTIFY['label_AUTHENTIFY_login']=$('label_AUTHENTIFY_login').innerHTML;
CacheTexte_AUTHENTIFY['label_AUTHENTIFY_password']=$('label_AUTHENTIFY_password').innerHTML;
//submit
Event.observe($('bt_AUTHENTIFY'),'click',function(){
var isValid = true;
var tx = [];
if ($F('AUTHENTIFY_login')=='' || $F('AUTHENTIFY_login')==''){
isValid = false;
tx['label_AUTHENTIFY_login'] = true;
texte_AUTHENTIFY['label_AUTHENTIFY_login'] = 'Ce champ est obligatoire';
}
if ($F('AUTHENTIFY_password')=='' || $F('AUTHENTIFY_password')==''){
isValid = false;
tx['label_AUTHENTIFY_password'] = true;
texte_AUTHENTIFY['label_AUTHENTIFY_password'] = 'Ce champ est obligatoire';
}
for (key in texte_AUTHENTIFY){
if($(key)){
$(key).update(CacheTexte_AUTHENTIFY[key] + texte_AUTHENTIFY[key]);
}
if (typeof (tx[key]) != 'undefined') texte_AUTHENTIFY[key]='';
}
if (isValid) {
$('AUTHENTIFY').submit();
}else{
new Fx.Scroll().scrollTo('AUTHENTIFY');
}
});//fin
var CacheTexte_INSC = new Object();
var texte_INSC = new Object();
if ($('bt_INSC')) $('bt_INSC').replace('' + $('bt_INSC').innerHTML + '');
CacheTexte_INSC['label_INSC_login']=$('label_INSC_login').innerHTML;
CacheTexte_INSC['label_INSC_login']=$('label_INSC_login').innerHTML;
CacheTexte_INSC['label_INSC_login']=$('label_INSC_login').innerHTML;
CacheTexte_INSC['label_INSC_password']=$('label_INSC_password').innerHTML;
CacheTexte_INSC['label_INSC_password_bis']=$('label_INSC_password_bis').innerHTML;
CacheTexte_INSC['label_INSC_password_bis']=$('label_INSC_password_bis').innerHTML;
CacheTexte_INSC['label_INSC_email']=$('label_INSC_email').innerHTML;
CacheTexte_INSC['label_INSC_email']=$('label_INSC_email').innerHTML;
CacheTexte_INSC['label_INSC_email_bis']=$('label_INSC_email_bis').innerHTML;
CacheTexte_INSC['label_INSC_email_bis']=$('label_INSC_email_bis').innerHTML;
//submit
Event.observe($('bt_INSC'),'click',function(){
var isValid = true;
var tx = [];
var expr=new RegExp("^[A-Za-z0-9_]{6,}$");
if (!expr.test($F('INSC_login'))){
isValid = false;
tx['label_INSC_login'] = true;
texte_INSC['label_INSC_login'] = ' 6 caractères minimum';
}
if ($F('INSC_login')=='' || $F('INSC_login')==''){
isValid = false;
tx['label_INSC_login'] = true;
texte_INSC['label_INSC_login'] = ' Ce champ est obligatoire';
}
if ($F('INSC_password')=='' || $F('INSC_password')==''){
isValid = false;
tx['label_INSC_password'] = true;
texte_INSC['label_INSC_password'] = ' Ce champ est obligatoire';
}
if ($F('INSC_password_bis')!= $F('INSC_password')){
isValid = false;
tx['label_INSC_password_bis'] = true;
texte_INSC['label_INSC_password_bis'] = ' les deux mots de passe ne sont pas identiques';
}
if ($F('INSC_password_bis')=='' || $F('INSC_password_bis')==''){
isValid = false;
tx['label_INSC_password_bis'] = true;
texte_INSC['label_INSC_password_bis'] = ' Ce champ est obligatoire';
}
var expr=new RegExp("[A-Za-z0-9]([-_.]?[A-Za-z0-9])*@[A-Za-z0-9]([-_.]?[A-Za-z0-9])*\.([a-z]{2,4})$");
if (!expr.test($F('INSC_email'))){
isValid = false;
tx['label_INSC_email'] = true;
texte_INSC['label_INSC_email'] = ' Ce mail ne semble pas valide';
}
if ($F('INSC_email')=='' || $F('INSC_email')==''){
isValid = false;
tx['label_INSC_email'] = true;
texte_INSC['label_INSC_email'] = ' Ce champ est obligatoire';
}
if ($F('INSC_email_bis')!= $F('INSC_email')){
isValid = false;
tx['label_INSC_email_bis'] = true;
texte_INSC['label_INSC_email_bis'] = ' les deux e-mails ne sont pas identiques';
}
if ($F('INSC_email_bis')=='' || $F('INSC_email_bis')==''){
isValid = false;
tx['label_INSC_email_bis'] = true;
texte_INSC['label_INSC_email_bis'] = ' Ce champ est obligatoire';
}
for (key in texte_INSC){
if($(key)){
$(key).update(CacheTexte_INSC[key] + texte_INSC[key]);
}
if (typeof (tx[key]) != 'undefined') texte_INSC[key]='';
}
if (isValid) {
$('INSC').submit();
}else{
new Fx.Scroll().scrollTo('INSC');
}
});//fin
Event.observe($('INSC_login'),'blur',function(){
var tx = [];
var expr=new RegExp("^[A-Za-z0-9_]+$");
if (!expr.test($F('INSC_login'))){
isValid = false;
tx['label_INSC_login'] = true;
texte_INSC['label_INSC_login'] = ' Textes et chiffres uniquement';
}
});//fin
Event.observe($('INSC_email_bis'),'change',function(){
putValueOn('INSC_email_bis','INSC_email_contact');});//fin
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function openPasserelles_init(){
bulle('#popup .bulle');
}
//
function openProLogiciel() {
// Message de proposition d'ouverture de la popup logiciel
if ($('INSC_is_pro_2')){
Event.observe($('INSC_is_pro_2'),'click',function() {
$('INSC_msg_pro').show();
});
Event.observe($('INSC_is_pro_1'),'click',function() {
$('INSC_msg_pro').hide();
});
}
}
function openPopupLogiciel() {
// Popup des logiciels
if ($('INSC_popup_logiciel')){
Event.observe($('INSC_popup_logiciel'),'click',function() {
pop_up.affiche('GRATIS_ajax/popupLogicielsPasserelles.php', '', 560, 550, openPasserelles_init);
});
browser =checkBrowser();
if (browser.ie6 || browser.ie7){
Event.observe($('INSC_popup_logiciel'),'mouseover',function(){$('INSC_popup_logiciel').style.textDecoration="underline";});
Event.observe($('INSC_popup_logiciel'),'mouseout',function(){$('INSC_popup_logiciel').style.textDecoration="none";});
}
}
}
//=============================================================
function step_init(){
pop_up =new popup();
openProLogiciel();
openPopupLogiciel();
function_global();
}