function changeImage(imageName, newImage) {
	document.images[imageName].src = newImage;
}

function launchtour() {
		popupWidth = 520;
		popupHeight = 395;
		popupLeft = (screen.width - popupWidth) / 2;
		popupTop = (screen.height - popupHeight) / 2;
		var win = window.open('http://tours.ipixmedia.com/mpcgi/vaw.pl?tour=/tours/ADN/JVJ/GF/ADNJVJGF-scene-ther.htm','popup',
		'status=no,toolbar=no,resizable=yes,scrollbars=yes,height='
		 + popupHeight + ',width=' + popupWidth + ', left=' + popupLeft + ',top=' +
		 popupTop);
		 win.focus();
}




function embedFlashOrShowAltContent(doc,movieId,movieSource,movieWidth,movieHeight,minFlashVersion,flashAltSource) {
  if (!embedFlash(doc,movieId,movieSource,movieWidth,movieHeight,minFlashVersion)) {
    if (typeof(flashAltSource) != "undefined" || flashAltSource != null) {
      doc.write(flashAltSource);
    } 
  }
}

function embedFlashOrGotoDownloads(doc,movieId,movieSource,movieWidth,movieHeight,minFlashVersion,returnToPage, redirectWindow) {
 
  if (!embedFlash(doc,movieId,movieSource,movieWidth,movieHeight,minFlashVersion)) {
    
    if ( typeof(returnToPage) == "undefined" || returnToPage == null) {
      returnToPage = "/";
    }
    
    if (typeof(redirectWindow) != "undefined" || redirectWindow != null) {
      location = "/downloads.jhtml?returnToPage=" + returnToPage;
    } else {
      location =  "/downloads.jhtml?returnToPage=" + returnToPage;
    }
  }
  
}


function embedFlash(doc,movieId,movieSource,movieWidth,movieHeight,minFlashVersion) {

  //test for the flash plugin on netscape/opera
  var flashPlugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
  if ( flashPlugin ) {
    //now test against the min version
    flashPlugin = parseInt(flashPlugin.description.substring(flashPlugin.description.indexOf(".")-1)) >= minFlashVersion;
  }
  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)) {
    doc.write('<SCR'+'IPT LANGUAGE=VBScript\> \n');
    doc.write('on error resume next \n');

    doc.write('flash2Installed = false \n');
    doc.write('flash3Installed = false \n');
    doc.write('flash4Installed = false \n');
    doc.write('flash5Installed = false \n');
    doc.write('flash6Installed = false \n');
    
    doc.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
    doc.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
    doc.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
    doc.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
    doc.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');

    doc.write('</SCR'+'IPT\> \n');
    
    for (var i=6;i>=minFlashVersion;i--) {
      flashPlugin = eval("flash" + i + "Installed");
      if (flashPlugin) break;
    }

  }
  
  if ( flashPlugin ) {
    
    var s='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
    s+='  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ';
    s+=' ID=' + movieId + ' WIDTH=' + movieWidth + ' HEIGHT=' + movieHeight + '>';
    s+=' <PARAM NAME=movie VALUE="' + movieSource + '"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#ffffff>  ';
    s+=' <EMBED src="' + movieSource + '" quality=high bgcolor=#ffffff  ';
    s+=' swLiveConnect=FALSE WIDTH=' + movieWidth + ' HEIGHT=' + movieHeight + ' ID=' + movieId;
    s+=' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
    s+=' </EMBED>';
    s+=' </OBJECT>';
    
    doc.write(s);
  
  }
  return flashPlugin;

}

