var flashinstalled = 0;
var flashversion = 0;
var MSDetect = "false";

if(navigator.plugins && navigator.plugins.length){
 x = navigator.plugins["Shockwave Flash"];
 if(x){
  flashinstalled = 2;
  if (x.description){
  	y = x.description;
   flashversion = y.charAt(y.indexOf('.')-1);
 	}
 }
 else{
  flashinstalled = 1;
 }
 if(navigator.plugins["Shockwave Flash 2.0"]){
  flashinstalled = 2;
  flashversion = 2;
 }
}
else if(navigator.mimeTypes && navigator.mimeTypes.length){
 x = navigator.mimeTypes['application/x-shockwave-flash'];
 if(x && x.enabledPlugin){
 	flashinstalled = 2;
 }
 else{
		flashinstalled = 1;
 }
}
else{
 MSDetect = "true";
 document.write('<script type="text/vbscript"\> \n');
 document.write('on error resume next \n');
 document.write('If MSDetect = "true" Then \n');
 document.write(' 	For i = 2 to 8 \n');
 document.write('   	If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then \n');
 document.write('    Else \n ');
 document.write('	 	  flashinstalled = 2 \n');
 document.write('	    flashversion = i \n');
 document.write('    End If \n ');
 document.write('	 Next \n');
 document.write('End If \n');
 document.write('If flashinstalled = 0 Then \n');
 document.write('	 flashinstalled = 1 \n');
 document.write('End If');
 document.write('</script\> \n');
}


var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var isnetscacpe = (agt.toLowerCase().indexOf("netscape") != -1);

function redirectFlash(url){
	
	if(flashinstalled == 2 && !isnetscacpe && !is_ie5 && !is_ie4 ){
	 if(flashversion < 8){
			location.href=url;
	 }
	}
	else{
			location.href=url;
	}
}


