<!--

function renderSWF(swfPath,swfName,swfWidth,swfHeight,swfVersion,swfBGcolor,wmode,moreVars,noflashHTML,noflashRedirect){
	if (flashversion >= swfVersion) {
		var strPreviouslyViewed;
		var swfViewedCookie = readCookie(swfName + "Viewed");
		if (swfViewedCookie != null){
			strPreviouslyViewed = swfViewedCookie;
		} else {
			createCookie(swfName + "Viewed",1);
		}
		if(!wmode){ wmode = "Opaque" };
		document.write('<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + swfVersion + ',0,0,0" width="' + swfWidth + '" height="' + swfHeight + '" id="' + swfName + '" align="middle">' +
		'<param name="allowScriptAccess" value="always" />' +
		'<param name="FlashVars" value="imageURL=' + getImageURL() + '&storeURL=' + getStoreURL() + '&contentURL=' + getContentURL() + '&platform=' + platform2 + '&viewed=' + strPreviouslyViewed + moreVars +'">' +
		'<param name="movie" value="' + getImageURL() + swfPath + '" />' +
		'<param name="quality" value="high" />' +
		'<param name="bgcolor" value="' + swfBGcolor + '" />' +
		'<param name="wmode" value="' + wmode + '" />' +
		'<embed src="' + getImageURL() + swfPath + '" FlashVars="imageURL=' + getImageURL() + '&storeURL=' + getStoreURL() + '&contentURL=' + getContentURL() + '&platform=' + platform2 + '&viewed=' + strPreviouslyViewed + moreVars +'" quality="high" wmode="' + wmode + '" bgcolor="' + swfBGcolor + '" width="' + swfWidth + '" height="' + swfHeight + '" name="' + swfName + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
		'</object></div>');
		
		// Handler for javascript commands from from Flash
		window[swfName + "_DoFSCommand"] = function(command, args) {
			var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
			var flashVideoObj = isInternetExplorer ? document.all.shippingFlash : document.shippingFlash;
			var myArray = args.split(",");
			if (command == "cmCreatePageviewTag") {
			  cmCreatePageviewTag(myArray[0], null, myArray[1]); //(linkName,null,catString)
			} else if (command == "cmCreateManualLinkClickTag") {
			  cmCreateManualLinkClickTag(myArray[0],myArray[1]); //(link path,link name)
			} else if (command == "cmCreateConversionEventTag") {
			  cmCreateConversionEventTag(myArray[0],myArray[1],myArray[2],myArray[3]); //(event id, start,event category id,points)
			}
		}
		
		// Hook for Internet Explorer.
		if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
			document.write('<script language=\"VBScript\"\>\n');
			document.write('On Error Resume Next\n');
			document.write('Sub ' + swfName + '_FSCommand(ByVal command, ByVal args)\n');
			document.write('	Call ' + swfName + '_DoFSCommand(command, args)\n');
			document.write('End Sub\n');
			document.write('</script\>\n');
		}
		
	} else {
		if (noflashRedirect){
			window.location = noflashRedirect;
		} else {
			document.write(noflashHTML);
		}
	}
}

function getURLandCMlink(url,arg1,arg2) {
	var myUrlArray = url.split("[-% Store %-]");
	if(myUrlArray[1]) {
		var store = getStoreURL()+myUrlArray[1];
	} else {
		var store = url;
	}
   	
	//alert("url: "+url+" - arg1: "+arg1+" - arg2: "+arg2+" - myUrlArray: "+myUrlArray);
	if(url.indexOf('?') != -1) {
		//alert('yes ?');
		cmCreateManualLinkClickTag(store+"&origin="+arg1,arg2);
		window.open(store+"&origin="+arg1,"_self");
	} else {
		//alert('no ?');
		cmCreateManualLinkClickTag(store+"?origin="+arg1,arg2);
		window.open(store+"?origin="+arg1,"_self");
	}
}
// -->