var plugin = 0;
var activeX = 0;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 6;
	//plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5; //<-- This would detect version 5+
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('activeX = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	//document.write('activeX = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n'); //<-- This would detect version 5+
	document.write('<' + '/SCRIPT>');
}

function flashbutton(flash, no_flash){
	if ( plugin || activeX ) {
		document.links[0].href = flash;
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.links[0].href = no_flash;
	}
}

function loadwindow(){
  var cur = window.screen;
  var s_width = screen.availWidth;//800;
  var s_height = screen.availHeight;//600;
  var top_x = 0;//(cur.availWidth/2)-(s_width/2);
  var top_y = 0;//(cur.availHeight/2)-(s_height/2);
  if ( plugin || activeX ) {
    window.open("home.html", "HOME", "width="+ s_width +", height="+ s_height +", menubar=no, scrollbars=no, toolbar=no, left="
    + top_x +", top=" + top_y +", screenX=" + top_x +", screenY=" + top_y , "no");
  } else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
  window.open("nohome.html", "HOME", "width="+ s_width +", height="+ s_height +", menubar=no, scrollbars=no, toolbar=no, left="
  + top_x +", top=" + top_y +", screenX=" + top_x +", screenY=" + top_y , "no");
  }
}