
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function visit(newURL) {
  var site = window.open(newURL, 'website','scrollbars=1, resizable=1, location=1, menubar=1, status=1, toolbar=1, height=768, width=1024');
  site.window.focus();
}
function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}
function writeFlash(url,w,h,id,bg,trans) {
	var html = "";
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="' + w + '" height="' + h + '" id="'+ id + '">\n';
	html += '<param name="movie" value="' + url + '" />\n';
	html += '<param name="quality" value="high" />\n';
	html += '<param name="bgcolor" value="' + bg + '" />\n';
	html += '<param name="scale" value="noscale" />\n';
	if (trans == 1) {html += '<param name="wmode" value="transparent" />\n';}
	html += '<!--[if !IE]> <-->\n';
	html += '<object data="' + url + '" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" name="'+ id + '">\n';
	html += '<param name="quality" value="high" />\n';
	html += '<param name="scale" value="noscale" />\n';
	html += '<param name="bgcolor" value="' + bg + '" />\n';
	html += '<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />\n';
	if (trans == 1) {html += '<param name="wmode" value="transparent" />\n';}
	html += ' FAIL (the browser should render some flash content, not this).\n';
	html += ' </object>\n';
	html += '<!--> <![endif]-->\n';
	html += '</object>\n';
	document.write(html);
}

