//Event.observe(window, 'load', browserSize, false);
Event.observe(window, 'load', topicPath, false);
Event.observe(window, 'load', pagetopEffect, false);
Event.observe(window, 'resize', browserSize, false);


function topicPath() {
	topicPathEngine = function() {};
	topicPathEngine.prototype = {
		init: function() {
			this.topicNode = document.getElementById('topic_path');
			if (this.topicNode) {
				this.titleNode = this.topicNode.parentNode.getElementsByTagName('P')[0];
				this.imgNode = this.titleNode.getElementsByTagName('IMG')[0];
				this.imgNodeW = this.imgNode.offsetWidth;
				this.execute();
			}
		},
		execute: function() {
			this.topicNode.style.marginRight = this.imgNodeW + 70 + 'px';
			this.topicNodeW = this.topicNode.offsetWidth;
			this.topicNodeH = this.topicNode.offsetHeight;
			this.topicNodeTop = (40 - this.topicNodeH) / 2;
			this.topicNode.style.marginTop = this.topicNodeTop + 'px';
		}
	};
	var t = new topicPathEngine();
	return t.init();
}


function pagetopEffect() {
	var boxNodes = document.getElementsByClassName('pagetop_box');
	for (var i = 0, len = boxNodes.length; i < len; i++) {
		var btnNode = boxNodes[i].getElementsByTagName('A')[0];
		if (btnNode) {
			btnNode.removeAttribute('href');
			btnNode.onclick = function() {
				new Effect.ScrollTo('pagetop', {duration: 0.3});
			}
		}
	}
}

function scrEffect(obj, id) {
	obj.removeAttribute('href');
	new Effect.ScrollTo(id, {duration: 0.3});
}


function windowOpen(ww,wh,murl) {
	winType = "width=" + ww + ",height=" + wh + ",top=10,left=10,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no" ;
	wo = window.open(murl,'map',winType);
	wo.focus();
}
function windowOpenNoResize(ww,wh,murl) {
	winType = "width=" + ww + ",height=" + wh + ",top=10,left=10,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no" ;
	wo = window.open(murl,'map',winType);
	wo.focus();
}
function openerWin(url) {
	window.opener.location.href = url;
	window.opener.focus();
}


var isIEWin = /*@cc_on function(){if(@_win32||@win_16)return true}()||@*/false;


