function hideForm(div){var obj=document.getElementById(div);if(obj)obj.style.display="none";obj=document.getElementById("divOmbre");if(obj)obj.style.display="none"}function showImage(src,messageFermeture){if(navigator.appName=='Microsoft Internet Explorer'&&navigator.appVersion<7)return false;var obj=document.getElementById("divImage");if(obj){var image=new Image();image.src=src;var heightMax=calculeHeightMax()-18;var heightImage=image.height;var widthImage=image.width;if(heightImage>heightMax){heightImage=heightMax;widthImage=parseInt((heightImage*image.width)/image.height)}if(widthImage>850){widthImage=850;heightImage=parseInt((widthImage*image.height)/image.width)}var contenu='<div style="cursor:pointer;" onclick="hideForm(\'divImage\');"> <img src="'+src+'" alt="'+messageFermeture+'" title="'+messageFermeture+'" width="'+widthImage+'" height="'+heightImage+'" style="border: 2px solid FFFFFF;" /><br/>'+messageFermeture+'</div>';obj.innerHTML=contenu;obj.style.marginLeft=((document.body.clientWidth-widthImage)/2)+"px";obj.style.marginTop=calculeMarginTop(heightImage)+"px";changerOpac(obj.id,10);obj.style.display="block";var timer=0;for(var i=0;i<=100;i++){setTimeout("changerOpac('"+obj.id+"', '"+i+"')",(timer*5));timer++}obj=document.getElementById("divOmbre");if(obj){obj.style.display="block"}}}function changerOpac(id,taux){var object=document.getElementById(id);object.style.opacity=(taux/100);object.style.filter="alpha(opacity="+taux+")"}function calculeMarginTop(heightImage){var myHeight=0;var margin=0;if(typeof(window.innerHeight)=='number')myHeight=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientHeight))myHeight=document.documentElement.clientHeight;else if(document.body&&(document.body.clientHeight))myHeight=document.body.clientHeight;margin=(myHeight-(heightImage+30))/2;if(margin<10)margin=10;return margin}function calculeHeightMax(){var myHeight=0;if(typeof(window.innerHeight)=='number')myHeight=window.innerHeight;else if(document.documentElement&&(document.documentElement.clientHeight))myHeight=document.documentElement.clientHeight;else if(document.body&&(document.body.clientHeight))myHeight=document.body.clientHeight;return myHeight-30}function sondage(idSondage,nbrTotalVote,zero){changerOpac('moduleSondage'+idSondage,'0');var idChoix=0;if(zero=="false")nbrTotalVote++;var continuer=true;for(var i=1;continuer==true;i++){if(document.getElementById("radioChoix"+i+"_sondage"+idSondage)){document.getElementById("radioChoix"+i+"_sondage"+idSondage).style.visibility="hidden";document.getElementById("tr_resultat_choix"+i+"_sondage"+idSondage).style.visibility="visible";if(document.getElementById("radioChoix"+i+"_sondage"+idSondage).checked){idChoix=i;document.getElementById("voixChoix"+i+"_sondage"+idSondage).innerHTML=parseInt(parseInt(document.getElementById("voixChoix"+i+"_sondage"+idSondage).innerHTML)+1)}document.getElementById("graphChoix"+i+"_sondage"+idSondage).style.width=parseInt((document.getElementById("voixChoix"+i+"_sondage"+idSondage).innerHTML*100)/nbrTotalVote)+"px";document.getElementById("td_radioChoix"+i+"_sondage"+idSondage).innerHTML=''}else continuer=false}document.getElementById("submitEnvoyer_sondage"+idSondage).style.visibility="hidden";var timer=0;for(var i=0;i<=100;i++){setTimeout("changerOpac('moduleSondage"+idSondage+"', '"+i+"')",(timer*5));timer++}enregistrerSondage(idSondage,idChoix);return false}function enregistrerSondage(idSondage,idChoix){document.getElementById("loading").style.visibility="visible";var ajax;if(window.XMLHttpRequest)ajax=new XMLHttpRequest();else if(window.ActiveXObject)ajax=new ActiveXObject("Microsoft.XMLHTTP");if(ajax){ajax.open('POST','ajax/sondageRequest.php',false);ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");ajax.send("idSondage="+idSondage+"&idChoix="+idChoix);if(ajax.readyState==4){setTimeout('afficherProchainSondage("'+escape(ajax.responseText)+'")',4000)}};return false}function afficherProchainSondage(contenu){document.getElementById("loading").style.visibility="hidden";changerOpac('blocSondage','0');document.getElementById('blocSondage').innerHTML=unescape(contenu)+document.getElementById('blocSondage').innerHTML;var timer=0;for(var i=0;i<=100;i++){setTimeout("changerOpac('blocSondage', '"+i+"')",(timer*5));timer++};return false}var arrayLangues=new Array(6);arrayLangues[0]=new Array(6);arrayLangues[0][0]="Entrer svp un Pseudo plus long";arrayLangues[0][1]="Entrer svp un Commentaire plus long";arrayLangues[0][2]="Entrer svp un Commentaire plus court";arrayLangues[0][3]="Merci!";arrayLangues[0][4]="L'adresse de l'expéditeur est incorrect";arrayLangues[0][5]="L'adresse du destinataire est incorrect";arrayLangues[1]=new Array(4);arrayLangues[1][0]="Please give a longer nickname";arrayLangues[1][1]="Please give a longer comment";arrayLangues[1][2]="Please give a shorter comment";arrayLangues[1][3]="Thanks!";arrayLangues[0][4]="The address of the sender is incorrect";arrayLangues[0][5]="The address of the recipient is incorrect";if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1)}if(id){this.setAttribute("id",id)}if(w){this.setAttribute("width",w)}if(h){this.setAttribute("height",h)}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(c){this.addParam("bgcolor",c)}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9)}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true)},setAttribute:function(_e,_f){this.attributes[_e]=_f},getAttribute:function(_10){return this.attributes[_10]},addParam:function(_11,_12){this.params[_11]=_12},getParams:function(){return this.params},addVariable:function(_13,_14){this.variables[_13]=_14},getVariable:function(_15){return this.variables[_15]},getVariables:function(){return this.variables},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key]}return _16},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" "}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\""}_19+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />"}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />"}_19+="</object>"}return _19},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0])}catch(e){axo=null}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(_23.major==6){return _23}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}}return _23};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}if(this.major>fv.major){return true}if(this.minor<fv.minor){return false}if(this.minor>fv.minor){return true}if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function youtube(numMedia,lien){if(document.getElementById('vid'+numMedia))document.getElementById('vid'+numMedia).innerHTML='<object width="640" height="385"><param name="movie" value="'+lien+'&hl=fr_FR&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed src="'+lien+'&hl=fr_FR&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="640" height="385"></embed></object>'}function videointern(numMedia,lien,previewImage){var flashVideo=new SWFObject("interface/flvplayer.swf","ply","550","440","9","FFFFFF");flashVideo.addParam("allowfullscreen","true");flashVideo.addParam("quality","high");flashVideo.addParam("wmode","opaque");flashVideo.addParam("flashvars","file="+lien+"&image="+previewImage);flashVideo.write("vid"+numMedia)}document.onmousemove=getMouseXY;var isIE=false;if(navigator.appName=='Microsoft Internet Explorer')var isIE=true;var mouseX=0;var mouseY=0;function getMouseXY(e){if(overlay){if(!e)e=window.event;if(e){mouseX=isIE?(e.clientX+document.documentElement.scrollLeft):e.pageX;mouseY=isIE?(e.clientY+document.documentElement.scrollTop):e.pageY}overlay.style.marginTop=(mouseY+15)+"px";overlay.style.marginLeft=(mouseX+15)+"px"}}function showOverlay(message){if(overlay){if(navigator.appName=='Microsoft Internet Explorer'&&navigator.appVersion<7)return false;overlay.innerHTML=message.replace("_BR_",'<br/>');overlay.style.display="block";}return false}function hideOverlay(){if(overlay)overlay.style.display="none";return false}var nbCommentairesPrec=0;function commenter(article,lang,nbComsPrec){if(nbCommentairesPrec==0)nbCommentairesPrec=nbComsPrec;var numLg=0;if(lang=='en')numLg=1;document.getElementById("erreurCom").innerHTML='';document.getElementById("boutonSubmit").style.visibility='hidden';var pseudo=escape(document.getElementById("pseudoCom").value);var commentaire=escape(document.getElementById("textCom").value);var pseudoBrut=document.getElementById("pseudoCom").value;var commentaireBrut=document.getElementById("textCom").value;if(pseudo.length<3)document.getElementById("erreurCom").innerHTML=arrayLangues[numLg][0];else if(commentaire.length<10)document.getElementById("erreurCom").innerHTML=arrayLangues[numLg][1];else if(commentaire.length>2000)document.getElementById("erreurCom").innerHTML=arrayLangues[numLg][2];else{pseudo.replace(/&/g,"|amp|");commentaire.replace(/&/g,"|amp|");var ajax;if(window.XMLHttpRequest)ajax=new XMLHttpRequest();else if(window.ActiveXObject)ajax=new ActiveXObject("Microsoft.XMLHTTP");if(ajax){ajax.open('POST','/ajax/commentaireRequest.php',false);ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");ajax.send("idBillet="+article+"&pseudo="+pseudo+'&text='+commentaire);if(ajax.readyState==4){var response=ajax.responseText;var rep=response.split('|||');if(rep[0]=='ok'){if(document.getElementById("affichComs").innerHTML.indexOf('<i>')==-1)document.getElementById("affichComs").innerHTML='<div class="block divCom" style="color:#008A00;"><b>'+pseudoBrut+' :</b><br/>'+commentaireBrut+'</div>'+document.getElementById("affichComs").innerHTML;else document.getElementById("affichComs").innerHTML='<div class="block divCom" style="color:#008A00;"><b>'+pseudoBrut+' :</b><br/>'+commentaireBrut+'</div>';if(nbCommentairesPrec>=4){document.getElementById("redacCom").innerHTML='';document.getElementById("boutonCom").innerHTML='<center><input type="submit" class="submitComs" value="'+arrayLangues[numLg][3]+'" /></center>'}else{document.getElementById("textCom").value='';document.getElementById("boutonSubmit").style.visibility='visible'}nbCommentairesPrec++;return false}else if(rep[0]=='deja'){document.getElementById("boutonCom").innerHTML='<center><input type="submit" class="submitComs" value="'+arrayLangues[numLg][3]+'" /></center>';document.getElementById("redacCom").innerHTML='';alert(rep[1]);return false}else alert(response)}}else alert("Sorry but your browser don't support ajax")}document.getElementById("boutonSubmit").style.visibility='visible';return false}function showFormMail(){obj=document.getElementById("formulaireMail");if(obj){obj.style.marginTop=calculeMarginTop(300)+"px";obj.style.marginLeft=((document.body.clientWidth-220)/2)+"px";obj.style.display="block"}obj=document.getElementById("divOmbre");if(obj)obj.style.display="block";return false}function sendMail(lang){var numLg=0;if(lang=='en')numLg=1;document.getElementById("mailGO").style.visibility="hidden";var reg=new RegExp('^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$','i');var mailTO=escape(document.getElementById("mailTO").value);var mailFROM=escape(document.getElementById("mailFROM").value);var mailMES=escape(document.getElementById("mailMES").value);var urlComplet=escape(document.getElementById("urlComplet").value);if(!reg.test(mailTO)){document.getElementById("mailERROR").innerHTML=arrayLangues[numLg][5]}else if(!reg.test(mailFROM)){document.getElementById("mailERROR").innerHTML=arrayLangues[numLg][4]}else{mailTO.replace(/&/g,"|amp|");mailFROM.replace(/&/g,"|amp|");mailMES.replace(/&/g,"|amp|");document.getElementById("mailERROR").innerHTML='';var ajax;if(window.XMLHttpRequest)ajax=new XMLHttpRequest();else if(window.ActiveXObject)ajax=new ActiveXObject("Microsoft.XMLHTTP");if(ajax){ajax.open('POST','/ajax/mailRequest.php',false);ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");ajax.send("mailTO="+mailTO+"&mailFROM="+mailFROM+'&mailMES='+mailMES+'&urlComplet='+urlComplet);if(ajax.readyState==4){var response=ajax.responseText;var rep=response.split('|||');if(rep[0]=='ok'){alert(rep[1]);document.getElementById("mailTO").value='';hideForm("formulaireMail")}else alert(response)}}else alert("Sorry but your browser don't support ajax")}document.getElementById("mailGO").style.visibility="visible";return false}function moveEtoiles(numero){var i=1;while(i<=numero){document.getElementById("etoile"+i+"TD").className="etoilePleine";i++}while(i<=5){document.getElementById("etoile"+i+"TD").className="etoileVide";i++}}function voteArticle(note,idArticle,lang){var numLg=0;if(lang=='en')numLg=1;var ajax;if(window.XMLHttpRequest)ajax=new XMLHttpRequest();else if(window.ActiveXObject)ajax=new ActiveXObject("Microsoft.XMLHTTP");if(ajax){ajax.open('POST','/ajax/voteArticlesRequest.php',false);ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");ajax.send("note="+note+"&idArticle="+idArticle);if(ajax.readyState==4){var response=ajax.responseText;var rep=response.split('|||');if(rep[0]=='ok'){var i=1;while(i<=rep[1]){document.getElementById("etoile"+i+"TD").className="etoilePleine";document.getElementById("etoile"+i).onmouseover=function(){showOverlay(arrayLangues[numLg][3])};document.getElementById("etoile"+i).onmouseout=function(){hideOverlay()};document.getElementById("etoile"+i).onclick=function(){return false};document.getElementById("etoile"+i).style.cursor="default";i++}while(i<=5){document.getElementById("etoile"+i+"TD").className="etoileVide";document.getElementById("etoile"+i).onmouseover=function(){showOverlay(arrayLangues[numLg][3])};document.getElementById("etoile"+i).onmouseout=function(){hideOverlay()};document.getElementById("etoile"+i).onclick=function(){return false};document.getElementById("etoile"+i).style.cursor="default";i++}}else alert(response)}}else alert("Sorry but your browser don't support ajax");return false}function boutonsSurAccueil(){document.getElementById("fb_like").innerHTML='<div id="fb-root"></div> <fb:like href="http://movie.angusmacgyver.fr" send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like>';document.getElementById("tw_tweet").innerHTML='<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://movie.angusmacgyver.fr" data-count="horizontal" data-lang="fr"></a>';document.getElementById("goo_plus_one").innerHTML='<g:plusone size="medium" href="http://movie.angusmacgyver.fr"></g:plusone>';return false}
