var style=new Array('g','/g','i','/i','s','/s','email','/email','lien=','/lien','img','/img','quote','/quote','fixed','/fixed','cpp','/cpp','url','/url');var stockage=new Array('0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');lien="http://";function aff_partie_sondage(){if(document.getElementById('sondagediv').style.display=='block'){document.getElementById('sondagediv').style.display='none';}else{document.getElementById('sondagediv').style.display='block';}}
function apercevoir(){document.getElementById('apercu').style.display=(document.all&&!opera)?'block':'table-row';document.getElementById('apercu_contenu').value=document.hop.content_form.value;document.getElementById('apercu_smiley').value=document.hop.smiley.checked?'1':'0';document.getElementById('apercu_form').submit();}
function openChild(file,window){childWindow=open(file,window,'width=800,height=600, scrollbars=1, resizable=1');if(childWindow.opener==null)childWindow.opener=self;}
function passfocus(){document.getElementById('passf').style.display=(document.all&&!opera)?'block':'table-row';}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length)d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i>d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);return x;}
function storeCaret(textEl){if(textEl.createTextRange)textEl.caretPos=document.selection.createRange().duplicate();}
function insertAtCaret(textEl,text){if(textEl.createTextRange&&textEl.caretPos){var caretPos=textEl.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;}}
function insertInCaret(textEl,text,text2){if(textEl.createTextRange&&textEl.caretPos){var caretPos=textEl.caretPos;selectedtext=caretPos.text;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==''?text+'':text;caretPos.text=caretPos.text+selectedtext+text2;}}
function palette(id,vernav){if(vernav>=4){MM_findObj('content_form').focus();if(MM_findObj('content_form').createTextRange&&MM_findObj('content_form').caretPos){var caretPos=MM_findObj('content_form').caretPos;if(caretPos.text.length>0){if(id!=8)insertInCaret(MM_findObj('content_form'),"["+style[id]+"]","["+style[id+1]+"]");else{geturl=prompt("veuillez entrer l'url",'http://');insertInCaret(MM_findObj('content_form'),"["+style[id]+geturl+"]","["+style[id+1]+"]");}}else{if((countbalise('['+style[id],'content_form')+countbalise('['+style[id+1],'content_form'))%2==0){if(id!=8)insertAtCaret(MM_findObj('content_form'),"["+style[id]+"]");else{geturl=prompt("veuillez entrer l'url",'http://');insertAtCaret(MM_findObj('content_form'),"["+style[id]+geturl+"]");}}else{insertAtCaret(MM_findObj('content_form'),"["+style[id+1]+"]");}
MM_findObj('content_form').focus()}}}else{if(stockage[id]=='0'){var temp=document.hop.content_form.value;document.hop.content_form.value=temp+' '+'['+style[id]+']';stockage[id]='1';}else{var temp=document.hop.content_form.value;document.hop.content_form.value=temp+'['+style[id+1]+']'+' ';stockage[id]='0';}}}
function countbalise(b,ch){count=0;pos=MM_findObj(ch).value.indexOf(b);while(pos!=-1){count++;pos=MM_findObj(ch).value.indexOf(b,pos+1);}
return count;}
function insertElt(MyString,vernav){if(vernav>=4){MM_findObj('content_form').focus();if((MM_findObj('content_form').createTextRange)&&(MM_findObj('content_form').caretPos)){var caretPos=MM_findObj('content_form').caretPos;if(caretPos.text.length>0)insertInCaret(MM_findObj('content_form'),MyString,"");else insertAtCaret(MM_findObj('content_form'),MyString);}}else{var temp=document.hop.content_form.value;document.hop.content_form.value=temp+MyString;}}
function insertTag(MyString,vernav){if(vernav>=4){MM_findObj('content_form').focus();if(MM_findObj('content_form').createTextRange&&MM_findObj('content_form').caretPos){var caretPos=MM_findObj('content_form').caretPos;if(caretPos.text.length>0)insertInCaret(MM_findObj('content_form'),"["+MyString+"]","[/"+MyString+"]");else{if((countbalise('['+MyString,'content_form')+countbalise('[/'+MyString,'content_form'))%2==0)insertAtCaret(MM_findObj('content_form'),"["+MyString+"]");else insertAtCaret(MM_findObj('content_form'),"[/"+MyString+"]");MM_findObj('content_form').focus();}}}else{if(stockage[12]=='0'){var temp=document.hop.content_form.value;document.hop.content_form.value=temp+' '+'['+MyString+']';stockage[12]='1';}else{var temp=document.hop.content_form.value;document.hop.content_form.value=temp+'[/'+MyString+']'+' ';stockage[12]='0';}}}
col0=new Array(255,255,0,255,0,0);col1=new Array(255,0,255,255,0,0);col2=new Array(0,0,255,0,0,255);col3=new Array(0,255,0,0,255,0);var base_hexa="0123456789ABCDEF";function dec2Hexa(number){return base_hexa.charAt(Math.floor(number/16))+base_hexa.charAt(number%16);}
function RGB2Hexa(TR,TG,TB){return"#"+dec2Hexa(TR)+dec2Hexa(TG)+dec2Hexa(TB);}
function lightCase(MyObject){document.getElementById('ColorUsed').bgColor=document.getElementById(MyObject).bgColor;document.getElementById('ColorUsed').style.backgroundColor=document.getElementById(MyObject).bgColor;document.getElementById('ColorUsedMem').value=document.getElementById(MyObject).bgColor;}
function highlightCase(MyObject){document.getElementById('ColorUsed').bgColor=document.getElementById(MyObject).bgColor;document.getElementById('ColorUsed').style.backgroundColor=document.getElementById(MyObject).bgColor;}
function backlightCase(MyObject){document.getElementById('ColorUsed').bgColor=document.getElementById('ColorUsedMem').value;document.getElementById('ColorUsed').style.backgroundColor=document.getElementById('ColorUsedMem').value;}
function rgb(dm,ta,index,img,explication){fm=dm+18;for(i=dm;i<fm+1;i++){r=Math.floor(ta[0]+(i-dm)*(ta[1]-ta[0])/(fm-dm));g=Math.floor(ta[2]+(i-dm)*(ta[3]-ta[2])/(fm-dm));b=Math.floor(ta[4]+(i-dm)*(ta[5]-ta[4])/(fm-dm));codehex=dec2Hexa(r)+''+dec2Hexa(g)+''+dec2Hexa(b);codehexB='#'+codehex;document.write('<td style="cursor:pointer; padding:0px; width:3px; background-color:'+codehexB+'" onclick="TAinsert(\'[\'+document.getElementById(\'tableId'+index+'\').bgColor+\']\',\'[/\'+document.getElementById(\'tableId'+index+'\').bgColor+\']\');lightCase(\'tableId'+index+'\');\" onmouseover=\"highlightCase(\'tableId'+index+'\');" onmouseout="backlightCase();" id="tableId'+index+'" bgcolor="'+RGB2Hexa(r,g,b)+'" width="3" height="17"><img title="'+explication+' : [#'+codehex+']text[/#'+codehex+']" src="'+img+'" alt="" width="3" height="17"/></td>\n');index++;}}
function rgb2(rte,dm,ta,index,img,explication){fm=dm+18;for(i=dm;i<fm+1;i++){r=Math.floor(ta[0]+(i-dm)*(ta[1]-ta[0])/(fm-dm));g=Math.floor(ta[2]+(i-dm)*(ta[3]-ta[2])/(fm-dm));b=Math.floor(ta[4]+(i-dm)*(ta[5]-ta[4])/(fm-dm));codehex=dec2Hexa(r)+''+dec2Hexa(g)+''+dec2Hexa(b);codehexB='#'+codehex;document.write('<td style="cursor:pointer; padding:0; margin:0; background-color:'+codehexB+'" onclick="FormatText(\''+rte+'\',\'forecolor\',document.getElementById(\'tableId'+index+'\').bgColor);lightCase(\'tableId'+index+'\');" onmouseover=\"highlightCase(\'tableId'+index+'\');" onmouseout="backlightCase();" id="tableId'+index+'" bgcolor="'+RGB2Hexa(r,g,b)+'" width="2" height="15"><img title="'+explication+'" src="'+img+'" alt="" width="2" height="15" style="padding:0px; margin:0px; width:2px; height:15px" /></td>\n');index++;}}
function countInstances(open,closed){var opening=document.hop.content_form.value.split(open);var closing=document.hop.content_form.value.split(closed);return opening.length+closing.length-2;}
function TAinsert(text1,text2){var ta=document.getElementById('content_form');if(document.selection){var str=document.selection.createRange().text;ta.focus();var sel=document.selection.createRange();if(text2!=""){if(str==""){var instances=countInstances(text1,text2);if(instances%2!=0)sel.text=sel.text+text2;else sel.text=sel.text+text1;}else sel.text=text1+sel.text+text2;}else sel.text=sel.text+text1;}else if(ta.selectionStart||ta.selectionStart==0){if(ta.selectionEnd>ta.value.length)ta.selectionEnd=ta.value.length;var firstPos=ta.selectionStart;var secondPos=ta.selectionEnd+text1.length;var contenuScrollTop=ta.scrollTop;ta.value=ta.value.slice(0,firstPos)+text1+ta.value.slice(firstPos);ta.value=ta.value.slice(0,secondPos)+text2+ta.value.slice(secondPos);ta.selectionStart=firstPos+text1.length;ta.selectionEnd=secondPos;ta.focus();ta.scrollTop=contenuScrollTop;}else{var sel=document.hop.content_form;var instances=countInstances(text1,text2);if(instances%2!=0&&text2!="")sel.value=sel.value+text2;else sel.value=sel.value+text1;}}