<style>
body {
    font-family: "Nirmala UI", "Mangal", Arial, sans-serif;
}

/* Overlay */
.iip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,70,70,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Modal */
.iip-modal {
    background: #fff;
    width: 600px;
    max-width: 90%;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.iip-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    margin: 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.hindi { background: green; color:#fff; }
.english { background: blue; color:#fff; }
</style>

<!-- Popup -->
<div id="iipPopup" class="iip-overlay">
    <div class="iip-modal">
        <span class="iip-close" onclick="closePopup()"><strong><h3>×</h3></strong></span>
<!-- Logo -->
        <div class="iip-logo">
            <img src="emblem.png" alt="IIP Logo">
        </div>

        <!-- Hindi Title -->
        <h2 class="iip-hindi-title">
	    सीएसआईआर–भारतीय पेट्रोलियम संस्थान
	</h2>

        <!-- English Title -->
        <h1 class="iip-eng-title">
            CSIR–Indian Institute of Petroleum
        </h1>

        <!-- Ministry -->
        <p class="iip-ministry-hindi">विज्ञान एवं प्रौद्योगिकी मंत्रालय</p>
        <p class="iip-ministry-eng">Ministry of Science & Technology</p>

        <!-- Welcome -->
        <p class="iip-welcome-hindi">आईआईपी में आपका स्वागत है।</p>
        <p class="iip-welcome-eng">Welcome to IIP</p>

        <!-- Instruction -->
        <p class="iip-instruction">
           <strong> वेबसाइट में प्रवेश करने के लिए अपनी पसंदीदा भाषा चुनें।<br>
            Select your Preferred Language to Enter the Website</strong>
        </p>
        <button class="btn hindi" onclick="selectLang('hi')">हिंदी</button>
        <button class="btn english" onclick="selectLang('en')">English</button>
    </div>
</div>
<script>
function closePopup() {
    document.getElementById("iipPopup").style.display = "none";
}

function selectLang(lang) {

    // Save for current browser session only
    sessionStorage.setItem("iip_lang_selected", lang);

    // Hide popup
    closePopup();

    // Redirect
    setTimeout(function () {

        if (lang === 'hi') {
            window.location.href = "https://www.iip.res.in/?lang=hi";
        }

        if (lang === 'en') {
            window.location.href = "https://www.iip.res.in/?lang=en";
        }

    }, 200);
}

window.onload = function () {

    var popup = document.getElementById("iipPopup");

    // Check session value
    var selectedLang = sessionStorage.getItem("iip_lang_selected");

    // Show popup only once per browser tab/session
    if (!selectedLang && popup) {
        popup.style.display = "flex";
    }
}
</script>
<?xml version="1.0"?>
<oembed><version>1.0</version><provider_name>Sophisticated Instrumentation Facilities</provider_name><provider_url>https://www.iip.res.in/sophisticated-instrumentation-facilities/hi</provider_url><author_name>ernetweb</author_name><author_url>https://www.iip.res.in/sophisticated-instrumentation-facilities/hi/author/ernetweb/</author_url><title>MTS</title><type>rich</type><width>600</width><height>338</height><html>&lt;blockquote class="wp-embedded-content"&gt;&lt;a href="https://www.iip.res.in/sophisticated-instrumentation-facilities/hi/mts/"&gt;MTS&lt;/a&gt;&lt;/blockquote&gt;
&lt;script type='text/javascript'&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
		!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c&lt;i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d)if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e&lt;k.length;e++)k[e].style.display="none";for(e=0;e&lt;j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g&gt;1e3)g=1e3;else if(~~g&lt;200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
//--&gt;&lt;!]]&gt;
&lt;/script&gt;&lt;iframe sandbox="allow-scripts" security="restricted" src="https://www.iip.res.in/sophisticated-instrumentation-facilities/hi/mts/embed/" width="600" height="338" title="&#x201C;MTS&#x201D; &#x2014; Sophisticated Instrumentation Facilities" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"&gt;&lt;/iframe&gt;</html></oembed>
