in javascript i need to do like this
<p>this is the link  <code>http://www.livepage.info/</code>  when u click any channel in tha link. a new window opens and when we click outside thewindow it closes..</p>

<p>i dont want the player in it and all. just a window needs to be opened and display something and it needs to be closed automatically whe clicked outside...........</p>

<p>i have some code took from net... but it is in jquery..</p>

<pre><code> &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml"&gt;
&lt;head&gt;
&lt;base href="http://www.livepage.info/"&gt;
&lt;title&gt;Livepage&lt;/title&gt;

&lt;![endif]--&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src=".JS/default.js"&gt;&lt;/script&gt;


&lt;script type="text/javascript"&gt;

// Simplemodal
function ModalDLG(ModalDIV,width,height,ajaxURL,ajaxPARAMS,ajaxDIV,titleName){

if( $('div#AdContent').is(':visible') ) {$("div#AdContent").hide();} // Call if iframe
if(titleName) { $(document).attr('title', titleName + ' - Watch Free on Livepage'); }// Add channel name on title



var source = "http://www.livepage.info/" + ajaxURL + "?" + ajaxPARAMS + "&amp;VToken=da579259b53de3df50d09df49985f69f";
$.modal('&lt;div id="TVPlayerWindowDIV"&gt;&lt;iframe id="TVPlayerWindow" name="TVPlayerWindow" src="' +source+ '" style="width: 504px; height: 465px;display:block; overflow:hidden" height="465" width="504" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" &gt;&lt;/iframe&gt;&lt;/div&gt;', {


// $(ModalDIV).modal({ // Call if NO iframe
        overlayClose:true,
        escClose: true,
        opacity:50,
        zIndex:99999,
        autoResize:false,
        containerCss:{backgroundColor:"#fff"},
        minWidth: 504,//width,
        minHeight: 465,//height,
//      onOpen: function (this) {},


        onShow: function (dialog) {

        if (!dialog) dialog = $.modal.impl.d; 

//      if(ajaxURL) AJAXcall(ajaxDIV,ajaxURL,ajaxPARAMS,'post','false'); // Call if NO iframe
        dialog.container.css('padding', '0px');
        dialog.container.css('border', '2px solid #444');
        //dialog.container.css('height', 'auto');
        //dialog.container.css('background-color', '#fff'); 
        $.modal.setPosition();

        },
        onClose: function (dialog) {

$("#TVPlayerWindow").contents().find("#MediaPlayer").remove(); // Call if iframe
$("#TVPlayerWindow").contents().find("div#PlayerWrapper").remove(); // Call if iframe
$("#TVPlayerWindow, div#TVPlayerWindowDIV").remove();
if ( $("#TVPlayerWindow").length &gt; 0 ) {
$("#TVPlayerWindow").remove();
$("div#TVPlayerWindowDIV").remove();
}

        dialog.data.fadeOut('slow', function () {
        dialog.container.slideUp('slow', function () {
            dialog.overlay.fadeOut('slow', function () {
                //$('#MediaPlayer').remove();
//              $('div#PlayerWrapper').remove(); // Call if NO iframe


if( !$('div#WorldTVContent').is(':visible') ) {
    $("div#WorldTVContent").show(); 
    }
if( !$('div#AdContent').is(':visible') ) {
$("div#AdContent").show(); 
}
$(document).attr('title', 'Livepage - Watch TV Channels in India, Free Live Streaming');
$.modal.close(); // must call this!
            });
        });
    });
},

        autoPosition:true });

//      return false;
}

// Horizontal Sliding Tabs 
function Tabs(divID) {      
        $(divID).slideTabs({
            // Options              
            orientation: 'horizontal',
            slideLength: 694, // Width of the div.st_tabs_container element         
            contentAnim: 'slideH',
            contentEasing: 'easeInOutExpo',
            tabsAnimTime: 300,
            contentAnimTime: 500,
            autoHeight: true,
            autoHeightTime: 400
        });                     
    }
////
$(document).ready(function(){ // Start
// Prevent to execute links, show them only for SEO
$(".linkSEO").click(function() { return false; });
// check if IE6
if ( $.browser.msie &amp;&amp; parseInt($.browser.version, 10)&lt;=6) { 
$('#ie6-modal-content').modal({overlayClose:true,opacity:30,zIndex:10000,autoResize:true,containerCss:{backgroundColor:"#fff"},onShow: function (dialog) {if (!dialog) dialog = $.modal.impl.d;         
dialog.container.css('height', 'auto');
$.modal.setPosition();
},autoPosition:true }); }

Tabs('div#st_horizontal');

});

$(document).ready(function(){ // Start

$(".menu_body:eq(0)").show();
$(".menu_body:eq(1)").show();
// Accordion Menu
$("#firstpane dt.menu_head").click(function()
{
$(this).toggleClass("active").next("dd.menu_body").slideToggle(300).siblings("dd.menu_body").slideUp(200);
$(this).siblings().removeClass("active");
});

// });

// $(document).ready(function() {

// Switch Flags
$(".LocationDisplayer").click(function(){$('.LocationDisplayer').toggleClass('UpArrow');$(".LocationFlags").toggle();});
$('.LocationDisplayer, .LocationFlags').click(function(e) {e.stopPropagation();});
$(function(){$(document).click(function(){$('.LocationFlags').hide();
if(!$('div.LocationFlags').is(":visible")) {$('.LocationDisplayer').removeClass('UpArrow');}
});});

//});

$('div#PlayerLoader').center();
// Fade in/out an Advertisement DIV
AdFader();  
$('#q').css('color','#ccc');

});


///////////////////pagination

&lt;/script&gt;

&lt;div&gt;
&lt;a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&amp;chID=1343&amp;CurrentCountryID=63&amp;GcID=63','#PlayerContent','NDTV 24x7');" href="ndtv-24x7/tv-channel/1343" &gt;&lt;div id="TVL_1343" class="loadIMG-loading" style="float:left;width:95px; display:block;height:35px;border: 1px solid #dbe1e6;padding:1px;margin:0 5px 2px 0;clear:both;" &gt;&lt;/div&gt;&lt;/a&gt;
&lt;h2&gt;&lt;a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&amp;chID=1343&amp;CurrentCountryID=63&amp;GcID=63','#PlayerContent','NDTV 24x7');" href="ndtv-24x7/tv-channel/1343"  style="font-size:11px; font-weight:bold; white-space:normal; color:#666666;cursor: pointer" title="Watch NDTV 24x7 Online for Free."&gt;NDTV 24x7&lt;/a&gt;&lt;/h2&gt;
&lt;span style="font-size:10px;white-space:normal;color: #999999; line-height: normal"&gt;A New Delhi Television in English...&lt;/span&gt;
&lt;/div&gt;



&lt;div&gt;
&lt;a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&amp;chID=170&amp;CurrentCountryID=63&amp;GcID=63','#PlayerContent','Shalom TV');" href="shalom-tv/tv-channel/170" &gt;&lt;div id="TVL_170" class="loadIMG-loading" style="float:left;width:95px; display:block;height:35px;border: 1px solid #dbe1e6;padding:1px;margin:0 5px 2px 0;clear:both;" &gt;&lt;/div&gt;&lt;/a&gt;
&lt;h2&gt;&lt;a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&amp;chID=170&amp;CurrentCountryID=63&amp;GcID=63','#PlayerContent','Shalom TV');" href="shalom-tv/tv-channel/170"  style="font-size:11px; font-weight:bold; white-space:normal; color:#666666;cursor: pointer" title="Watch Shalom TV Online for Free."&gt;Shalom TV&lt;/a&gt;&lt;/h2&gt;
&lt;span style="font-size:10px;white-space:normal;color: #999999; line-height: normal"&gt;Religious TV channel of India.&lt;/span&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>how to implement this in javascript without player any suggestion.....????</p>
