﻿function showBox()
  { 
    var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;

    var layer = document.createElement('div');
    layer.style.zIndex = 2;
    layer.id = 'layer';
    layer.style.position = 'absolute';
    layer.style.top = '0px';
    layer.style.left = '0px';
    layer.style.height = document.documentElement.scrollHeight + 'px';
    layer.style.width = width + 'px';
    layer.style.backgroundColor = 'black';
    layer.style.opacity = '.6';
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
    document.body.appendChild(layer); 
   
    var div = document.createElement('div');
    div.style.zIndex = 3;
    div.id = 'box';
    div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
    div.style.top = '10px';
    div.style.left = (width / 2) - (667 / 2) + 'px'; 
    div.style.height = '530px';
    div.style.width = '667px';
    div.style.backgroundColor = 'white';
    div.style.border = '0px solid silver';
    div.style.padding = '5px';
    
    document.body.appendChild(div); 
   
    var p = document.createElement('p');
    p.innerHTML = '<img src="App_themes/Default/Images/Hunkal_RouteMap2.jpg" title="Route Map" hspace=0 vspace=0 border=0><br><a id="a" href="javascript:void(0)"> <img src="App_themes/Default/Images/closelabel.gif" hspace=0 vspace=5 border=0 title="Click here to close" align="right"></a>';
    
    div.appendChild(p);
   
    //var a = document.createElement('a');
    var a = document.getElementById('a');
    a.href = 'javascript:void(0)';
    a.onclick = function()
    {
      document.body.removeChild(document.getElementById('layer'));
      document.body.removeChild(document.getElementById('box'));
    };
     
    //div.appendChild(a);
  }