var FLASH_MAX = 15;
var FLASH_VERSION = 0;
function gv() {
	var agent = navigator.userAgent.toLowerCase();
	if(navigator.plugins != null && navigator.plugins.length > 0){
		var plugin = navigator.plugins['Shockwave Flash'];
		if(typeof plugin == 'object'){
			for(i=3; i<= FLASH_MAX; i++){
				if(plugin.description.indexOf(i+'.') != -1) FLASH_VERSION = i;
			}
		}
	}
    else if(document.all && agent.indexOf('win') != -1 && agent.indexOf('16bit') == -1){
		document.write('<'+'script language="VBScript"'+'> \n');
		document.write('set FlashObj = Nothing \n');
		document.write('on error resume next \n');
		document.write('For i = '+FLASH_MAX+' to 3 step -1 \n');
		document.write('set FlashObj = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n');
		document.write('If (Not(FlashObj is Nothing)) Then \n');
		document.write('FLASH_VERSION = i \n');
		document.write('Exit For \n');
		document.write('End If \n');
		document.write('Next \n');
		document.write('<'+'\/script'+'> \n');
	}
    else if(agent.indexOf('webtv/2.5') != -1) FLASH_VERSION = 3;
	 else if(agent.indexOf('webtv') != -1) FLASH_VERSION = 2;
	 else FLASH_VERSION = -1;
}
