//----------------------------------------------------------------------------
// This file consists of reloadApp() function which is accessed by
// viewer.htm,tocHide.htm,textHide.htm
//
// The function is used to redraw the map when the size of the window 
// is changed or when the table of content frame and text frame is shown/hidden
// This file is created by Upendra Dadi on June 06,2007.
//-----------------------------------------------------------------------------


 
 function getaddNS()
  {
  	var addNS = 0;
    var browser = navigator.appName;
    //alert(browser);
    if (browser=="Netscape") 
     {
       addNS = 3;
     }
    return addNS;
  }
 
function reloadApp() 
 {
  //code added on March 23, 2007 by Upendra Dadi	

  var setBackground="";
  for(var i=0;i<parent.MapFrame.OGCNumBackgrounds;i++)
   {
 	  setBackground=setBackground+'parent.MapFrame.document.BackgroundMap'+i+'.width=parent.MapFrame.document.theImage.width;';
 	  setBackground=setBackground+'parent.MapFrame.document.BackgroundMap'+i+'.height=parent.MapFrame.document.theImage.height;';
   }
  //end of addition
  var reloadTimer=0;
  var reloadCode = ' \
  parent.MapFrame.document.theImage.width = parent.MapFrame.getMapWidth(); \
  parent.MapFrame.document.theImage.height = parent.MapFrame.getMapHeight();';
  //code added by Upendra Dadi on March 23,2007
  reloadCode=reloadCode+setBackground;
  //end of addition
  reloadCode=reloadCode+'\
  parent.MapFrame.iWidth = parent.MapFrame.document.theImage.width; \
  parent.MapFrame.iHeight = parent.MapFrame.document.theImage.height; \
  parent.MapFrame.okToSend=true;\
  parent.MapFrame.sendMapXML();';
  window.clearTimeout(reloadTimer);
  reloadTimer = window.setTimeout(reloadCode,1000);
 }


 
 

 