function ignoreError(sMsg, sUrl, sLine) {
	return true;
};

// window.onerror = ignoreError;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function preloadImages(imgs) {
	var i      = imgs.length - 1;
	window.pre = (window.pre ? window.pre : {});
	
	if(document.images) {
		while(i--) window.pre[imgs[i]] = newImage(imgs[i] + '.gif');
		
		preloadFlag = true;
	};
}

function recenter() {
	var imgW   = 1720;
	var winW   = xWindow.getWidth();
	var offset = -Math.round((imgW - winW) / (imgW < winW ? 20 : 2));
	
	document.getElementById('wrapper').style.width = winW + 'px';
	document.getElementById('container').style.left = offset + 'px';
};

window.onresize = recenter;

function showGuide() {
	var guide = document.getElementById('guide');
};

setIdx = 1;

function popComics() {
	xWindow.openCenter('http://www2.warnerbros.com/batmanbegins/flash/comics/index.html', 'COMICS', 800, 600);
};

// ======================================================================================================
// Hitbox tracking section /
// ======================================================================================================
var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0103u";hbx.gn="ehg-warnerbrothers.hitbox.com";

//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES

hbx.acct="DM550214OLDM;DM55021471CA";//ACCOUNT NUMBER(S)
hbx.pn="home";//PAGE NAME(S)
hbx.mlc="/tw/batmanbegins";//MULTI-LEVEL CONTENT CATEGORY
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY
hbx.dcmpn="nlID";//DYNAMIC CAMPAIGN ID IN QUERY 
hbx.hqsp="linkname";//RESPONSE ATTRIBUTE IN QUERY 

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING
hbx.dlf="n";//DOWNLOAD FILTER
hbx.dft="n";//DOWNLOAD FILE NAMING
hbx.elf="n";//EXIT LINK FILTER

//SEGMENTS AND FUNNELS
hbx.seg="";//VISITOR SEGMENTATION
hbx.fnl="";//FUNNELS

//CAMPAIGNS
hbx.cmp="";//CAMPAIGN ID
hbx.cmpn="";//CAMPAIGN ID IN QUERY
hbx.dcmp="";//DYNAMIC CAMPAIGN ID
hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY
hbx.dcmpe="";//DYNAMIC CAMPAIGN EXPIRATION
hbx.dcmpre="";//DYNAMIC CAMPAIGN RESPONSE EXPIRATION
hbx.hra="";//RESPONSE ATTRIBUTE
hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY
hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY
hbx.hlt="";//LEAD TRACKING
hbx.hla="";//LEAD ATTRIBUTE
hbx.gp="";//CAMPAIGN GOAL
hbx.gpn="";//CAMPAIGN GOAL IN QUERY
hbx.hcn="";//CONVERSION ATTRIBUTE
hbx.hcv="";//CONVERSION VALUE
hbx.cp="null";//LEGACY CAMPAIGN
hbx.cpd="";//CAMPAIGN DOMAIN

//CUSTOM VARIABLES
hbx.ci="";//CUSTOMER ID
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

function track(page) {
	hbx.pn  =  page;
	hbx.mlc += '/' + page;
	document.writeln('<script language="javascript1.1" defer src="http://www2.warnerbros.com/warnervideo/js/hbx.js"></script>');
}
	

