function getWindowClientSize(){

var result={"width":0,"height":0};

if(window.self&&self.innerWidth){

result.width=self.innerWidth;

result.height=self.innerHeight;

}else if(document.documentElement && document.documentElement.clientHeight){

result.width=document.documentElement.clientWidth;

result.height=document.documentElement.clientHeight;

}else{

result.width=document.body.clientWidth;
result.height=document.body.clientHeight;

}

return result;

}

function ChY(id){

var obj=document.all && document.all(id) || document.getElementById && document.getElementById(id);

if(obj){

clientSize=getWindowClientSize();
obj.style.height=""+(clientSize.height - obj.offsetTop - 115)+"px"; // 20は調整値

}

}

function CenterChY(id){

	var userAgent = window.navigator.userAgent.toLowerCase();
	var appVersion = window.navigator.appVersion.toLowerCase();

	var obj=document.all && document.all(id) || document.getElementById && document.getElementById(id);
	if(obj){
		clientSize=getWindowClientSize();
		
		if (userAgent.indexOf("msie") > -1) {
			if (appVersion.indexOf("msie 6.0") > -1 || appVersion.indexOf("msie 7.0") > -1) {
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 171) + "px"; // 20は調整値
			}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
			}
		}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
		}
	}

}

function Center2lineChY(id){

	var userAgent = window.navigator.userAgent.toLowerCase();
	var appVersion = window.navigator.appVersion.toLowerCase();

	var obj=document.all && document.all(id) || document.getElementById && document.getElementById(id);
	if(obj){
		clientSize=getWindowClientSize();
		
		if (userAgent.indexOf("msie") > -1) {
			if (appVersion.indexOf("msie 6.0") > -1 || appVersion.indexOf("msie 7.0") > -1) {
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 135) + "px"; // 20は調整値
			}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 135) + "px"; // 20は調整値
			}
		}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 135) + "px"; // 20は調整値
		}
	}

}

function leftChY(id){

var obj=document.all && document.all(id)

|| document.getElementById && document.getElementById(id);

if(obj){

clientSize=getWindowClientSize();

obj.style.height=""+(clientSize.height - obj.offsetTop - 173)+"px"; // 20は調整値

}

}

function blogChY(id){
	var userAgent = window.navigator.userAgent.toLowerCase();
	var appVersion = window.navigator.appVersion.toLowerCase();

	var obj=document.all && document.all(id) || document.getElementById && document.getElementById(id);
	if(obj){
		clientSize=getWindowClientSize();
		
		if (userAgent.indexOf("msie") > -1) {
			if (appVersion.indexOf("msie 6.0") > -1 || appVersion.indexOf("msie 7.0") > -1) {
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 171) + "px"; // 20は調整値
			}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
			}
		}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
		}
	}
	
	
}

function galleriaChY(id){
var userAgent = window.navigator.userAgent.toLowerCase();
var appVersion = window.navigator.appVersion.toLowerCase();
var obj = document.all && document.all(id) || document.getElementById && document.getElementById(id);


	if(obj){
		clientSize=getWindowClientSize();
		
		if (userAgent.indexOf("msie") > -1) {
			if (appVersion.indexOf("msie 6.0") > -1 || appVersion.indexOf("msie 7.0") > -1) {
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 211) + "px"; // 20は調整値
			}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
			}
		}else{
				obj.style.height = "" + (clientSize.height - obj.offsetTop - 61) + "px"; // 20は調整値
		}
	
	}

}


