
function launch_racevn_player()
{  fiveminwin=window.open("http://news.bbc.co.uk/hi/english/static/in_depth/uk/2002/race/video_nation/main.stm","racevnwin","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=520,height=375,left=312,top=184");
}

function getPlatform()
{
   var myUserAgent;

   myUserAgent = navigator.userAgent.toLowerCase();

    if ( (myUserAgent.indexOf("win") != -1)   || 
         (myUserAgent.indexOf("16bit") != -1) 
       )
    {
       return "win";
    }
	
	    if (myUserAgent.indexOf("mac") != -1)
    {
       return "mac";
    }
      
    if (myUserAgent.indexOf("x11") != -1)
    {
       return "unx";
    }
      
    return "other";
}


function getBrowserType()
{
   var myUserAgent;
   var myMajor;

   myUserAgent   = navigator.userAgent.toLowerCase();
   myMajor       = parseInt(navigator.appVersion);

   if( (myUserAgent.indexOf('mozilla')    != -1) && 
       (myUserAgent.indexOf('spoofer')    == -1) && 
       (myUserAgent.indexOf('compatible') == -1) && 
       (myUserAgent.indexOf('opera')      == -1) && 
       (myUserAgent.indexOf('webtv')      == -1)
     )
   {
      if (myMajor > 3)
      {
         return "nav4";
      }
      return "nav";
   }

   if (myUserAgent.indexOf("msie") != -1)
   {
      if (myMajor > 3)
      {
         return "ie4";
      }
      return "ie";
   }

   return "other";
}

function race_videonation()
{
   if (getPlatform() != "other" &&
       (getBrowserType() == "ie4" || getBrowserType() == "nav4")) {
      launch_racevn_player();
   } 
   
   else {
     self.location.href="http://www.bbc.co.uk/videonation";
   }
   return;
}