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

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...........

i have some code took from net... but it is in jquery..


     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
    <head>
    <base href="http://www.livepage.info/">
    <title>Livepage</title>
    
    <![endif]-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src=".JS/default.js"></script>
    
    
    <script type="text/javascript">
    
    // 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 + "&VToken=da579259b53de3df50d09df49985f69f";
    $.modal('<div id="TVPlayerWindowDIV"><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" ></iframe></div>', {
    
    
    // $(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 > 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 && parseInt($.browser.version, 10)<=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
    
    </script>
    
    <div>
    <a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=1343&CurrentCountryID=63&GcID=63','#PlayerContent','NDTV 24x7');" href="ndtv-24x7/tv-channel/1343" ><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;" ></div></a>
    <h2><a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=1343&CurrentCountryID=63&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.">NDTV 24x7</a></h2>
    <span style="font-size:10px;white-space:normal;color: #999999; line-height: normal">A New Delhi Television in English...</span>
    </div>
    
    
    
    <div>
    <a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=170&CurrentCountryID=63&GcID=63','#PlayerContent','Shalom TV');" href="shalom-tv/tv-channel/170" ><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;" ></div></a>
    <h2><a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=170&CurrentCountryID=63&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.">Shalom TV</a></h2>
    <span style="font-size:10px;white-space:normal;color: #999999; line-height: normal">Religious TV channel of India.</span>
    </div>
    
    </body>
    </html>
how to implement this in javascript without player any suggestion.....????

in javascript i need to do like this...
===

this is the link  `http://www.livepage.info/`  when u click any channel in tha link. a new window opens and when we click outside thewindow it closes..

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...........

i have some code took from net... but it is in jquery..


     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
    <head>
    <base href="http://www.livepage.info/">
    <title>Livepage</title>
    
    <![endif]-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src=".JS/default.js"></script>
    
    
    <script type="text/javascript">
    
    // 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 + "&VToken=da579259b53de3df50d09df49985f69f";
    $.modal('<div id="TVPlayerWindowDIV"><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" ></iframe></div>', {
    
    
    // $(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 > 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 && parseInt($.browser.version, 10)<=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
    
    </script>
    
    <div>
    <a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=1343&CurrentCountryID=63&GcID=63','#PlayerContent','NDTV 24x7');" href="ndtv-24x7/tv-channel/1343" ><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;" ></div></a>
    <h2><a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=1343&CurrentCountryID=63&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.">NDTV 24x7</a></h2>
    <span style="font-size:10px;white-space:normal;color: #999999; line-height: normal">A New Delhi Television in English...</span>
    </div>
    
    
    
    <div>
    <a style="cursor: pointer"  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=170&CurrentCountryID=63&GcID=63','#PlayerContent','Shalom TV');" href="shalom-tv/tv-channel/170" ><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;" ></div></a>
    <h2><a  class="linkSEO" onClick="ModalDLG('#player-modal-content','751','600','ajax.php','Fetch=TV-Player&chID=170&CurrentCountryID=63&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.">Shalom TV</a></h2>
    <span style="font-size:10px;white-space:normal;color: #999999; line-height: normal">Religious TV channel of India.</span>
    </div>
    
    </body>
    </html>
how to implement this in javascript without player any suggestion.....????
