function trim(a){return typeof a==="string"&&a!==""?a.replace(/^\s+|\s+$/g,""):""}function getId(a){a=typeof a==="string"?a:"";if(a!==""&&document.getElementById)return document.getElementById(a);return null}
function addLoadListener(a){if(window.addEventListener)window.addEventListener("load",a,!1);else if(document.addEventListener)document.addEventListener("load",a,!1);else if(window.attachEvent)window.attachEvent("onload",a);else if(typeof window.onload!="function")window.onload=a;else{var d=window.onload;window.onload=function(){d();a()}}}
function createSWF(a,d,f,g){var b,c=!1;try{c=document.createElement("object"),b=document.createElement("param"),b.setAttribute("name","movie"),b.setAttribute("value",a),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","swliveconnect"),b.setAttribute("value","false"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","play"),b.setAttribute("value","true"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","loop"),b.setAttribute("value",
"true"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","menu"),b.setAttribute("value","false"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","quality"),b.setAttribute("value","high"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","wmode"),b.setAttribute("value","transparent"),c.appendChild(b),b=document.createElement("param"),b.setAttribute("name","allowScriptAccess"),b.setAttribute("value","sameDomain"),c.appendChild(b),
g&&(b=document.createElement("param"),b.setAttribute("name","flashvars"),b.setAttribute("value",g),c.appendChild(b)),c.setAttribute("type","application/x-shockwave-flash"),c.setAttribute("data",a),c.setAttribute("width",d),c.setAttribute("height",f)}catch(e){try{if(c)for(;c.hasChildNodes();)c.removeChild(c.lastChild)}catch(h){}c=!1}return c}
function showSWF(a,d,f,g,b){var c=!1,a=getId(a);try{if(a&&(c=createSWF(d,f,g,b))){for(;a.hasChildNodes();)a.removeChild(a.lastChild);a.appendChild(c)}}catch(e){try{if(c){for(;c.hasChildNodes();)c.removeChild(c.lastChild);c.parentNode.removeChild(c)}}catch(h){}c=!1}return c}
function appendIframe(a,d,f,g,b,c){var e,b=b||"auto",c=c||null;if(a=getId(a))try{e=document.createElement("iframe");c&&e.setAttribute("id",c);e.setAttribute("src",d);e.setAttribute("width",f);e.setAttribute("height",g);e.setAttribute("frameborder","0");e.setAttribute("scrolling",b);e.setAttribute("hspace","0");e.setAttribute("vspace","0");e.setAttribute("marginheight","0");e.setAttribute("marginwidth","0");e.style.padding="0px";e.style.marginTop="0px";e.style.marginRight="auto";e.style.marginBottom=
"0px";e.style.marginLeft="auto";e.style.borderWidth="1px";e.style.borderColor="#ccc";for(e.style.borderStyle="solid";a.hasChildNodes();)a.removeChild(a.lastChild);a.appendChild(e)}catch(h){}}function playIntro(){getId("intro")&&showSWF("intro","flash-intro.swf","534","285",null);getId("audio")&&showSWF("audio","swf/player_mp3_maxi.swf","26","20",unescape("mp3=media%2Felectro-syntho.mp3%26loop=1%26autoplay=1%26showstop=0%26showslider=0%26showloading=never%26width=26%26volume=75"))}
function playFlash(){getId("header_image")&&showSWF("header_image","swf/header.swf",712,152,null)}
function videoUpdatePlayer(){var a,d;a=getId("tube");d=getId("video");if(!a||!d)return!1;a=a.value?a.value:"";if(a!==""&&a!==curtube)switch(curtube=a,d=a.substr(0,3),a=a.substr(3),d){case "dm_":showSWF("video","http://www.dailymotion.com/swf/video/"+escape(a)+"?additionalInfos=0%26amp;related=0%26amp;explicit=1%26amp;autoPlay=0%26amp;autoMute=0%26amp;start=0%26amp;enableApi=0%26amp;chromeless=0%26amp;expendVideo=0",480,385,null);break;case "yt_":showSWF("video","http://www.youtube.com/v/"+escape(a)+
"%26amp;hl=fr_FR%26amp;rel=0%26amp;autoplay=0%26amp;loop=0%26amp;enablejsapi=0%26amp;disablekb=0%26amp;egm=0%26amp;fs=0%26amp;hd=0%26amp;showsearch=0%26amp;showinfo=0",480,384,null)}return!1}function initVideo(){if(getId("video")&&getId("tube")){var a=getId("tubeform");if(a)a.onsubmit=function(){videoUpdatePlayer();return!1},videoUpdatePlayer(),a=null}}
function ValideForm(){var a=/[\x00-\x1F\x7F-\x9F]/,d=/^[-+.\w]{1,64}@[-.\w]{2,64}\.[a-zA-Z]{2,6}$/,f;if(cvltId&&nameId&&mailId&&subjId&&messId&&sendId){f=nameId.value?trim(nameId.value):"";if(f==="")return alert("Nom manquant"),nameId.focus(),!1;if(f.length<5)return alert("Nom trop court : 5 caract\u00e8res minimum"),nameId.focus(),!1;if(a.test(f))return alert("Le nom contient un/des caract\u00e8re(s) interdit(s)"),nameId.focus(),!1;f=mailId.value?trim(mailId.value):"";if(f==="")return alert("E-mail manquant"),
mailId.focus(),!1;if(!d.test(f))return alert("L'adresse E-mail n'est pas valide"),mailId.focus(),!1;d=subjId.value?trim(subjId.value):"";if(d==="")return alert("Sujet manquant"),subjId.focus(),!1;if(d.length<5)return alert("Sujet trop court : 5 caract\u00e8res minimum"),subjId.focus(),!1;if(a.test(d))return alert("Le sujet contient un/des caract\u00e8re(s) interdit(s)"),subjId.focus(),!1;a=messId.value?trim(messId.value):"";if(a==="")return alert("Message manquant"),messId.focus(),!1;if(a.length<
5)return alert("Message trop court : 5 caract\u00e8res minimum"),messId.focus(),!1;return!0}return!1}function showChat(){getId("chat")&&appendIframe("chat","http://www.corsica-synthologie.com/chat/","648","700")}function showGuestBook(){getId("livredor")&&appendIframe("livredor","http://www.livre-dor.net/livre.php?livredor=46424","648","756")}
function download(a,d,f){var g,a=getId(a);if(!a)return!1;try{g=document.createElement("a");g.setAttribute("href","http://www.corsica-synthologie.com/"+f);for(g.appendChild(document.createTextNode(d));a.hasChildNodes();)a.removeChild(a.lastChild);a.appendChild(g)}catch(b){}return!1}
var AnnonceHandler=function(){return{init:function(){var a,d,f=getId("ad468x60");if(f)try{a=document.createElement("img");a.src=unescape("http%3A%2F%2Fwww.corsica-synthologie.com%2Fbannieres%2Fsolarys-studio.png");a.width=468;a.height=60;a.alt="Solary's Studio";d=document.createElement("a");d.setAttribute("href",unescape("http%3A%2F%2Fwww.corsica-synthologie.com%2Fsolarys-studio%2Fsolarys-studio.htm"));d.setAttribute("target","_blank");for(d.appendChild(a);f.hasChildNodes();)f.removeChild(f.lastChild);
f.appendChild(d)}catch(g){}var b,c;if(a=getId("facebook"))try{b=document.createElement("img");b.src=unescape("http%3A%2F%2Fwww.corsica-synthologie.com%2Fdeco-ban%2Ffacebook.png");b.width=128;b.height=128;b.alt="Synthologie sur Facebook";c=document.createElement("a");c.setAttribute("href",unescape("http%3A%2F%2Fwww.facebook.com%2Fpages%2FSynthologie%2F63258767076"));c.setAttribute("target","_blank");for(c.appendChild(b);a.hasChildNodes();)a.removeChild(a.lastChild);a.appendChild(c)}catch(e){}return!1}}}();
addLoadListener(function(){playFlash();AnnonceHandler.init()});
