window.onload = function () { myIframe.src = "https://www.hcp.ma/region-rabat/docs/AHImages/JMS%202025%20VF1.jpg"; }; function afficher_Document(doc) { var el = document.getElementById('myIframe'); el.src = doc; return true; } function afficher_DocumentPPTX(doc) { var el = document.getElementById('myIframe'); el.src = "https://view.officeapps.live.com/op/embed.aspx?src=" + encodeURIComponent(doc); return true; } function afficher_DocumentWord(doc) { var el = document.getElementById('myIframe'); // Use Microsoft Office Online viewer el.src = "https://view.officeapps.live.com/op/embed.aspx?src=" + encodeURIComponent(doc); return true; } function afficher_GaleriePhotos() { var iframe = document.getElementById('myIframe'); // var doc = iframe.contentDocument || iframe.contentWindow.document; // Create gallery HTML content var galleryHTML = ` body { font-family: Arial, sans-serif; text-align: center; margin: 20px; background-color: #f8f9fa; } img { width: 150px; height: auto; margin: 10px; border-radius: 8px; cursor: pointer; transition: transform 0.2s; } img:hover { transform: scale(1.05); } /* Modal overlay */ #modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; z-index: 1000; } /* Enlarged image inside modal */ #modal img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 0 25px rgba(0,0,0,0.8); animation: zoomIn 0.3s ease; } @keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } } /* Close button */ #closeBtn { position: fixed; top: 20px; right: 30px; font-size: 30px; color: white; cursor: pointer; font-family: Arial, sans-serif; }
×
const images = document.querySelectorAll('img'); const modal = document.getElementById('modal'); const modalImg = document.getElementById('modalImg'); const closeBtn = document.getElementById('closeBtn'); images.forEach(img => { img.addEventListener('click', () => { // Use the larger image (data-large) modalImg.src = img.getAttribute('data-large') || img.src; modal.style.display = 'flex'; }); }); modal.addEventListener('click', (e) => { if (e.target === modal || e.target === closeBtn) { modal.style.display = 'none'; } }); `; // Write it into the iframe iframe.src = "data:text/html;charset=utf-8," + encodeURIComponent(galleryHTML); // doc.open(); // doc.write(galleryHTML); // doc.close(); return true; } .divHaut { height: 35px; width: 990px; /*margin-top: 5px;*/ margin-bottom: 5px; margin-left: 5px; padding-bottom: 5px; text-align: center; vertical-align: middle; font-family: Calibri; font-size: 30px; font-weight: bold; color: White; background: #014464; background: -moz-linear-gradient(top, #0272a7, #013953); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#0272a7), to(#013953)); border-radius: 10px; } .divHaut:hover { color: #795b86; background: #014464; background: -moz-linear-gradient(top, #EBEBEB, #BFBFBF); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EBEBEB), to(#BFBFBF)); } .divMenu { height: auto; width: 120px; float: left; padding-left: 7px; } /*@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600,300); @charset "UTF-8";*/ /* Base Styles */ cssmenu, #cssmenu ul, #cssmenu li, #cssmenu a { margin: 0; padding: 0; border: 0; list-style: none; font-weight: normal; text-decoration: none; line-height: 1; font-family: 'Open Sans', sans-serif; font-size: 12px; position: relative; } #cssmenu a { line-height: 1.3; } #cssmenu { width: 250px; } #cssmenu>ul>li>a { padding-right: 40px; font-size: 12px; font-weight: bold; display: block; background: #013d59; color: #ffffff; border-bottom: 1px solid #5e071b; text-transform: uppercase; } #cssmenu>ul>li>a>span { background: #026a9c; padding: 10px; display: block; font-size: 11px; font-weight: 300; } #cssmenu>ul>li>a:hover { text-decoration: none; } #cssmenu>ul>li.active { border-bottom: none; } #cssmenu>ul>li.active>a { color: #fff; } #cssmenu>ul>li.active>a span { background: #013d59; } .cssBttActive { height: 100%; width: 100%; display: block; text-decoration: none; text-align: left; color: white; padding: 2px 0; font-family: verdana; font-size: 11px; background-color: #013d59; border: none; } #cssmenu span.cnt { position: absolute; top: 8px; right: 15px; padding: 0; margin: 0; background: none; } /* Sub menu */ #cssmenu ul ul { display: none; } #cssmenu ul ul li { border: 1px solid #e0e0e0; border-top: 0; } #cssmenu ul ul a { padding: 2px; display: block; color: #026a9c; font-size: 11px; } #cssmenu ul ul a:hover { color: #013d59; } #cssmenu ul ul li.odd { background: #f4f4f4; } #divMenu ul ul a:hover { color: #013d59; } #divMenu ul ul li.odd { background: #f4f4f4; } #cssmenu ul ul a:hover { color: #013d59; } #cssmenu ul ul li.odd { background: #f4f4f4; } .divFrame { height: 800px; }