/* * @Description: layout javascript * * @Auteur: Neov * * @Creation: 2008-08-13 * * @Modification: - * */ popUpWin = null; $(function(){ $('input[@disabled]').each( function() { $(this).css({background:'white'}); } ); $('select[@disabled]').each( function() { $(this).css({background:'white'}); } ); $(document).pngFix(); $('.clearTextarea').click( function() { $(this).empty(); } ); $('.clearTextarea').blur( function() { if ( $(this).text() == '' ) { var newText = $(this).attr('title'); $(this).text(newText); } } ); /*$('img[@src$=.png]').ifixpng(); $('img[@src$=.png]', 'body').ifixpng();/ /* popup contact */ $("a[@title=Contact]").click( function () { popUpWindow('/index.php/informations/contacts', (screen.width - 900)/2, (screen.height - 430)/2, 900, 430, 'no'); return false; }); $("a[@title=Une question ?]").click( function () { popUpWindow( '/index.php/informations/contacts', (screen.width - 900)/2, (screen.height - 430)/2, 900, 430, 'no'); return false; }); $("a.footer_desinsc").click( function () { if ($("a.footer_desinsc").is(".acces-reserve")){ }else{ popUpWindow( '/index.php/informations/contacts?todo=desinsc' , (screen.width - 900)/2, (screen.height - 430)/2, 900, 430, 'no'); } return false; }); /* popup infos légales */ $("a.infosLegales").click( function () { popUpWindow( '/index.php?module=pages&action=pagesFo:popupMentionsLegales' , (screen.width - 910)/2, (screen.height - 440)/2, 910, 440, 'yes'); return false; }); /* Règlements Quiz */ $("a.reglementQuiz").click( function () { popUpWindow( '/index.php/informations/reglements-quiz' , (screen.width - 910)/2, (screen.height - 440)/2, 910, 440, 'yes'); return false; }); /* popup crédits */ $("a.credits").click( function () { popUpWindow( '/index.php?module=pages&action=pagesFo:popupCredits' , (screen.width - 900)/2, (screen.height - 440)/2, 900, 320, 'no'); return false; }); /* popup données perso */ $("a.dataperso").click( function () { popUpWindow( '/index.php?module=pages&action=pagesFo:popupDonneesPersonnelles' , (screen.width - 900)/2, (screen.height - 410)/2, 900, 400, 'no'); return false; }); var ratpUrl = "http://www.lafabriqueratp.com"; var ratpTitle = "Le fabrique RATP"; $('#footer').find('li.last').find('a').click( function () { if ($.browser.msie) window.external.AddFavorite(ratpUrl, ratpTitle); else if ($.browser.mozilla) { window.sidebar.addPanel(ratpTitle, ratpUrl, ""); } return false; }); }); function popUpWindow(URLStr, left, top, width, height, scrollbars){ if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); } popUpWin = open(URLStr, 'Popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbars+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+''); } function fConfirmInscriptionEvenement(i_EntiteId, z_EntiteType, z_URL){ var oConfirm = confirm ("Etes-vous certain de vouloir vous inscrire à cet événement?"); if ( oConfirm ){ window.location.href = z_URL; } } function fConfirmInscriptionSondage(i_EntiteId, z_EntiteType, z_URL){ var oConfirm = confirm ("Etes-vous certain de vouloir répondre à ce sondage?"); if ( oConfirm ){ window.location.href = z_URL; } } function fConfirmInscriptionTest(i_EntiteId, z_EntiteType, z_URL){ var oConfirm = confirm ("Etes-vous certain de vouloir vous inscrire à ce test?"); if ( oConfirm ){ window.location.href = z_URL; } }