$(document).ready(function(){
  $("a.new_window").attr("target", "_blank");
  });
  
function resizer(){
iW = 1920;
iH = 1200;
if(document.all){
	wW = window.document.documentElement.clientWidth;
	wH = window.document.documentElement.clientHeight;
	xscale = wW/iW
	yscale = wH/iH
}
else {
	wW = window.innerWidth;
	wH = window.innerHeight;
	xscale = wW/iW;
	yscale = wH/iH;
}
	fixscale = Math.max(xscale, yscale);
	fixWidth = Math.ceil(iW*fixscale);
	fixHeight = Math.ceil(iH*fixscale);
//	$("bg").width = wW;
//	$("bg").height = wH;
//	$("bgimage").width = fixWidth;
//	$("bgimage").height = fixHeight;
//	$("bgimage").top = (fixHeight-wH)/2 + "px";
//	$("bgimage").left = (wW-fixWidth)/2 + "px";
//	$("bgimage").visibility = "visible";

	document.getElementById("bg").width = wW;
	document.getElementById("bg").height = wH;
	document.getElementById("bgimage").width = fixWidth;
	document.getElementById("bgimage").height = fixHeight;
//	document.getElementById("bgimage").style.left = -(1-xcale)*imagewidth/2;
//	document.getElementById("bgimage").style.top = -(1-ycale)*imagehight/2;
//	alert((fixWidth-wW)/2);
	document.getElementById("bgimage").style.top = (wH -fixHeight)/2 + "px";
	document.getElementById("bgimage").style.left = (wW-fixWidth)/2 + "px";
	document.getElementById("bgimage").style.visibility = "visible";
	
//	document.getElementById("footer").style.bottom = 1 + "px";
}
window.onload = resizer;
window.onresize = resizer;

