﻿//window.onload =function(){ window.alert("onloade");}
//window.onload =getBrowser;
window.onload = function(){changeWindowSize();}
window.onresize = function(){changeWindowSize();}



function getBrowser(){
	var strUA = "";
	strUA = navigator.userAgent.toLowerCase();
	if(strUA.indexOf("msie") == -1){
		changeWindowSize();
	}
	// load();
}


function changeWindowSize(){
//	window.alert("changeWindowSize");
	clientSize=getWindowSize();	
//	if(clientSize.width<100){
//		return null;
//	}
	var test1=document;
	var test2=document.getElementById("flash");
	var div_flash=document.all && document.all("flash")|| document.getElementById && document.getElementById("flash");
	if(div_flash){
		var yoko =clientSize.width -50;
		div_flash.style.width=""+yoko+"px";
		div_flash.style.height =""+(yoko*400/780)+"px";
	}else{
		window.alert("not found div_flash");
	}
	return null;
}

function getWindowSize(){
	var result={"width":0,"height":0};
	if (document.documentElement.clientWidth) {
		result.width = document.documentElement.clientWidth;
		result.height= document.documentElement.clientHeight;
	}
	else if (document.all) {
		result.width = document.body.clientWidth;
		result.height= document.body.clientHeight;
	}
	else {
		result.width = window.innerWidth;
		result.height= window.innerHeight;
	}
	
	///window.alert(result.width+","+result.height);
	return result;
}

