// javascript:location.reload(true);
// client side page refresh

function showDate()
{   
   var now = new Date(); 
   var yr = now.getYear(); 
   var mName = now.getMonth() + 1; 
   var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate(); 
 
   if(mName==1) Month="January"; 
   if(mName==2) Month="February"; 
   if(mName==3) Month="March"; 
   if(mName==4) Month="April"; 
   if(mName==5) Month="May"; 
   if(mName==6) Month="June"; 
   if(mName==7) Month="July"; 
   if(mName==8) Month="August"; 
   if(mName==9) Month="September"; 
   if(mName==10) Month="October"; 
   if(mName==11) Month="November"; 
   if(mName==12) Month="December"; 

   // String to display current date. 
   var todaysDate =(" " + Month + " " + dayNr + ", " + "" + yr + "<BR>"); 
 
   // Write date to page. 
   document.open(); 
   document.write("<CENTER><FONT FACE=ARIAL COLOR=#333333 SIZE=2>"+todaysDate+"</FONT></CENTER>"); 
}

// script by http://www.intelliwebtools.com 
var urlAddress = "http://www.allaboutthearea.com"; 
var pageName = "All About The Area - The Site To Be Seen"; 
function addToFavorites() { 
if (window.external) { window.external.AddFavorite(urlAddress,pageName)} 
else { alert("Sorry! Your browser doesn't support this feature.");} 
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// hold for now

function MapResizeNew() //resize
    {
        map =  $find("<%=Map1.ClientID%>");
        var vemap = map.get_Map();
        if (vemap != null)
        {    
            if( typeof( window.innerWidth ) == 'number' )
            {
            //Non-IE
            vemap.Resize(window.innerWidth,window.innerHeight);
            } 
            else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
            {
            //IE 6+ in 'standards compliant mode'
            vemap.Resize(document.documentElement.clientWidth,document.documentElement.clientHeight);
            }
        }
    }
    
    function MapResizeOrg() //resize
    {
        map =  $find("<%=Map1.ClientID%>");
        
        var vemap = map.get_Map();
        if (vemap != null)
        {    
            if( typeof( window.innerWidth ) == 'number' )
            {
            //Non-IE
            vemap.Resize(window.innerWidth - 300,450);
            } 
            else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
            {
            //IE 6+ in 'standards compliant mode'
            vemap.Resize(document.documentElement.clientWidth - 300,450);           
            }
        }
    }
       
    
    function MapResizeNotRightNow() //resize
    {
        var clientWidth;
        var clientHeight;
        map =  $find("<%=Map1.ClientID%>");
        var vemap = map.get_Map();
        if (vemap != null)
        {    
            
            switch(Sys.Browser.agent) {
                case Sys.Browser.InternetExplorer:
                    if (document.documentElement && document.documentElement.clientWidth)
                        clientWidth = document.documentElement.clientWidth;
                    else if (document.body)
                        clientWidth = document.body.clientWidth;
                    //clientWidth = document.documentElement.clientWidth;
                    if (document.documentElement && document.documentElement.clientHeight)
                        clientHeight = document.documentElement.clientHeight;
                    else if (document.body)
                        clientHeight = document.body.clientHeight;
                    //clientHeight = document.documentElement.clientHeight;                
                    break;
                case Sys.Browser.Safari:
                    clientWidth = window.innerWidth;
                    clientHeight = window.innerHeight;
                    break;
                case Sys.Browser.Opera:
                    clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
                    clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
                    break;
                default:  // Sys.Browser.Firefox, etc.
                    clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                    clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
                    break;
            }
            
            
            
            
            
            //if( typeof( window.innerWidth ) == 'number' )
            //{
            //Non-IE
            //vemap.Resize(clientWidth,450);
            //} 
           // else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
            //{
            //IE 6+ in 'standards compliant mode'
            vemap.Resize(clientWidth,450);
           // }
        }
    }
// hold for now
