function move_left(what, what2, where) {

	var tmp;
	var move_by = 4;
	var move_interval = 50;

	tmp = what.style.left;						//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (tmp < where) {

		tmp = tmp * 1 + move_by;
		what.style.left = tmp + "px";
		if (tmp >= where - move_by) {
			what.style.left = where + "px";
			return 0;}
	} else {
	
		tmp = tmp * 1 - move_by;
		what.style.left = tmp + "px";
		if (tmp <= where + move_by) {
			what.style.left = where + "px";
			return 0;}
	}
	tmp = "move_left(" + what2 + ",'" + what2 + "'," + where + ")";
	setTimeout(tmp, move_interval);
}	


function move_top(what, what2, where) {

	var tmp;
	var move_by = 4;
	var move_interval = 50;

	tmp = what.style.top;						//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (tmp < where) {

		tmp = tmp * 1 + move_by;
		what.style.top = tmp + "px";
		if (tmp >= where - move_by) {
			what.style.top = where + "px";
			return 0;}
	} else {
	
		tmp = tmp * 1 - move_by;
		what.style.top = tmp + "px";
		if (tmp <= where + move_by) {
			what.style.top = where + "px";
			return 0;}
	}
	tmp = "move_top(" + what2 + ",'" + what2 + "'," + where + ")";
	setTimeout(tmp, move_interval);
}	

//move_left(layer0, 'layer0', 100);
//move_top(layer0, 'layer0', 500);

function move_left_side() {

	var tmp;
	tmp = l.style.left;							//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (tmp == -139) move_left(l, 'l', -165);
	else move_left(l, 'l', -139);
}

function move_right_side() {

	var tmp;
	tmp = r.style.left;							//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (tmp == 60) move_left(r, 'r', 137);
	else move_left(r, 'r', 60);
}

function move_top_side() {

	var tmp;
	tmp = t.style.top;							//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (tmp == -98) move_top(t, 't', -120);
	else move_top(t, 't', -98);
}


this.document.frm_games.Lst.style.visibility = 'hidden'; //default=hidden

function move_bottom_side() {

	return; //=BUG

	var tmp;
	tmp = b2.style.top;							//ex. 105px
	tmp = tmp.substring(0, tmp.indexOf("px"));  //ex. 105

	if (this.document.frm_games.Lst.style.visibility == 'visible')	{
		this.document.frm_games.Lst.style.visibility = 'hidden';
	} else {
		this.document.frm_games.Lst.style.visibility = 'visible';
	}

	if (tmp == 63) move_top(b2, 'b2', 100);
	else move_top(b2, 'b2', 63);
}


function move_all_side() {

	setTimeout("move_left_side();", 2000);
	setTimeout("move_top_side();", 2800);
	setTimeout("move_right_side();", 3700);
	setTimeout("move_bottom_side();", 5700);

	setTimeout("move_left_side();", 7700);
	setTimeout("move_top_side();", 7700);
}
