//(C) bytefx 0.4
bytefx = new function(){

	this.size = function(element, size, speed, callback){
		var	start = bytefx.$size($element(element)),
			tmp = w.opera;
		if(!/msie/i.test(navigator.userAgent) || (tmp && parseInt(tmp.version()) >= 9)){
			if(size.$height)
				start.height -= size.$height;
			if(size.height$)
				size.height -= size.height$;
		};
		if(navigator.userAgent.indexOf("MS") > -1){ // UA に [MS] が含まれている場合
			element.style.overflow = "hidden";
		}
		$setInterval(element, "size", speed / 100, start, size, ["height"], "size$", callback);
	};

	this.$size = function(element){
		return {height:element.offsetHeight};
	};

	this.size$ = function(element, size){
		var	style = element.style;
		style.height = size.height + "px";
	};

	function $callback(element, interval, callback){
		clearInterval(element.bytefx[interval]);
		if(callback)
			callback.call(element);
	};

	function $element(element){
		if(!element.bytefx)
			element.bytefx = {color:0, drag:{}, fade:0, move:0, scroll:0, size:0};
		return element;
	};

	function $end(x, y, speed){
		return x < y ? min(x + speed, y) : max(x - speed, y);
	};

	function $setInterval(element, interval, speed, start, position, style, tmp, callback){
		clearInterval(element.bytefx[interval]);
		element.bytefx[interval] = setInterval(function(){
			start[style[0]] += (position[style[0]] - start[style[0]]) * speed;
			bytefx[tmp](element, start);
			if(round(start[style[0]]) == position[style[0]]){
				bytefx[tmp](element, position);
				$callback(element, interval, callback);
			}
		}, 1);
	};
	
	var	w = window,
		d = document,
		max = Math.max,
		min = Math.min,
		round = Math.round;
};


//Call bytefx
function resizeBox(objH){
	bytefx.size(document.getElementById("intro"), {height:objH}, 12,
	function(){
		getFlashElement('aexternal').TourInit();
	});
}

// SWFオブジェクトの取得
function getFlashElement(id) 
{
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[id] : document[id];
}