<!--

// -------------------------------------------------------------------------------------------------

// DETECT FLASH Variables

var fc_2 = false;
var fc_3 = false;
var fc_4 = false;
var fc_5 = false;
var fc_6 = false;
var fc_7 = false;

var fc_highestVersion = 0;

// -------------------------------------------------------------------------------------------------

// DETECT FLASH

function detectFlash() { 

	var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

	if(isIE && isWin){
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('fc_2 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
		document.write('fc_3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
		document.write('fc_4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
		document.write('fc_5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
		document.write('fc_6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
		document.write('fc_7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
		document.write('</SCR' + 'IPT\> \n');
	}
	
	if (navigator.plugins) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			fc_2 = flashVersion == 2;
			fc_3 = flashVersion == 3;
			fc_4 = flashVersion == 4;
			fc_5 = flashVersion == 5;
			fc_6 = flashVersion == 6;
			fc_7 = flashVersion >= 7;
		}
	}

	for (var i = 2; i <= 7; i++) { 
		if (eval("fc_" + i) == true) 
			fc_highestVersion = i;
	}
	
}

detectFlash();

// -------------------------------------------------------------------------------------------------

// EMBED FLASH

function embedFlash(i, f, w, h, c, fv) {
	var embedCode_flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"'
	+ 'width="'+w+'" height="'+h+'"'
	+ 'id="'+i+'">'
	+ '<param name="movie" value="'+f+'">'
	+ '<param name="quality" value="high">'
	+ '<param name="menu" value="false">'
	+ '<param name="bgcolor" value="'+c+'">'
	+ '<param name=flashvars value="'+fv+'">'
	+ '<embed src="'+f+'"'
	+ 'menu="false"'
	+ 'quality="high"'
	+ 'bgcolor="'+c+'"'
	+ 'width="'+w+'" height="'+h+'"'
	+ 'name="'+i+'"'
	+ 'type="application/x-shockwave-flash"'
	+ 'flashvars="'+fv+'"'
	+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
	+ '</embed>'
	+ '</object>';
	document.write(embedCode_flash);
}

// -------------------------------------------------------------------------------------------------

// OPEN DOWNLOAD INSTRUCTIONS

function openDownloadIntructions() {
	var newwindown;
	newwindown = window.open('download_instructions.html','download_instructions','width=446,height=358,left=0,top=0,toolbar=no,location=no,scrollbars=no,status=yes,resizable=no,fullscreen=no'); 
	newwindown.focus(); 
}

// -------------------------------------------------------------------------------------------------

// DOWNLOAD FILE

function downloadfile(f) {
	var args = f.split(",");
	var f = args[0];
	var aw = args[1];
	var newwindown;
	newwindown = window.open('downloadfile.aspx?file='+f+'&artwork='+aw,'downloadfile','width=290,height=200,left=0,top=0,toolbar=no,location=no,scrollbars=no,status=yes,resizable=no,fullscreen=no'); 
	newwindown.focus(); 
}

// -------------------------------------------------------------------------------------------------

// -->
