function flashVersion() {      
      var ua = navigator.userAgent.toLowerCase();
      var isIE = (ua.indexOf(\"msie\") != -1 && ua.indexOf(\"opera\") == -1 && ua.indexOf(\"webtv\") == -1);      
      var version = 0;
      var lastVersion = 10; 
      var i;
      if (isIE) { // browser == IE
            try {
                  for (i = 3; i <= lastVersion; i++) {
                        if (eval('new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash.'+i+'\")')) {
                              version = i;
                        }
                  }
            } catch(e) {}
      } else { // browser != IE
            for (i = 0; i < navigator.plugins.length; i++) {
                  if (navigator.plugins[i].name.indexOf('Flash') > -1) {
                        version = (parseInt(navigator.plugins[i].description.charAt(16)) > version) ? parseInt(navigator.plugins[i].description.charAt(16)) : version;
                  }
            }
      }
      return version;
}

var flashon=flashVersion();
if (flashon==0) { 
noFlash(); 
}
else
{
	flashDetectTimer = setTimeout(detectTimeout, 10000);
	flashResponse()
}

function detectTimeout() {
	if (document.cookie != 'flash=1')
	{
	document.cookie = 'flash=0';
	noFlash();
   }
}

function flashResponse() {
   if (flashDetectTimer) clearTimeout(flashDetectTimer);
   document.cookie = 'flash=1';
}

function noFlash() {
   document.getElementById('flash').style.display = 'none';
   document.getElementById('noflash').style.display = 'block';
}
