$().ready(function() {
	//$(window).bind('resize',function(){redraw();});
	$(window).bind('load',function(){draw2();});
	//redraw();
	draw2();
	
	var flashvars;
	swfobject.embedSWF("/img2/right_s_4asami.swf", "flash", "545", "370", "8","/img2/expressinstall.swf",flashvars,{wmode:"transparent"});
	swfobject.embedSWF("/img2/left2.swf", "flash2", "300", "250", "8","/img2/expressinstall.swf",flashvars,{wmode:"transparent"});
	//swfobject.embedSWF("/images/clock.swf", "clock_new", "130", "50", "8","/img2/expressinstall.swf",flashvars,{wmode:"transparent"});
});

function draw2() {
	var height = parseInt($(document).height()) - 290 + "px";
	$("#cc1").css("height", height);
	$("#cc2").css("height", height);
	$("#cc3").css("height", height);
}

function redraw() {
	var width = parseInt($("html").width());
	
	if (width < 1120 && width > 1016) {
		var w = width - 1120 + "px 0px"
		$("#warp1").css("background-position",w);
		$("#warp-1").css("background-position",w);
		
		var w1 = parseInt($("#flash2").css("left"));
		w = (w1 + width - 1120 ) + "px";
		$("#flash2").css("left",w);
	} else if (width < 1017) {
		var w = 1016 - 1120 + "px 0px"
		$("#warp1").css("background-position",w);
		$("#warp-1").css("background-position",w);
		
		var w1 = parseInt($("#flash2").css("left"));
		w = (w1 + 1016 - 1120 ) + "px";
		$("#flash2").css("left",w);
	} else {
		$("#warp1").css("background-position","left top");
		$("#warp-1").css("background-position","left top");
		$("#flash2").css("left","153px");
	}
	return;
}