<!--
/*************************************************************
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2006-2009 Adobe Systems Incorporated
 * All Rights Reserved
 *
 * NOTICE: Adobe permits you to use, modify, and distribute
 * this file in accordance with the terms of the Adobe license
 * agreement accompanying it. If you have received this file
 * from a source other than Adobe, then your use, modification,
 * or distribution of it requires the prior written permission
 * of Adobe.
 *
 *************************************************************/

// ********************
//	ade_badge_installer_example.htm
//
//  This file shows a simple "Installer" usage (not launching a file), and also
//  shows use of sendSWFVersion = "true" to reveal the SWF version
//
//  NOTE: This code and the sample code should be used from a web browser for
//  true test of the environment.  Opening the sample HTML files directly from the
//  file system may produce un-desirable results due to the flash security model
//  To ensure good test results, place the sample code all in a single folder then expose
//  that folder as a virtual directory from your favorite web server.
// ********************

//-----------------------------------------------------------------------------
//  Maintenance Log:
//  
//  04/17/2008 the (3) buttonLabel params were removed
//			   buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
//  04/03/2008 Adjust buttonLabel settings to use internal defaults in some cases
//  01/23/2008 Initial Version
//-----------------------------------------------------------------------------

// ********************
// Stub function provided to support operation
// independent of DigitalEditionsDetection.js
// ********************
function ShowADE_DivLayer()
{
	// This example does not use DigitalEditionsDetection.js
	// Therefore this stub is needed
	return;
}

// ********************
// Stub function provided to support operation for SWF Version
// T??????e?????????? ????G?his is called when sendSWFVersion = "true"
// and the script at setG_strSWFVersion() detects a fresh string
// ********************
function ShowSWFVersion_DivLayer()
{
	// We do the version in this example therefore this is needed
	if (G_bUpdateSWFVersion)
	{
		G_bUpdateSWFVersion = false;
		var element = document.getElementById("swfVersionDiv");
	
		if (G_strSWFVersion.length > 0)
		{
			element.innerHTML = "<hr/>Adobe Digital Editions SWF Version:<br/><br/>" + G_strSWFVersion;
			// kick in the pants to be sure to display
			element.style.display = "block";
		}
		else
		{
			element.style.display = "none";
		}
	}
	return;
}

// ********************
// Stub function provided to support send_ADE_SWF_ButtonPush()
// That anchor function will call the stub
// This way, the anchor function is always defined, and various
// implementations can provide the stub where needed
// ********************
function ADE_SWF_ButtonPush_action()
{
	// Copy and enable this function into your
	// implementations where sendButtonPush = "true"
	
	//  NOTE: When sendButtonPush = "true", then even if contentURL is set, it will not
	//  be sent to ADE after it is launched.  When sendButtonPush = "true", all that happens
	//  after ADE is launched is that the JS Callback is made, and that is it.

	// We dont do this, but stub is provided anyway
	return;
}

function doOnLoad()
{
	// Please reference ADEBadgeLauncher.js for full documentation
	
	//  HTML Section params:
	//  =========================
	// HTMLdivID - id of the <div> which will hold the SWF
	// HTMLobjectID - desired ID for the HTML <object> that contains the SWF (may be null - default is ADEBadgeLauncherInstance)
	
	
	// *******************************
	// FOR installerDivLayer1
	// *******************************
	
	//  HTML Section params:
	//  =========================
	var HTMLdivID = "installerDivLayer1"; 
	var HTMLobjectID = "ADEBadgeInstallerInstance1";
	
	//  Flash SWF parameters:
	//  ================??????â??????=========
	var autoInstall = false; 
	var autoLaunch = false;
	var badFlashRedirectURL	= null; // "http://my.domain.com/flashhelp";  // null; // can be null
	
	var sendSWFVersion = false; //Para ocultar la version
	var sendButtonPush = false;  // if true, only call the JS function - contentURL would be ignored if used
	
	ADEBadgeInstallerInstance(HTMLdivID, HTMLobjectID,  autoInstall, autoLaunch, badFlashRedirectURL, sendSWFVersion, sendButtonPush);

	// *******************************
	// THIS SECTION SHOWING THE USE OF THE DEFAULTS
	// *******************************
	
 /**** installerDivLayer2 commented for now ****	
 
	//  HTML Section params:
	//  =========================
	HTMLdivID = "installerDivLayer2"; 
	HTMLobjectID = "ADEBadgeInstallerInstance2";
	
	SetADEBadgeInstallerDefaults(autoInstall, autoLaunch, badFlashRedirectURL, sendSWFVersion, sendButtonPush);
	
	// simpler API
	ADEBadgeInstallerInstanceWithDefs(HTMLdivID, HTMLobjectID);
	
**** installerDivLayer2 commented for now ****/

}

//-->
