//	This team's JavaScript - Copyright (C) 2009-2011 Charles A Upsdell, All Rights Reserved; www.upsdell.com


//	OnLoad Function
function myOnLoad( nTimeLimit )
{
mySeasonalImage.setMastheadImage();
mySetSpaceImage( 'bak_space' );
myShowCalendarOptions();
myShowNewsPageOptions();
myShowCookiesEnabled();
myShowJavaScriptEnabled();
myShowScreenWidth();
if ( typeof(myReportAnyBrowserUpdate) != 'undefined' )
	myReportAnyBrowserUpdate( '../BrowserNews/', 'ins_BrowserUpdate' );
}


// Function to write code to tell user what the calendar options are
function myShowCalendarOptions ( id )
{
if ( arguments.length < 1 )
	id = 'ins_holydays';
var o = getElement( id );
if ( o )
  {
	if ( (typeof(oOptions.aCookie['CalCultural']) != 'undefined') && (oOptions.aCookie['CalCultural'] == 1) )
		o.innerHTML = '';
	else
		o.innerHTML = '<strong>not</strong> ';
  }
}

// Function to write code to tell user what the calendar options are
function myShowNewsPageOptions ( id )
{
if ( arguments.length < 1 )
	id = 'ins_all_upcoming';
var o = getElement( id );
if ( o )
  {
	if ( (typeof(oOptions.aCookie['CalUpcoming']) != 'undefined') && (oOptions.aCookie['CalUpcoming'] == 1) )
		o.innerHTML = '<strong>not</strong> ';
	else
		o.innerHTML = '';
  }
}

// Function to write code to tell user whether cookies are enabled
function myShowCookiesEnabled ( id )
{
if ( arguments.length < 1 )
	id = 'ins_cookies_enabled';
var o = getElement( id );
if ( o )
  {
	if ( (typeof(oOptions) != 'undefined') && oOptions.aCookie.isEnabled() )
		o.innerHTML = '';
	else
		o.innerHTML = '<strong>not</strong>';
  }
}

// Function to write code to tell user whether JavaScript is enabled
function myShowJavaScriptEnabled ( id )
{
if ( arguments.length < 1 )
	id = 'ins_js_enabled';
var o = getElement( id );
if ( o )
	o.innerHTML = '';
}

// Function to insert screen width
function myShowScreenWidth ( id1, id2 )
{
if ( arguments.length < 1 )
	id1 = 'ins_screen_width';
var o = getElement( id1 );
if ( o )
  {
	var sHTML = '';
	if ( typeof(window.innerWidth) == 'undefined' )
		sHTML += 'undetermined';
	else
		sHTML += '' + window.innerWidth + 'px';
	o.innerHTML = sHTML;
  }
if ( arguments.length < 2 )
	id2 = 'ins_screen_warning';
o = getElement( id2 );
if ( o && isMobileDevice() )
	o.innerHTML = ': your browser either doesn&rsquo;t support CSS 3 media queries, or has media queries disabled, so this site won&rsquo;t work well for you';
}


