// getBrowserWidth() by Cameron Adams   
// http://www.themaninblue.com/experiment/ResolutionLayout/   

function getBrowserWidth ( ) {   
    if ( window.innerWidth ) { return window.innerWidth; }   
    else if ( document.documentElement && document.documentElement.clientWidth != 0 ) { return document.documentElement.clientWidth; }   
    else if ( document.body ) { return document.body.clientWidth; }   
    return 0;   
}  

function setLayout(){
	var windowWidth = getBrowserWidth();
	var layerWidth = 784;
	var diff = (windowWidth - layerWidth)/2;
	if(diff <= 0) diff=0;
	var menu = document.getElementById('menu');
	menu.style.left= diff + 'px';
	
	diff = diff + 196;
	var wrapper = document.getElementById('container');
	wrapper.style.top=0;
	wrapper.style.left= diff+'px';
	wrapper.style.marginLeft = 0;
}

function popup(idName){
	document.getElementById('concept_map').src="./img/concept_"+idName+".gif";
	var div = document.getElementById("popup_"+idName);
	div.style.display="block";
}

function popdown(idName){
	var div = document.getElementById("popup_"+idName);
	div.style.display="none";
	document.getElementById('concept_map').src="./img/concept.gif";
}

function popup_en(idName){
	document.getElementById('concept_map').src="./img/concept_on_en.gif";
	var div = document.getElementById(idName);
	div.style.display="block";
}

function popdown_en(idName){
	var div = document.getElementById(idName);
	div.style.display="none";
	document.getElementById('concept_map').src="./img/concept_en.gif";
}

function showPic(str){
	var imgSrc = './img/' + str + '02.jpg';
	document.getElementById('office_pic').src= imgSrc;	
}

function loadMovie(){
	swfobject.embedSWF('./movie/flvplayer.swf', 'yuras_movie', '532', '186', '7.0.0', './movie/expressInstall.swf');
}

function reloadMovie(){
	var nowPt =location.hash;
	if(nowPt = '#services') loadMovie();
}