function move_div() {
	var left = getElementLeft("bg")+22;
	var top = getElementTop("bg") + 68 ;
	moveXY("content", left, top);
}

var do_expand;
var do_collapse;
var expand_start_amount = 25;
var expand_start_position = 0;
var expand_width = expand_start_position;
var expand_end_position = 930;
var expand_direction = 0;

function exec_expand() {
	if ( expand_direction == 0 ) {
		expand_direction = 1;
	} else {
		expand_direction = 0;
	}
	window.clearInterval(do_expand);
	do_expand = window.setInterval("expand()", 10);
}

function exec_collapse() {
	if(document.getElementById('wether'))
	{
		document.getElementById('wether').style.visibility= 'hidden';
	}
		window.clearInterval(do_expand);
	window.clearInterval(do_collapse);
	do_collapse = window.setInterval("collapse()", 10);
}

function expand() {
	if ( expand_direction == 1 ) {
		var expand_amount = Math.ceil( (expand_end_position - expand_width) / 0.5 * expand_start_amount / 100 );
		expand_width = expand_width + expand_amount;
		getStyleObject("content").width = expand_width + "px";
		if ( expand_width >= expand_end_position ) {
			window.clearInterval(do_expand);
			getStyleObject("content").width = "930px";
		}
	} else {
		var expand_amount = Math.ceil( (expand_end_position - expand_width) / 0.5 * expand_start_amount / 100 ) + 1;
		expand_width = expand_width - expand_amount;
		getStyleObject("content").width = expand_width + "px";
		if ( expand_width <= 0 ) {
			expand_width = 0;
			getStyleObject("content").width = 0 + "px";
			window.clearInterval(do_expand);
		}
	}
}

function collapse() {
		var expand_amount = Math.ceil( (expand_end_position - expand_width) / 0.5 * expand_start_amount / 100 ) + 1;
		expand_width = expand_width - expand_amount;
		getStyleObject("content").width = expand_width + "px";
		if ( expand_width >= 0 ) {
			expand_width = 0;
			getStyleObject("content").width = 0 + "px";
			window.clearInterval(do_collapse);
		}
}



