function ContactChange(v){if(v==1){document.getElementById("c_1").style.display="block";document.getElementById("c_2").style.display="none";document.getElementById("c_3").style.display="none";document.getElementById("c_4").style.display="none";document.getElementById("c_5").style.display="none";}else if(v==2){document.getElementById("c_1").style.display="block";document.getElementById("c_2").style.display="none";document.getElementById("c_3").style.display="none";document.getElementById("c_4").style.display="none";document.getElementById("c_5").style.display="none";}else if(v==3){document.getElementById("c_1").style.display="block";document.getElementById("c_2").style.display="none";document.getElementById("c_3").style.display="none";document.getElementById("c_4").style.display="block";document.getElementById("c_5").style.display="none";}else if(v==4){document.getElementById("c_1").style.display="none";document.getElementById("c_2").style.display="block";document.getElementById("c_3").style.display="none";document.getElementById("c_4").style.display="block";document.getElementById("c_5").style.display="block";}else if(v==5){document.getElementById("c_1").style.display="none";document.getElementById("c_2").style.display="block";document.getElementById("c_3").style.display="block";document.getElementById("c_4").style.display="none";document.getElementById("c_5").style.display="none";}else if(v==6){document.getElementById("c_1").style.display="none";document.getElementById("c_2").style.display="block";document.getElementById("c_3").style.display="block";document.getElementById("c_4").style.display="none";document.getElementById("c_5").style.display="none";}}
var ie5=(document.getElementById&&document.all);var ns6=(!document.all&&document.getElementById);function closeTop(id){if(ie5||ns6){id.style.visibility="hidden";}}
function openTop(id){if(ie5||ns6){id.style.visibility="visible";}}
function fadeIn(objId,opacity){if(document.getElementById){obj=document.getElementById(objId);if(opacity<=90){setOpacity(obj,opacity,opacity*5);opacity+=10;window.setTimeout("fadeIn('"+objId+"',"+opacity+")",70);}}}
function setOpacity(obj,opacity,width){opacity=(opacity==100)?99.999:opacity;obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100;}
function CloseMessage(){imageId='mess_spec';image=document.getElementById(imageId);image.style.visibility='hidden';}
function initImage(){imageId='mess_spec';image=document.getElementById(imageId);setOpacity(image,0);image.style.visibility='visible';fadeIn(imageId,0);}
function AppelFermetureDef(siteurl,session){var xhr_object=null;var search="";if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
xhr_object.open("GET",siteurl+"inc/inc_mess_spec_ferm.php?session="+session,true);xhr_object.onreadystatechange=function(){if(xhr_object.readyState==4){var leConteneur=document.getElementById('mess_spec');leConteneur.innerHTML=xhr_object.responseText;}}
xhr_object.send(null);}
var infobulle_visible=false;document.onmousemove=movebulle;function GetId(id){return document.getElementById(id);}
function movebulle(e){if(infobulle_visible){var largeur=0,hauteur=0;if(typeof(window.innerWidth)=='number'){largeur=window.innerWidth;hauteur=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){largeur=document.documentElement.clientWidth;hauteur=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){largeur=document.body.clientWidth;hauteur=document.body.clientHeight;}else{largeur=-1;hauteur=-1;}
if(navigator.appName!="Microsoft Internet Explorer"){GetId("curseur").style.left=e.pageX+1+"px";GetId("curseur").style.top=e.pageY+1+"px";if(e.pageX>largeur-80)
GetId("curseur").style.left=e.pageX-80+1+"px"}else{if(document.documentElement.clientWidth>0){GetId("curseur").style.left=2+event.clientX+document.documentElement.scrollLeft+"px";GetId("curseur").style.top=1+event.clientY+document.body.scrollTop+document.documentElement.scrollTop+"px";if(event.clientX+document.documentElement.scrollLeft>largeur-80)
GetId("curseur").style.left=event.clientX-80+document.documentElement.scrollLeft+"px";}else{GetId("curseur").style.left=2+event.clientX+document.body.scrollLeft+"px";GetId("curseur").style.top=1+event.clientY+document.body.scrollTop+document.body.scrollTop+"px";if(event.clientX+document.body.scrollLeft>largeur-80)
GetId("curseur").style.left=event.clientX-80+document.body.scrollLeft+"px";}}}}
function montrebulle(text){if(infobulle_visible==false){GetId("curseur").style.visibility="visible";GetId("curseur").innerHTML=text;infobulle_visible=true;}}
function cachebulle(){if(infobulle_visible==true){GetId("curseur").style.visibility="hidden";infobulle_visible=false;}}
function BookMark(url,titre){bookmarkurl=url;bookmarktitle=titre;if(navigator.appName!='Microsoft Internet Explorer'){window.sidebar.addPanel(bookmarktitle,bookmarkurl,"");}else{if(window.external)
window.external.AddFavorite(bookmarkurl,bookmarktitle);}}
function GetCommune(siteurl,pays,cm,cp){var xhr_object=null;if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
xhr_object.open("GET",siteurl+"inc/ajax_communes.php?pays="+pays+"&cm="+cm+"&cp="+cp,true);xhr_object.onreadystatechange=function(){var leConteneur=document.getElementById('listereference');if(xhr_object.readyState==4){if(xhr_object.status==200){leConteneur.innerHTML=xhr_object.responseText;}}else if(xhr_object.readyState==3){leConteneur.innerHTML="....";}}
xhr_object.send(null);}
function GetCommune2(siteurl,pays,cm,cp){var xhr_object2=null;if(window.XMLHttpRequest)
xhr_object2=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object2=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
xhr_object2.open("GET",siteurl+"inc/ajax_communes.php?type=l&pays="+pays+"&cm="+cm+"&cp="+cp,true);xhr_object2.onreadystatechange=function(){var leConteneur2=document.getElementById('listereference2');if(xhr_object2.readyState==4){if(xhr_object2.status==200){leConteneur2.innerHTML=xhr_object2.responseText;}}else if(xhr_object2.readyState==3){leConteneur2.innerHTML="....";}}
xhr_object2.send(null);}
function GetSSProd(siteurl,reference,dur){var xhr_object=null;if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
data="reference="+reference+"&dur="+dur;xhr_object.open("POST",siteurl+"inc/ajax_ss_prod.php",true);xhr_object.onreadystatechange=function(){if(xhr_object.readyState==4){var leConteneur=document.getElementById('ssprod');leConteneur.innerHTML=xhr_object.responseText;}}
xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr_object.send(data);}
function gotofunc(url){location=url;}
function openWindow(name,width,height,url){win=window.open(url,name,"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+width+",height="+height);win.moveTo(screen.width/2-(width/2),screen.height/2-(height/2));win.screenX=screen.width/2-(width/2);win.screenY=screen.height/2-(height/2);}
function openWindow2(name,width,height,url){win=window.open(url,name,"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);win.moveTo(screen.width/2-(width/2),screen.height/2-(height/2));win.screenX=screen.width/2-(width/2);win.screenY=screen.height/2-(height/2);}
function montre(id){var d=document.getElementById(id);if(d)tp=d.style.display;for(var i=0;i<=40;i++){if(document.getElementById('smenu'+i)){document.getElementById('smenu'+i).style.display='none';}}
if(d){if(tp=='none'){d.style.display='block';}}}
function montre_nocache(id){var d=document.getElementById(id);if(d)tp=d.style.display;if(d){if(tp=='none'){d.style.display='block';}else{d.style.display='none';}}}
function ChangePrix(prix){document.getElementById('price').value=FormatCurrency(prix);}
function FormatCurrency(FIGURE){if(!FIGURE||FIGURE==""){FIGURE="0.00";}
var strTemp=FIGURE.toString();while(strTemp.indexOf(",")>-1){strTemp=strTemp.replace(",","");}
strTemp=parseFloat(strTemp);FIGURE=FIGURE.toString();var Place=FIGURE.indexOf(".");if(Place>-1){if((FIGURE.length-Place)==2){FIGURE+="0";}}
else{FIGURE+=".00";}
return FIGURE;}
function ConfirmDelete(id,url){urlto=url+'?delref='+id;if(confirm("Etes-vous sūr?"))gotofunc(urlto);}
function CommuteAffichage(Bloc_visible){if(Bloc_visible==0)
{document.getElementById("bloc_AdresseLivraison").style.display="none";}
else
{document.getElementById("bloc_AdresseLivraison").style.display="block";}}
function chgphoto(url){document.getElementById("photoref").src=url;}
function EcrireCoul(res){window.document.getElementById('col').value=res;window.document.getElementById('field').value=res;}
function MM_openBrWindow(theURL,winName,features,Twidth,Theight){features2='status=no,resizable=no,scrollbars=no,width=800,height=600';features+=',width='+Twidth+',height='+Theight;if(window.screen){var left=(screen.width-Twidth)/2;var heigth=(screen.height-Theight)/2;features+=',left='+left+',top='+heigth;}
window.open(theURL,winName,features);}
userAgent=window.navigator.userAgent;browserVers=parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);mustInitImg=true;var preloadFlag=true;function newImage(arg){if(document.images){rslt=new Image();rslt.src=arg;return rslt;}}
function initImgID(){var di=document.images;if(mustInitImg&&di){for(var i=0;i<di.length;i++){if(!di[i].id)di[i].id=di[i].name;}mustInitImg=false;}}
function findElement(n,ly){var d=document;if(browserVers<4)return d[n];if((browserVers>=6)&&(d.getElementById)){initImgID;return(d.getElementById(n))};var cd=ly?ly.document:d;var elem=cd[n];if(!elem){for(var i=0;i<cd.layers.length;i++){elem=findElement(n,cd.layers[i]);if(elem)return elem;}}
return elem;}
function changeImagesArray(array){if(preloadFlag==true){var d=document;var img;for(i=0;i<array.length;i+=2){img=null;var n=array[i];if(d.images){if(d.layers){img=findElement(n,0);}
else{img=d.images[n];}}
if(!img&&d.getElementById){img=d.getElementById(n);}
if(!img&&d.getElementsByName){var elms=d.getElementsByName(n);if(elms){for(j=0;j<elms.length;j++){if(elms[j].src){img=elms[j];break;}}}}
if(img){img.src=array[i+1];}}}}
function changeImages(){changeImagesArray(changeImages.arguments);}
function preloadImages(){if(document.images){preloadFlag=true;}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
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;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
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);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
var rel_value='splash';var margin_top=40;var margin_right=40;var margin_bottom=40;var margin_left=40;var splash_groups=new Array();var splash_as=new Array();var splash_ids=new Array();var splash_titles=new Array();var slide_timeout;var slide_timeout_notification;var slide_timeout_value=4000;var current_group;var current_position;var is_sliding=false;var lightbox_replace=true;var set_bg=false;var z_index_mini=100000;var objects_2_hide=new Array();var splash_auto_start=false;var splash_auto_start_rank=0;var splash_auto_start_group='splash';function splash_image(a){hide_and_show('hidden');obj_body=document.getElementsByTagName('body').item(0);rel_attr=new String(a.getAttribute('rel'));val=rel_attr.replace(rel_value+'|','');splash_id=(a.getAttribute('class'))?new String(a.getAttribute('class').match(new RegExp(/splash[0-9]+$/))):'';if(val!=rel_value&&splash_groups[val].length>0){current_group=val;current_position=in_array(splash_groups[val],splash_id);}
else{current_group=current_position='';}
if(!document.getElementById('splash_screen')){obj_splash_screen=document.createElement('a');obj_splash_screen.setAttribute('id','splash_screen');obj_splash_screen.setAttribute('title','Close the splash');obj_splash_screen.style.zIndex=z_index_mini;array_page_size=getPageSize();obj_splash_screen.style.width='100%';obj_splash_screen.style.height=array_page_size[1]+'px';obj_splash_screen.onclick=function(){splash_bye();return false;}
if(set_bg){obj_splash_screen.setAttribute('class','bg');}
obj_body.appendChild(obj_splash_screen);obj_splash_screen.style.zIndex=z_index_mini;obj_content=document.createElement('div');obj_content.setAttribute('id','image_content');obj_content.style.width='200px';obj_content.style.height='200px';obj_content.className='ajax-loading';obj_body.appendChild(obj_content);obj_content.style.zIndex=z_index_mini+1;array_page_scroll=getPageScroll();array_page_size=getPageSize();obj_content.style.top=array_page_scroll[1]+margin_top+'px';obj_content.style.left=array_page_size[0]/2-(parseInt(obj_content.style.width)/2)+'px';}
else{obj_splash_screen=document.getElementById('splash_screen');obj_content=document.getElementById('image_content');obj_content.removeChild(document.getElementById('splash_img'));obj_content.className='ajax-loading';}
if(document.getElementById('title_content')){obj_title=document.getElementById('title_content');if(document.getElementById('splash_previous')){obj_title.removeChild(document.getElementById('splash_previous'));obj_title.removeChild(document.getElementById('splash_next'));if(document.getElementById('splash_notification')){obj_content.removeChild(document.getElementById('splash_notification'));}
what=(is_sliding)?'splash_pause':'splash_play';obj_title.removeChild(document.getElementById(what));}
obj_content.removeChild(obj_title);}
ini_image(a);}
function ini_image(a){img=new Image();img.src=a.href;if(!img.complete){img.onload=function(){image_display(a);}}
else{image_display(a);}}
function image_display(a){obj_body=document.getElementsByTagName('body').item(0);obj_content=document.getElementById('image_content');obj_splash_screen=document.getElementById('splash_screen');obj_image=document.createElement('img');obj_image.setAttribute('id','splash_img');obj_image.onclick=function(){splash_bye();return false;}
obj_content.appendChild(obj_image);obj_image.style.zIndex=z_index_mini+2;obj_content.style.width=img.width+'px';obj_content.style.height=img.height+'px';array_page_scroll=getPageScroll();array_page_size=getPageSize();obj_content.style.top=array_page_scroll[1]+margin_top+'px';obj_content.style.left=array_page_size[0]/2-(parseInt(img.width)/2)+'px';obj_content=document.getElementById('image_content');obj_content.className='';obj_image.setAttribute('src',a.href);obj_image.style.display='block';obj_close=document.createElement('a');obj_close.setAttribute('id','splash_close');obj_close.onclick=function(){splash_bye();return false;}
obj_content.appendChild(obj_close);obj_close.style.zIndex=z_index_mini+3;obj_title=document.createElement('div');obj_title.setAttribute('id','title_content');obj_content.appendChild(obj_title);obj_title.style.zIndex=z_index_mini+4;str_position=(current_group!='')?'Image '+(current_position+1)+' sur '+splash_groups[current_group].length+' :':'';obj_text=document.createTextNode(str_position);obj_title.appendChild(obj_text);obj_description=document.createElement('div');obj_description.setAttribute('id','splash_description');obj_title.appendChild(obj_description);obj_description.style.zIndex=z_index_mini+5;splash_id=(a.getAttribute('class'))?new String(a.getAttribute('class').match(new RegExp(/splash[0-9]+$/))):'';obj_text=document.createTextNode(splash_titles[splash_id]);obj_description.appendChild(obj_text);array_page_size=getPageSize();total_width=margin_left+parseInt(obj_content.style.width)+margin_right;if(total_width>array_page_size[0]){obj_splash_screen.style.width=total_width+'px';obj_content.style.left=margin_left+'px';obj_title.style.left=margin_left+'px';};total_height=margin_top+parseInt(obj_content.style.top)+parseInt(obj_image.height)+parseInt(obj_title.offsetHeight)+margin_bottom;if(total_height>array_page_size[1]){obj_splash_screen.style.height=total_height+'px';};ini_nav(a);}
function ini_nav(a){clearTimeout(slide_timeout);obj_title=document.getElementById('title_content');rel_attr=new String(a.getAttribute('rel'));val=rel_attr.replace(rel_value+'|','');if(splash_groups[val]&&document.getElementById('splash_img')){obj_previous=document.createElement('a');obj_previous.setAttribute('id','splash_previous');obj_previous.setAttribute('title','Jump to the previous image');obj_previous.onmouseover=function(){obj_previous.className='over';}
obj_previous.onmouseout=function(){obj_previous.className='';}
obj_previous.onclick=function(){splash_previous();}
obj_title.appendChild(obj_previous);obj_previous.style.zIndex=z_index_mini+6;obj_next=document.createElement('a');obj_next.setAttribute('id','splash_next');obj_next.setAttribute('title','Jump to the next image');obj_next.onmouseover=function(){obj_next.className='over';}
obj_next.onmouseout=function(){obj_next.className='';}
obj_next.onclick=function(){splash_next();}
obj_title.appendChild(obj_next);obj_next.style.zIndex=z_index_mini+6;var obj_play=document.createElement('a');if(!is_sliding){obj_play.setAttribute('id','splash_play');obj_play.setAttribute('title','Start the slide');}
else{obj_play.setAttribute('id','splash_pause');obj_play.setAttribute('title','Pause the slide');}
obj_play.onclick=function(){splash_pause();}
obj_play.onmouseover=function(){obj_play.className='over';}
obj_play.onmouseout=function(){obj_play.className='';}
obj_title.appendChild(obj_play);obj_play.style.zIndex=z_index_mini+6;if(is_sliding){slide_timeout=window.setTimeout(splash_next,slide_timeout_value);}}}
function splash_previous(){current_position=(current_position-1<0)?splash_groups[current_group].length-1:current_position-1;splash_image(splash_as[splash_groups[current_group][current_position]]);}
function splash_next(){current_position=(current_position+1==splash_groups[current_group].length)?0:current_position+1;splash_image(splash_as[splash_groups[current_group][current_position]]);}
function splash_pause(){if(!is_sliding){is_sliding=true;document.getElementById('splash_play').setAttribute('id','splash_pause');document.getElementById('splash_pause').setAttribute('title','Pause the slide');current_position=(current_position==splash_groups[current_group].length)?0:current_position;slide_timeout=window.setTimeout(splash_next,slide_timeout_value/4);}
else{is_sliding=false;document.getElementById('splash_pause').setAttribute('id','splash_play');document.getElementById('splash_play').setAttribute('title','Start the slide');clearTimeout(slide_timeout);}}
function notification(){clearTimeout(slide_timeout_notification);obj_content=document.getElementById('image_content');if(!document.getElementById('splash_notification')){obj_slide=document.createElement('a');obj_slide.setAttribute('id','splash_notification');obj_slide.setAttribute('title','Sliding (ou pas)');obj_content.appendChild(obj_slide);obj_slide.style.zIndex=z_index_mini+6;obj_slide.style.top=(parseInt(obj_content.style.height)/2)-25+'px';obj_slide.style.left=(parseInt(obj_content.style.width)/2)-25+'px';obj_slide.style.width='50px';obj_slide.style.height='50px';}
else{obj_slide=document.getElementById('splash_notification');}
if(is_sliding){obj_slide.className='playing';}
else{obj_slide.className='paused';slide_timeout_notification=setTimeout(splash_notification_bye,2000);}}
function splash_notification_bye(){if(document.getElementById('image_content')){obj_content=document.getElementById('image_content');obj_content.removeChild(document.getElementById('splash_notification'));}
clearTimeout(slide_timeout_notification);}
function splash_bye(){clearTimeout(slide_timeout);clearTimeout(slide_timeout_notification);is_sliding=false;obj_body=document.getElementsByTagName('body').item(0);obj_body.removeChild(document.getElementById('splash_screen'));obj_body.removeChild(document.getElementById('image_content'));if(document.getElementById('title_content')){obj_content.removeChild(document.getElementById('title_content'));}
hide_and_show('visible');}
function key_check(e){if(document.getElementById('splash_img')){clearTimeout(slide_timeout);what=(e==null)?event.keyCode:e.which;if(in_array(new Array(27,38,46,88),what)>=0){splash_bye();return false;}
if(splash_groups[current_group]){if(in_array(new Array(13,32,40),what)>=0){splash_pause();notification();return false;}
if(in_array(new Array(33,37,109),what)>=0){splash_previous();return false;}
if(in_array(new Array(34,39,107),what)>=0){splash_next();return false;}}}}
function hide_and_show(todo){for(i=0;i<objects_2_hide.length;i++){objects_2_hide[i].style.visibility=todo;}}
function ini_splash_images(){objs=document.getElementsByTagName('object');for(i=0;i<objs.length;i++){if(objs[i].style.visibility=='visible'||objs[i].style.visibility==''){objects_2_hide[objects_2_hide.length]=objs[i];}}
objs=document.getElementsByTagName('embed');for(i=0;i<objs.length;i++){if(objs[i].style.visibility=='visible'||objs[i].style.visibility==''){objects_2_hide[objects_2_hide.length]=objs[i];}}
splash_groups=new Array();splash_as=new Array();splash_titles=new Array();as=document.getElementsByTagName('a');for(i=0;i<as.length;i++){a=as[i];rel_attr=new String(a.getAttribute('rel'));if(rel_attr.match('splash.image')){rel_attr=rel_attr.replace('splash.image','splash');a.setAttribute('rel',rel_attr);}
if(lightbox_replace&&rel_attr.match('lightbox')){rel_attr=rel_attr.replace('lightbox','splash');rel_attr=rel_attr.replace('splash[','splash|');rel_attr=rel_attr.replace(/]$/,'');a.setAttribute('rel',rel_attr);}
rel_attr=new String(a.getAttribute('rel'));if(rel_attr.match('splash')){splash_id='splash'+i;klass=(a.getAttribute('class'))?a.getAttribute('class')+' '+splash_id:splash_id;a.setAttribute('class',klass);a.onclick=function(){splash_image(this);return false;}
val=rel_attr.replace(rel_value+'|','');if(val!=rel_value){var array=(!splash_groups[val]||typeof splash_groups[val]!='object')?new Array():splash_groups[val];array.push(splash_id);splash_groups[val]=array;}
splash_as[splash_id]=a;var array=(typeof splash_ids[val]=='object')?splash_ids[val]:new Array();array.push(splash_id);splash_ids[val]=array;splash_titles[splash_id]=(a.getAttribute('title'))?a.getAttribute('title'):'Image '+i;}}
document.onkeydown=key_check;if(splash_auto_start){splash_image(splash_as[splash_ids[splash_auto_start_group][splash_auto_start_rank]]);}}
function getPageScroll(){var yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;}else if(document.body){yScroll=document.body.scrollTop;}
arrayPageScroll=new Array('',yScroll)
return arrayPageScroll;}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
function addEvent(obj,evType,fn,useCapture){if(obj.addEventListener){obj.addEventListener(evType,fn,useCapture);return true;}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}else{alert("Handler could not be attached");}}
function in_array(ar,val){if(ar.length==0){return-1;}
for(i=0;i<ar.length;i++){if(ar[i]==val){return i;}}
return-1;}
function isie(){if(navigator.appName=='Microsoft Internet Explorer'){var reg_exp=new RegExp('MSIE [0-9]*.[0-9]*','gi');var str=new String(navigator.appVersion);var result=new String(str.match(reg_exp));var array_version=result.split(' ');var version=array_version[1];return version;}
else{return false;}}
addEvent(window,'load',ini_splash_images);function Add_Event(obj_,event_,func_,mode_){if(obj_.addEventListener)
obj_.addEventListener(event_,func_,mode_?mode_:false);else
obj_.attachEvent('on'+event_,func_);}
function GetScrollPage(){var Left;var Top;var DocRef;if(window.innerWidth){with(window){Left=pageXOffset;Top=pageYOffset;}}
else{if(document.documentElement&&document.documentElement.clientWidth)
DocRef=document.documentElement;else
DocRef=document.body;with(DocRef){Left=scrollLeft;Top=scrollTop;}}
return({top:Top,left:Left});}
function ObjGetPosition(obj_){var PosX=0;var PosY=0;if(typeof(obj_)=='object')
var Obj=obj_;else
var Obj=document.getElementById(obj_);if(Obj){PosX=Obj.offsetLeft;PosY=Obj.offsetTop;if(Obj.offsetParent){while(Obj=Obj.offsetParent){if(Obj.offsetParent){PosX+=Obj.offsetLeft;PosY+=Obj.offsetTop;}}}}
return({left:PosX,top:PosY});}
var IdTimer_1;var IdTimer_2;var O_DivScroll;var Rapport=1.0/20.0;var Mini=2*Rapport;function DIV_Scroll(id_){var Obj=document.getElementById(id_);this.Obj=Obj;if(Obj){Obj.style.position="absolute";var Pos=ObjGetPosition(id_);this.PosX=Pos.left;this.PosY=Pos.top;this.DebX=this.PosX;this.DebY=this.PosY;this.NewX=0;this.NewY=0;this.Move=DIV_Deplace;}}
function DIV_Deplace(x_,y_){if(arguments[0]!=null){this.PosX=x_;this.Obj.style.left=parseInt(x_)+"px";}
if(arguments[1]!=null){this.PosY=y_;this.Obj.style.top=parseInt(y_)+"px";}}
function DIV_Replace(x_,y_){var Delta_X=(x_-O_DivScroll.PosX)*Rapport;var Delta_Y=(y_-O_DivScroll.PosY)*Rapport;if(((Delta_Y<Mini)&&(Delta_Y>-Mini))&&((Delta_X<Mini)&&(Delta_X>-Mini))){clearInterval(IdTimer_1);O_DivScroll.Move(x_,y_);}
else{O_DivScroll.Move(O_DivScroll.PosX+Delta_X,O_DivScroll.PosY+Delta_Y);}}
function DIV_CheckScroll(){var Scroll=GetScrollPage();O_DivScroll.NewX=Scroll.left+O_DivScroll.DebX;O_DivScroll.NewY=Scroll.top+O_DivScroll.DebY;if((O_DivScroll.PosY!=O_DivScroll.NewY)||(O_DivScroll.PosX!=O_DivScroll.NewX)){clearInterval(IdTimer_1);IdTimer_1=setInterval("DIV_Replace("+O_DivScroll.NewX+","+O_DivScroll.NewY+")",10);}
return(true);}
function DIV_InitScroll(){O_DivScroll=new DIV_Scroll('mess_spec');if(O_DivScroll.Obj)
IdTimer_2=setInterval('DIV_CheckScroll()',100);}
Add_Event(window,'load',DIV_InitScroll);function EnvoiMess(siteurl,formsearch,event){if(event.keyCode==13 || event=='ok'){var leConteneur=document.getElementById('mess_spec_txt');var xhr_object=null;var search="";if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
for(i=0;i<formsearch.length;i++){if(formsearch.elements[i].type=='radio'){if(formsearch.elements[i].checked)search=search+formsearch.elements[i].name+'='+formsearch.elements[i].value+'&';}else{search=search+formsearch.elements[i].name+'='+formsearch.elements[i].value+'&';formsearch.elements[i].value="";}}
xhr_object.open("GET",siteurl+"inc/inc_message_spec_envoi.php?"+search,true);xhr_object.onreadystatechange=function(){if(xhr_object.readyState==4){var leConteneur=document.getElementById('mess_spec_txt');leConteneur.innerHTML=xhr_object.responseText;leConteneur.scrollTop=leConteneur.scrollHeight;}}
xhr_object.send(null);}}
function CheckMess(siteurl){var leConteneur=document.getElementById('mess_spec_txt');var xhr_object=null;var search="";if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");return;}
xhr_object.open("GET",siteurl+"inc/inc_message_spec_envoi.php",true);xhr_object.onreadystatechange=function(){if(xhr_object.readyState==4){var leConteneur=document.getElementById('mess_spec_txt');leConteneur.innerHTML=xhr_object.responseText;leConteneur.scrollTop=leConteneur.scrollHeight;}}
xhr_object.send(null);setTimeout("CheckMess(siteurl)",15000);}
