/******************************************************************************
get_unsealer.js
SealedMedia (c) 2005
by Mark Chitty

Usage
=====

Include the two lines of html below in your web page. This will write out a
'Get Unsealer' button image which will launch the Unsealer download assistant
in a pop-up window.

<script language=JavaScript src="path-to-this-file/get_unsealer.js"></script>
<script language=JavaScript>writeUnsealerDownloadLink()</script>

Optionally you can provide a string parameter to the function
writeUnsealerDownloadLink(). The function will then write out a text link
instead of an image link. For example:

<script language=JavaScript src="path-to-this-file/get_unsealer.js"></script>
To access sealed content you should
<script language=JavaScript>
writeUnsealerDownloadLink('download and install the Unsealer');
</script>
now.

will output:

To access sealed content you should <a href="download...">download and install
the Unsealer</a> now.


User Parameters
===============

There are a number of parameters below that allow customization of the pop-up
Download Assistant pages. The comments above each parameter describes the
functionality it controls and the values required to obtain the appropriate
behaviour for your web site. The first parameter, sm_customerId is mandatory.

******************************************************************************/

// * * USER PARAMETERS * *

// MANDATORY: Customer ID – will be provided for you by SealedMedia
var sm_customerId = "ABC";

// Customer support email address - enables end users to contact you in the
// event of any download or installation difficulties
var sm_helpContact = "support@abc.com";

// Unsealer language – specifies the preselected language version
// Current accepted values = de,en,es,fr (German, English, Spanish, French)
var sm_unsealerLanguage = "";

// Display language – specifies the language of the download assistant web
// pages. Current accepted values = en,es,fr
var sm_displayLanguage = "";

// Scenario number – specifies a download scenario for controlling which
// version of the Unsealer is delivered
var sm_scenario = "";

// Download the Enterprise Desktop instead of the Unsealer
var sm_product = "desktop"; // set to "desktop";

// Suppress button display - set these parameters to 1 (one) to suppress the
// display of the Test or Finish buttons
var sm_notest   = "";
var sm_nofinish = "";

// Specify alternative test content. Currently supports:
// spdf: testContent=fish.spdf&testContentW=396&testContentH=360
var sm_testContent = "";

// Use local download button images
var sm_localImages = ""; // set to true if you want to use local image files

// * * END OF USER PARAMETERS - DO NOT CHANGE ANYTHING BELOW HERE * *

//****************************************************************************/

function newWin(strURL) {
  downloadWin = window.open(strURL,"downloadWin","scrollbars,resizable,width=450,height=400");
}

// Writes out Unsealer download link. If strLinkText is not supplied, the function
// writes out get_unsealer.gif image sourced from downloads.sealedmedia.com
function writeUnsealerDownloadLink(strLinkText) {

  var startURL = "http://www.oracle.com/technology/software/products/content-management/index_irm_desktop.html";
  var strLink  = "<a name=\"get_unsealer\" target=\"_blank\" href=\"" + startURL + "\">";

  if (writeUnsealerDownloadLink.arguments.length == 0) {
    var strImgFile = (sm_product != "") ? "images/get_" + sm_product + ".gif" : "images/get_unsealer.gif";
    if (sm_localImages == "") strImgFile = "http://download.sealedmedia.com/" + strImgFile;
    strLinkText = "<img width=\"88\" height=\"31\" border=\"0\" alt=\"Download\" src=\"" + strImgFile + "\">";
  }

  document.write(strLink + strLinkText + "</a>");
}
