
/* Copyright (c) 1999-2010 silvr.net */

// rev3.00
var cssClassName = {
	reg: function(s) { return new RegExp('(^|\\s)'+ s +'(\\s|$)'); },
	add: function(el,s) { el.className += (el.className ? ' ' : '') + s; },
	del: function(el,s) { if (this.has(el,s)) el.className = el.className.replace(this.reg(s), (RegExp.$1&&RegExp.$2)?' ':''); },
	has: function(el,s) { return this.reg(s).test(el.className); },
	incl: function(el,s) { if (!this.has(el,s)) this.add(el,s); },
	excl: function(el,s) { while (this.has(el,s)) this.del(el,s); },
	shift: function(el,s,el2) { if (el) this.del(el,s); if (el2) this.add(el2,s); },
	toggle: function(el,s) { this[ this.has(el,s) ? 'del' : 'add' ](el,s); }
};
// rev1.10
onLoad = (function(){
	var load_events = [], done, old_onload,
		init = function() {
			if (done) return; done = true;
			for (var i=0; i < load_events.length; i++) { load_events[i](); }
		};
	return function(func) {
		if (done) return func();
		if (!load_events[0]) {
			if (document.addEventListener) { document.addEventListener('DOMContentLoaded', init, false); }
			(function() {
				/*@cc_on
				if (document.body) { try { document.createElement('div').doScroll('left'); return init(); } catch(e) {} }
				/*@if (false) @*/
				if (/loaded|complete/.test(document.readyState)) return init();
				/*@end @*/
				if (!done) setTimeout(arguments.callee, 50);
			})();			
			old_onload = window.onload;
			window.onload = function() { init(); if (old_onload) old_onload(); };
		}
		load_events[load_events.length] = func;
	}
})();


if (document.getElementsByTagName && document.getElementsByTagName('html')[0] && document.getElementsByTagName('html')[0].className!='undefined') {
	var jscss = 1;
}

// ie6 bg-image flicker fix
try { document.execCommand('BackgroundImageCache',false,true) } catch(err) {}
