// --IMPORTATION DES VARIABLES ------------------------------------------------ // ---------------------------------------------------------------------------- // --INIT------------------ INITIALISATION ------------------------------------ // ne pas considérer le "?" de tête var querystring = document.location.search.substr(1,100000); // découper la chaîne de requête en un tableau de paramètres (les paramètres // sont séparés par un "?" dans la chaîne) var parametres = querystring.split("?"); // traiter tous les paramètres (sous la forme var=valeur) for ( cpt = 0 ; cpt < parametres.length ; cpt++ ) { // séparer le nom de la variable de sa valeur et obtenir un tableau parametres[cpt] = parametres[cpt].split("="); } // <-DEBUT----------------- FONCTION D'ACCES AUX PARAMETRES ------------------- function variable(num) { return parametres[num][0]; } function valeur(num) { return parametres[num][1]; } // --FIN------------------- FONCTION D'ACCES AUX PARAMETRES ------------------> // ---------------------------------------------------------------------------- // --FIN IMPORTATION DES VARIABLES -------------------------------------------- // Détection du type de plateforme function detectMobile() { mobile = false; var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.search("android") > -1 || userAgent.search("iphone") > -1 || userAgent.search("ipad") > -1 || userAgent.search("blackberry") > -1 || userAgent.search("webos") > -1) { mobile = true; } } // Titre de la page (si vide = titre du site par défaut) function titre_page(titre) { if (titre=="") { var titre = "Pingouin WEB site" } document.write(""+titre+"<\/title>"); } // Un message quand on quitte le site function bye() { alert ("Merci de votre visite et à bientôt !"); } // Formate la prochaine url a ouvrir function replace_url(page) { var lurl=""+page+"?pdj="+valeur(0)+"\?"+"tdj="+valeur(1); location.replace(lurl); } // Ouvre le popup de l'image du jour function ouvre_popupdujour(page) { var hh=(screen.height)/1.5; var ll=(screen.width)/2; var leftMargin=(screen.width-ll)/2; var topMargin=(screen.height-hh)/2; window.open(page,"popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=" + ll + ",height=" + hh + ",left=" + leftMargin + ",top=" + topMargin + "\""); } // Agrandit une image function ouvre_image(image,w,h,wo,ho) { document.write("<a href=\"javascript:ouvre_popupimage('/html/ouvre_image.htm','"+image+"','"+wo+"','"+ho+"')\">" +"<img src=\""+image+"\" title=\"Cliquer ici pour agrandir\" border=\"0\" width=\""+w+"\" height=\""+h+"\"></a>"); } // Agrandit une image et affiche un texte libre en passant la souris dessus function ouvre_image2(image,w,h,wo,ho,texte) { document.write("<a href=\"javascript:ouvre_popupimage('/html/ouvre_image.htm','"+image+"','"+wo+"','"+ho+"')\">" +"<img src=\""+image+"\" title=\""+texte+"\" border=\"0\" width=\""+w+"\" height=\""+h+"\"></a>"); } // Ouvre le popup d'une image function ouvre_popupimage(page,image,wo,ho) { var page=""+page+"?img="+image; window.open(page,"popup","menubar=no, status=no, scrollbars=no, width=" + wo + ", height=" + ho); } // Ouvre un popup function ouvre_popup(page) { var hh=(screen.height); var ll=(screen.width); window.open(page,"popup","menubar=no, status=no, scrollbars=no, width=" + ll + ", height=" + hh); } //ouvre la fenetre de help de download function ouvre_helpdld() { //var hh=(screen.height); //var ll=(screen.width); var hh=200; var ll=600; window.open('/html/help_download.html','Help',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Affiche la calculette function ouvre_calculette() { //var hh=(screen.height); //var ll=(screen.width); var hh=330; var ll=400; window.open('/html/calculette.html','Calculette',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Affiche le convertisseur function ouvre_converter() { //var hh=(screen.height); //var ll=(screen.width); var hh=700; var ll=500; window.open('/html/converter.html','Multi Converter',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Affiche le suivi conso function ouvre_suiviconso() { //var hh=(screen.height); //var ll=(screen.width); var hh=300; var ll=300; window.open('/html/calculette.html','Calculette',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Appelle le Trailer function open_trailer(lurl) { document.write("<iframe frameborder=\"0\" width=\"100%\" height=\"44\" scrolling=\"no\" src=\""+lurl+"\"></iframe>"); } // Ouvre création d'un commentaire function ouvre_comment(tag) { // mise à jour de cette fonction suite au défaut d'ouverture du formulaire de saisie dans la(les) dernière(s) version de firefox // (à noter qu'il n'y avait pas de souci d'ouverture de ce formulaire sous Chrome...) var hh=(screen.height); // c'est la taille de la fenêtre précédente var ll=(screen.width); // crée par : affiche_comment(tag); location.replace('/html/comments/comment.htm?tag=' + tag,'Comment',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Affiche commentaire(s) function affiche_comment(tag) { // réduction de la taille de cette fenêtre associée à la refonte de la fonction précédente : ouvre_comment(tag); var hh=(screen.height)*0.80; var ll=(screen.width)/2; window.open('/html/comments/affiche_comments.htm?tag=' + tag,'Affcomment',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } // Affiche l'invitation commentaires function invite_comment(date,tag) { if ( date == "" ) { document.write("<div align=\"right\"><a title=\"Laissez un commentaire\" class=\"urlcomment\" href=\"javascript:affiche_comment('" +tag + "')\"><img align=\"right\" src=\"/images/commentaire.gif\" width=\"44\" height=\"39\" align=\"left\" border=\"0\">" + message_nbc + "</a><a> </a></div>"); } else { document.write("<i>" + date + "</i><div align=\"right\"><a title=\"Laissez un commentaire\" class=\"urlcomment\" href=\"javascript:affiche_comment('" +tag + "')\"><img align=\"right\" src=\"/images/commentaire.gif\" width=\"44\" height=\"39\" align=\"left\" border=\"0\">" + message_nbc + "</a><a> </a></div>"); } } // Ouvre contact function ouvre_contact() { //var hh=(screen.height); //var ll=(screen.width); var hh=400; var ll=600; window.open('/contact/contact.htm','Contact',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + ll + ",height=" + hh + ",titlebar=0"); } function nombre_comment(tag) { // Récupération du nombre de commentaires pour ce topic var xhr_object = null; if(window.XMLHttpRequest) // Firefox xhr_object = new XMLHttpRequest(); else if(window.ActiveXObject) // Internet Explorer xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); else { // XMLHttpRequest non supporté par le navigateur alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); return; } lurl = "/html/comments/counter/" + tag + ".cnt"; // En mode synchrone xhr_object.open("GET", lurl, false); xhr_object.send(null); // En mode asynchrone //xhr_object.open("GET", lurl, true); //xhr_object.onreadystatechange = function anonymous() { // if(xhr_object.readyState == 4) { // message_nbc = xhr_object.responseText + " commentaire(s)"; // // alert(xhr_object.responseText); // } //} var commentTxT = " commentaires"; //alert ( escape(xhr_object.responseText) ); //alert( escape('Here is a string') ); //alert( unescape('Here%20is%20a%20string') ); if ( xhr_object.responseText == "0\n" || xhr_object.responseText == "1\n" || xhr_object.responseText == "0 \n" || xhr_object.responseText == "1 \n") commentTxT = " commentaire"; message_nbc = xhr_object.responseText + commentTxT; xhr_object.send(null); } function montre(id) { // Montre un sous-menu var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} } if (d) {d.style.display='block';} } function SetCookie( name, value, expires, path, domain, secure ) { // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); /* if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24 */ if (expires) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function GetCookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { return null; } if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape( document.cookie.substring( len, end ) ); } function DeleteCookie( name, path, domain ) { if ( GetCookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } function SitesDesAmis() { //document.write("<table width=\"100%\" height=\"60\" cellspacing=\"0\" cellpadding=\"5\" border=\"3\"><tr><td valign=\"middle\" height=\"100%\" align=\"center\"><script>window.onload=montre;</script><div class=\"lientitre\" id=\"menu\"><dl><dt id=\"listedesites\" onmouseover=\"javascript:montre('smenu1');\" onmouseout=\"javascript:montre('');\">Les Sites et les Blogs des Amis</dt><dd id=\"smenu1\" onmouseover=\"javascript:montre('smenu1');\" onmouseout=\"javascript:montre('');\"><ul><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/toto-juju-et-bebe.blogspot.com\">Le Blog de Toto</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/ludijibe.free.fr\">Les p\'tits monstres</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/julievirgile.free.fr\">Le blog de Louise</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/bebefredmag.free.fr\">Justing et Viquetor</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/les-dolys-2003.blogspot.com\">Koid\'9 docteurs ?</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/fredamblard.blogspot.com\">Fredo's blog</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/w3.univ-tlse1.fr\/ceriss\/soc\/perso\/Amblard\">Le site de Fred</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/magali96.free.fr\">Le site de Mag</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/ozlblog.blogspot.com\">Ouste Allez (dommage...)</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/terresetdunes.wordpress.com\">Terres et Dunes</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/www.michel63-roadbooks.fr/\">Les carnets de Michel</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/emilie-en-deplacement.blogspot.com\">Milie en balades</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/bahamut0.blogspot.com\">Oliv's blog</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/jouvecedric.blogspot.com\">Céd's blogito</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/leblogdepolo.blogspot.com\">Le Blog de Polo</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/www.maggy91creations.com\">Le site de Maggy</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/onzenet.com\">Le site de Scott</a></li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/torvalds-family.blogspot.com\">Torvald's family</a></li></ul></dd></dl></div></td></tr></table><table width=\"100%\" height=\"50\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\"><tr><td valign=\"middle\" height=\"100%\" align=\"left\"><a class=\"maxime2\" style=\"font-size:8pt ;\"> + Tous les articles entrés<br>    dans la légende...</a><p></p></td></tr></table>"); document.write("<table width=\"100%\" height=\"60\" cellspacing=\"0\" cellpadding=\"5\" border=\"3\">" + "<tr><td valign=\"middle\" height=\"100%\" align=\"center\"><script>window.onload=montre;</script>" + "<div class=\"lientitre\" id=\"menu\"><dl><dt id=\"listedesites\" onmouseover=\"javascript:montre('smenu1');\" onmouseout=\"javascript:montre('');\">" + "Les Sites et les Blogs des Amis</dt><dd id=\"smenu1\" onmouseover=\"javascript:montre('smenu1');\" onmouseout=\"javascript:montre('');\">" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/toto-juju-et-bebe.blogspot.com\">Le Blog de Toto</a><ul>" + "</li><li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/ludijibe.free.fr\">Les p\'tits monstres</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/julievirgile.free.fr\">Le blog de Louise</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/bebefredmag.free.fr\">Justing et Viquetor</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/les-dolys-2003.blogspot.com\">Koid\'9 docteurs ?</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/fredamblard.blogspot.com\">Fredo's blog</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/w3.univ-tlse1.fr\/ceriss\/soc\/perso\/Amblard\">Le site de Fred</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/magali96.free.fr\">Le site de Mag</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/ozlblog.blogspot.com\">Ouste Allez (dommage...)</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/terresetdunes.wordpress.com\">Terres et Dunes</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/www.michel63-roadbooks.fr/\">Les carnets de Michel</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/emilie-en-deplacement.blogspot.com\">Milie en balades</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/bahamut0.blogspot.com\">Oliv's blog</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/jouvecedric.blogspot.com\">Céd's blogito</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/leblogdepolo.blogspot.com\">Le Blog de Polo</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/www.maggy91creations.com\">Le site de Maggy</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/onzenet.com\">Le site de Scott</a></li>" + "<li><a target=\"_blank\" class=\"lientitre\" href=\"http:\/\/torvalds-family.blogspot.com\">Torvald's family</a></li>" + "</ul></dd></dl></div></td></tr></table><table width=\"100%\" height=\"50\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">" + "</a><br></td></tr></table>"); //"<tr><td valign=\"middle\" height=\"100%\" align=\"center\"><a class=\"maxime2\" style=\"font-size:8pt ;\"> " + //"+ Tous les articles entrés<br>    dans la légende...</a><p></p></td></tr></table>"); //"<hr><b>↓↓</b> Les archives <b>↓↓<hr></b></a><p></p></td></tr></table>"); }