function DetectFlashV() {
  var cookiedomain='.tickle.com';
  var flashv = 0;
  // check if we have already detected flash version
  var pos = document.cookie.indexOf('flashv=');
  if (pos != -1) {
    pos+=7;
    flashv = parseInt(document.cookie.substr(pos,1));
  } 
  else {
    // check for netscape plugins. navigator.plugins exists but is empty in IE
    if (navigator.plugins && (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])) {
      var words =
  		navigator.plugins["Shockwave Flash"].description.split(" ");
  		flashv = parseInt(words[2]);
    } 
    else if ((navigator.appVersion.indexOf("MSIE") != -1) && (navigator.appVersion.indexOf("Windows") != -1)) {
      document.writeln('<SCR'+'IPT LANGUAGE=VBScript\>');
    	document.writeln('Private i, x');
      document.writeln('On Error Resume Next');
      document.writeln('MM_FlashControlInstalled = False');
    	document.writeln('For i = 7 To 1 Step -1');
      document.writeln('Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)');
      document.writeln('MM_FlashControlInstalled = IsObject(x)');
      document.writeln('If MM_FlashControlInstalled Then');
     	document.writeln('MM_FlashControlVersion = CStr(i)');
     	document.writeln('Exit For');
      document.writeln('End If');
      document.writeln('Next');
      document.writeln('</SCR'+'IPT\>');
  	  flashv = parseInt(MM_FlashControlVersion);
    } 
  }
  // set flash version into cookie
  if (flashv >= 2) { 
    document.cookie='flashv='+flashv+';path=/;domain='+cookiedomain; 
  }
  else { 
    flashv = 0;
    document.cookie='flashv='+flashv+';path=/;domain='+cookiedomain; 
  }
  return (flashv);
}