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');
};

var popUp = null;

function popComics() {
	var path = "comics.html";
	_hbPageView('Comics','/aa/batmanbegins');
	if(popUp && popUp.close) popUp.close();
	popUp = xWindow.openCenter(escape(path), 'COMICS', 800, Math.min(600, xScreen.getHeight()));
};

setIdx = 1;
