// Omniture and site code setup
var ctoMap = "Wall-E";
var cid = "es";

// find deeplink var
var str = unescape(window.location);
var loadingCopy = 'CARGANDO';

// find deeplink var
var deeplinkChrStart = str.indexOf("#") + 1;
var deeplinkChrEnd = str.indexOf("&", deeplinkChrStart);
var deeplinkLen = deeplinkChrEnd == -1 ? str.length - 1 : deeplinkChrEnd - deeplinkChrStart;
var deeplink = str.substr(deeplinkChrStart, deeplinkLen);
if(deeplink == undefined || deeplinkChrStart == 0) var deeplink = "";

//find theme
var themeChrStart = str.indexOf("theme=") + 6;
var themeChrEnd = str.indexOf("&", themeChrStart);
var themeLen = themeChrEnd == -1 ? str.length - 1 : themeChrEnd - themeChrStart;
var theme = str.substr(themeChrStart, themeLen);
if(theme == undefined || themeChrStart == (-1 + 9) ) var deep = "0";

// flash embed code
var flashvars = {
	'deeplink': deeplink,
	'cid': cid,
	'loadingCopy' : loadingCopy,
	'theme' : theme
};
var params = {
	'wmode' : 'opaque',
  	'scale' : 'showall',
	'menu' : 'false',
	'align' : 'middle',
	'quality': 'high',
	'bgcolor': '#ffffff',
	'allowScriptAccess': 'always',
	'allowFullScreen': 'false'
};
var attributes = {};
swfobject.embedSWF("main.swf", "flashcontent", "100%", "800", "9.0.115", "#ffffff", flashvars, params, attributes);

function showDL(param){
	if(param != undefined && param != null && param != " "){
		window.location.hash = param;
	}
	else{
		window.location.hash = "";
	}
}
