// if we don't find IE7, print the extra stylesheet...
if( !checkVersion( ) )
{
	document.write( '<link rel="stylesheet" type="text/css" href="/branding/stylesheets/IE7fix.css" />' );
}



function checkVersion( )
// returns true if IE6 or greater is found...
{
	// get the version number of IE (or -1 if non-IE)
	var ver = getInternetExplorerVersion( );

	if( ver > -1 )
  	{
		// we have a version no - it must be IE...
	  	if ( ver > 6.0 ) 
		{
			// it's greater than 6.0 so it must be IE7...
      		return true;
	 	}
		else
		{
			// it's IE 4.0, 5.0 5.5 or 6.0
			return false;
		}
  	}
	else
	{
		// it's a non-IE browser...
		return false;
	}
}


function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  	var rv = -1; // Return value assumes failure
  	if ( navigator.appName == 'Microsoft Internet Explorer' )
  	{
		// we know it's IE but not what version...
    	var ua = navigator.userAgent;	// get user agent string (this is full of lots of data about browser)
    	var re  = new RegExp( "MSIE ([0-9]{1,}[\.0-9]{0,})" );	// RegEx to detect MSIE followed by a version no.
		// run the reg ex on the user agent string...
    	if ( re.exec( ua ) != null )
		{
			// we found MSIE followed by a version number - extract just the version number...
      		rv = parseFloat( RegExp.$1 );
		}
  	}
	// return the version number if IE found, otherwise -1 to show a non-IE browser...
  	return rv;
}