var CEvent = {
	_readyCallbacks : false,
	_domReady : function() {	
		if (arguments.callee.done) return;
		arguments.callee.done = true;
		if (CEvent._timer) clearInterval(CEvent._timer);
		for(var i=0 ; i<CEvent._readyCallbacks.length ; i++){ CEvent._readyCallbacks[i](); }
		CEvent._readyCallbacks = null;		
	},
	onReady : function(f) {
		if (!this._readyCallbacks) {		
			var domReady = this._domReady;
			if (domReady.done) return f();
			if (document.addEventListener)
				document.addEventListener("DOMContentLoaded", domReady, false);
			/*@cc_on @*/
			/*@if (@_win32)
			var dummy = location.protocol == "https:" ? "https://javascript:void(0)" : "javascript:void(0)";
			document.write("<script id=__ie_onload defer src='" + dummy + "'><\/script>");
			document.getElementById("__ie_onload").onreadystatechange = function() {
			if (this.readyState == "complete") { domReady(); }
			};
			/*@end @*/
			if (/WebKit/i.test(navigator.userAgent)) {
				this._timer = setInterval(function() {
					if (/loaded|complete/.test(document.readyState)) domReady();
				}, 10);
			}
			if (document.addEventListener) {
				document.addEventListener('load', domReady, false);
			} else if (document.attachEvent) {
				document.attachEvent('onload', domReady);
			}			
			CEvent._readyCallbacks = [];
		}
		CEvent._readyCallbacks.push(f);
	}
}
// CBannerLayerHandler v1.1 // (c) 2007 Carnation
var CBannerLayerHandler = function () {	
	CEvent.onReady( function(){ CBannerLayerHandler.init(); } );	
	function dg(_id){ return document.getElementById(_id); }	
	return {
		init : function() {
			dg('magnum').style.position = 'relative';
			dg('magnum').style.height = '96px';
			dg('magnumhird').style.position = 'absolute';
			dg('magnumhird').style.overflow = 'hidden';
			dg('magnumhird').style.height = '90px';
			dg('magnumhird').style.width = '728px';			
			dg('magnumhird').style.left = '60px';
		},
		resize : function(_id, _width, _height) {
//			document.getElementById(_id).style.clip = 'rect(0px,'+_width+'px,'+_height+'px,0px)';
			dg('magnumhird').style.height = _height+'px';
		}		
	};
}();