
var dec=navigator.userAgent.toLowerCase();
var docObj='document.getElementById("';
var styleObj='").style';
var styleHeight='.height';
var chipHeight='").offsetHeight';
var chipTop='").offsetTop';
var styleTop='.top';
var dhh;

if(window.innerHeight){dhh=window.innerHeight;}
if(document.body.offsetHeight){dhh=document.body.offsetHeight;}


function wrIn(){
	if(dec.indexOf("mac")!=-1 && dec.indexOf("safari")!=-1){
		lay="dh";
		var h=eval(docObj+lay+chipHeight);
		document.write('<div class="inner" id="inner" style="height:'+h+'px;">');
	}
	else{
		document.write('<div class="inner" id="inner">');
	}
}

function setH(bt){
	lay="dh";
	var h1=eval(docObj+lay+chipHeight);
	val1=parseInt(h1);
	lay="im";
	var h2=eval(docObj+lay+chipHeight);
	val2=parseInt(h2);
	lay="cm";
	var h3=eval(docObj+lay+chipHeight);
	val3=parseInt(h3);
	val4=460+52+20;
	if(val1>val2 && val1>val3 && val1>val4){h=0;}
	if(val2>val1 && val2>val3 && val2>val4){h=val2;}
	if(val3>val1 && val3>val2 && val3>val4){h=val3;}
	if(val4>val1 && val4>val2 && val4>val3){h=val4;}
	if(h>0){
		h+=30;
		lay="leftbg";
		eval(docObj+lay+styleObj+styleHeight+'="'+h+'px"');
		lay="main";
		eval(docObj+lay+styleObj+styleHeight+'="'+h+'px"');
	}
	h=dhh;
	if(bt!=2){
		if(h>527){
			h=h-52-15-20;
			lay="pspmc";
			eval(docObj+lay+styleObj+styleTop+'="'+h+'px"');
			if(bt==1){
				lay="bts";
				eval(docObj+lay+styleObj+styleTop+'="'+h+'px"');
			}
		}
	}
}
