function popupDef(url,name,features) { //This launches a new window and then //focuses it if window.focus() is supported. win = window.open(url,name,features); } function ShortCut(lettre_, alt_modifier_, shift_modifier_, ctrl_modifier_, command_) { this.lettre=lettre_; this.alt_modifier=alt_modifier_; this.shift_modifier=shift_modifier_; this.ctrl_modifier=ctrl_modifier_; this.command=command_; this.checkEvent=checkEvent; return this; } function checkEvent() { shortcut_ok=true; if (window.event.ctrlKey != this.ctrl_modifier) shortcut_ok=false; if (window.event.altKey != this.alt_modifier) shortcut_ok=false; if (window.event.shiftKey != this.shift_modifier) shortcut_ok=false; if(window.event.keyCode != this.lettre) shortcut_ok=false; if(shortcut_ok) return true; else return false; } function ShortCutList() { this.liste = new Array(); this.num=0; this.add = addShortCut; this.checkKeys = checkKeys; return this; } function addShortCut(obj_) { this.num++; this.liste[this.num]=obj_; } function checkKeys() { for(i=1;i<=this.num;i++) { ret_val = this.liste[i].checkEvent(); if(ret_val) { eval(this.liste[i].command); break; } } } function gerer_touche(obj_) { EventList1.checkKeys(); } EventList1 = new ShortCutList(); document.onkeydown = gerer_touche; function fullScreen(theURL) { window.open(theURL, '', 'fullscreen=yes, scrollbars=auto'); } function WinfullScreen(theURL,WinName) { window.open(theURL, WinName, 'fullscreen=yes, scrollbars=auto'); } function openChromeslessWindow(openUrl, winName, wWidth, wHeight, wPosx, wPosy, wTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel, bCenter, sFontFamily, sFontSize, sFontColor){ openchromeless(openUrl,winName, wWidth, wHeight, wPosx, wPosy, wTIT, wTIT , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel, bCenter, sFontFamily, sFontSize, sFontColor); } // Fonctions de chargement en cours PBInit=0; PBLoadingI=0;Stop=0; function Progressing(PBObj,Speed){ PBObj2=document.PBObj; PBInit+=8; if(PBInit>264) PBInit=8; document.getElementById('progress_bar').style.width=PBInit; Speed=80; if (Stop==0) { ProcessBar=window.setTimeout("Progressing("+PBObj2+","+Speed+")",(Speed)); } } function LoadingInit(LIObj) { WaitingDivContent="
Chargement de la page en cours
Veuillez patienter durant le chargement de la page...
"; LIObj.innerHTML=WaitingDivContent; PBLoadingI=1; } function Loading(State,SPB,PBLoaded){ if(document.getElementById){ TheWaitingdiv=document.getElementById('div_wait'); ProgressBar=document.getElementById('progress_bar'); } else { TheWaitingdiv=document.eval(div_wait); ProgressBar=document.eval(progress_bar); } if (State==1 && PBLoadingI==0){ LoadingInit(TheWaitingdiv); Loading(State,SPB,1); } else if (State==1 && PBLoadingI==1){ TheWaitingdiv.style.display=''; Stop=0; Progressing(ProgressBar.id,SPB); } else if (State==0){ TheWaitingdiv.style.display='none'; //window.clearTimeout; PBInit=0; ProgressBar.style.width=PBInit; Stop=1; } } function PriorityChangeIcon(PriorityObj,PImg){ document.getElementById(PImg).src="http://localhost/modules/skin/ellesexpress/images/"+PImg+"_"+PriorityObj.value+".png"; } function MM_preloadImages() { var d=document; if(d.images) { if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; iMacromedia Flash© Player 5 Installé") else document.write("Macromedia Flash© Player 5 Manquant") } } function AcrobatReaderNC() { var i; var trouve; trouve=false; if (document.layers) { for(i=0;iAcrobat Reader© Installé") else document.write("Acrobat Reader© Manquant") } } function DetectNavigateur(icone) { var navigateur; var version; var img; if (navigator.appName=="Netscape"){ navigateur="Netscape"; version=navigator.appVersion.substring(0,3); img="../../images/gif/ico_nc.gif"; } else{ navigateur="Internet Explorer"; version=navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5,navigator.appVersion.indexOf(";",navigator.appVersion.indexOf("MSIE"))); img="../../images/gif/ico_ie.gif"; } if (icone) document.write(""); else document.write("" + navigateur + " " + version + " installé"); } function resizeDialogToContent() { var dw = window.dialogWidth; while (isNaN(dw)) { dw = dw.substr(0,dw.length-1); } difw = dw - this.document.body.clientWidth; window.dialogWidth = this.document.body.scrollWidth+difw+'px'; var dh = window.dialogHeight; while (isNaN(dh)) { dh = dh.substr(0,dh.length-1); } difh = dh - this.document.body.clientHeight; window.dialogHeight = this.document.body.scrollHeight+difh+'px'; } function hideforms() { var a,b for (a=0;aformulaire[i+3]){ errormsg += formulaire[i+1] + "\n"; } } else if (formulaire[i+2]=="minselected"){ var c=0; for (j=0; jformulaire[i+3]) { errormsg += formulaire[i+1] + "\n"; } } else if (formulaire[i+2]=="email"){ if (input.value.length<6){ errormsg += formulaire[i+1] + "\n"; } else { var goodmail=0; for(k=0; k < input.value.length;k++) { var c = input.value.substring(k,k+1); if (c == "@") { for(var m = 0; m < input.value.length;m++) { var p = input.value.substring(m,m+1); if (p == ".") { goodmail=1; } } } } if (goodmail==0){ errormsg += formulaire[i+1] + "\n"; } } } else if (formulaire[i+2]=="compare"){ input2=eval('document.'+formname+'.'+formulaire[i+3]); if (input.value!=input2.value){ errormsg += formulaire[i+1] + "\n"; } } } if (errormsg==""){ eval('document.'+formname).submit(); } else { alert (errormsg); } } function isEmailAddr(email) { var result = false; var theStr = new String(email); var index = theStr.indexOf("@"); if (index > 0) { var pindex = theStr.indexOf(".",index); if ((pindex > index+1) && (theStr.length > pindex+1)) result = true; } return result; } function validRequired(formField,fieldLabel) { var result = true; if (formField.value == "") { alert('Please enter a value for the "' + fieldLabel +'" field.'); formField.focus(); result = false; } return result; } function validEmail(formField,fieldLabel,required) { var result = true; if (required && !validRequired(formField,fieldLabel)) result = false; if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) ) { alert("Please enter a complete email address in the form: name@domain.com"); formField.focus(); result = false; } return result; } function validateNewMail(theForm) { if (!validEmail(theForm.tos,"To",true)) return false; return true; } //fonction nécessaire pour le webmail function attache(NAME){ document.getElementById('td_input_hidden').innerHTML=""; NAME.target="CommFrame"; NAME.action.value="choosen"; } var g_posCurseur; function storeTextCaret(val) { if (val.createTextRange) val.caretPos = document.selection.createRange().duplicate(); } function getPosCurseur(oTextArea) { var sAncienTexte = oTextArea.value; var oRange = document.selection.createRange(); var sAncRangeTexte = oRange.text; var sMarquer = String.fromCharCode(28)+String.fromCharCode(29)+String.fromCharCode(30); oRange.text = sAncRangeTexte + sMarquer; oRange.moveStart('character', (0 - sAncRangeTexte.length - sMarquer.length)); var sNouvTexte = oTextArea.value; oRange.text = sAncRangeTexte; for (i=0; i <= sNouvTexte.length; i++) { var sTemp = sNouvTexte.substring(i, i + sMarquer.length); if (sTemp == sMarquer) { var cursorPos = (i - sAncRangeTexte.length); return cursorPos; } } } function IsInMyContact(Contactobj, DivAffichage) { // Etalon longueur if (typeof(CCOBJScroll)=='undefined') CCOBJScroll=Contactobj.scrollWidth; if (Contactobj.scrollWidth>CCOBJScroll) var Alldisplayed=0; else var Alldisplayed=1; //Position du curseur dans le champ g_posCurseur = getPosCurseur(Contactobj); // Réinitialisation du DIV if (document.getElementById) var ZoneAffichage=document.getElementById(DivAffichage); else var ZoneAffichage=document.getElementById(DivAffichage); ZoneAffichage.innerHTML=''; ZoneAffichage.style.display='none'; // Supprime les espaces et les virgules excédentaires sans perdre la position du curseur if (Contactobj.caretPos) { var caretPos = Contactobj.caretPos; if(Contactobj.value.indexOf(" ")>=0 || Contactobj.value.indexOf(";;")>=0) caretPos.text=''; } else { if(Contactobj.value.indexOf(" ")>=0) { Contactobj.value = Contactobj.value.substr(0,Contactobj.value.indexOf(" ")) + Contactobj.value.substr(Contactobj.value.indexOf(" ")+1,Contactobj.value.length); } else if(Contactobj.value.indexOf(";;")>=0) Contactobj.value = Contactobj.value.substr(0,Contactobj.value.indexOf(";;")) + Contactobj.value.substr(Contactobj.value.indexOf(";;")+1,Contactobj.value.length); } if (Contactobj.value.length>0) { Contactobj.size=Contactobj.value.length; var originalString=Contactobj.value; var StringLength=originalString.length; var CCfoccurence=0; var CSStringVar=0; var CSPos=""; var CVPos=1; var CCfnbOccur=-1; // Création du tableau des adresses TabContactlist=new Array(); CVirguleList=new Array(); CVirguleList[0]=0; // Nombre de contacts for (CSVar=0; CSVar0) TabContactlist[CCNb]=originalString; // Récuperation de l'ID du contact for (CSa=1;CSa<=CVirguleList.length;CSa++) if((g_posCurseur-1)>=CVirguleList[CSa-1]&&(g_posCurseur-1)<=(CVirguleList[CSa]+1)) var CSPositionContact=(CSa-1); if (CSPositionContact==undefined) CSPositionContact=0; if (TabContactlist[CSPositionContact]==undefined) TabContactlist[CSPositionContact]=""; // Nombre de caractères avant le div var CSMoveLength=0; if (Alldisplayed==1){ for (CSMoveDiv=0;CSMoveDiv"; for (var i=0; i0 && (MyContactList[i].substr(0,TabContactlist[CSPositionContact].length).toLowerCase())==(TabContactlist[CSPositionContact].toLowerCase())) { CCMaGenChoice+="\n"; CCMaGenChoice+=""+MyContactList[i]+""; CCMaGenChoice+="\n"; CCfoccurence++; CCfnbOccur=i; } } CCMaGenChoice+=""; // Remplissage et affichage du DIV if (CCfoccurence>0 && MyContactList[CCfnbOccur]!=TabContactlist[CSPositionContact]) { ZoneAffichage.innerHTML=CCMaGenChoice; ZoneAffichage.style.left=CSMoveLength; ZoneAffichage.style.display=''; } } else TabContactlist=new Array(); } function CSRemplissage(ContactobjID, CSposition, ContactListID, DivAffichage) { if (ContactobjID.caretPos && MyContactList[ContactListID]!=TabContactlist[CSposition]) { var caretPos = ContactobjID.caretPos; caretPos.text=MyContactList[ContactListID].substr(TabContactlist[CSposition].length,MyContactList[ContactListID].length); TabContactlist[CSposition]=MyContactList[ContactListID]; } else if (MyContactList[ContactListID].length!=TabContactlist[CSposition].length) { TabContactlist[CSposition]=MyContactList[ContactListID]; ContactobjID.value=TabContactlist.join(';')+';'; } document.getElementById(DivAffichage).style.display='none'; document.getElementById(DivAffichage).innerHTML=''; ContactobjID.focus(); } //Fonctions utilises dans PRODUCT // zoom photo var ie=document.all var ns6=document.getElementById&&!document.all //function ietruebody(){ //return (document.compatMode!="BackCompat")? document.documentElement : document.body //} function TemplateAlertInside(TATitle, TAImgsrc, TAImgLink, TAImgAlt, TAWidth, TAHeight, TAContent) { variable=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+=''; variable+='
\"';'+TATitle+'
'+TAContent+'
'; return variable; } function zoom(which, e, PosTop, PosLeft, imgwidth, imgheight, Zoomtitle, imgwinsrc){ if (ie||ns6){ crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage crossobj.style.top=PosTop+"px"; crossobj.style.left=PosLeft+"px"; divWidth=eval(imgwidth+22); divHeight=eval(imgheight+10); crossobj.innerHTML='
\"Fermer\"
'+TemplateAlertInside(Zoomtitle, imgwinsrc,'','',divWidth, divHeight,'')+'
'; crossobj.style.visibility="visible" return false } else //if NOT IE 4+ or NS 6+, affiche image ds le navigateur en pleine page return true } function closepreview(){ crossobj.style.visibility="hidden" } function drag_drop(e){ if (ie&&dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx+"px" crossobj.style.top=tempy+event.clientY-offsety+"px" } else if (ns6&&dragapproved){ crossobj.style.left=tempx+e.clientX-offsetx+"px" crossobj.style.top=tempy+e.clientY-offsety+"px" } return false } function initializedrag(e){ if (ie&&event.srcElement.id=="dragbar"||ns6&&e.target.id=="dragbar"){ offsetx=ie? event.clientX : e.clientX offsety=ie? event.clientY : e.clientY tempx=parseInt(crossobj.style.left) tempy=parseInt(crossobj.style.top) dragapproved=true document.onmousemove=drag_drop } } document.onmousedown=initializedrag document.onmouseup=new Function("dragapproved=false")