
function hglf_getFrameWidth(){
    if(window.innerWidth)
	return window.innerWidth;
    else if(document.documentElement && document.documentElement.clientWidth)
	return document.documentElement.clientWidth;
    else if(document.body && document.body.clientHeight)
	return document.body.clientHeight;
    else
	return 0;
}
function hglf_getFrameHeight(){
    if(window.innerHeight)
	return window.innerHeight;
    else if(document.documentElement && document.documentElement.clientHeight)
	return document.documentElement.clientHeight;
    else if(document.body && document.body.clientHeight)
	return document.body.clientHeight;
    else
	return 0;
}

function hglf_measureWidth(id){
    var e= document.getElementById(id);
    if(!e) return 0;
    hglf_setStyleProperty(e, 'height', 'auto');
    hglf_setStyleProperty(e, 'width', hglf_getFrameHeight()-180+'px');

    if(isMSIE())
	return e.offsetHeight - 50;
    else
	return e.offsetHeight - 50;

    if(isMSIE()){
	return e.offsetHeight; // ie5
	// return e.style.pixelHeight; // ie4
    }
    else
	return hglf_getStyleProperty(e, 'height').replace(/[^\d\.]/g, '');
    
}

function hglf_setHeight(id, width, height){
    var e= document.getElementById(id);
    if(!e) return ;
    if(width)
	hglf_setStyleProperty(e, 'width', width + 'px');
    if(height=='yes'){
	hglf_setStyleProperty(e, 'height', hglf_getFrameHeight()-150+'px');
    }else if(height){
	hglf_setStyleProperty(e, 'height', hglf_getFrameHeight()+height+'px');
    }
}


