// window.onResize = correctDiv();

/**
 * Finds the Y-coordinate of an element
 *
 * @param string id
 * @return int
 */
function findPosY(id) {
	var obj	= document.getElementById(id);

	if(obj){
		var curtop = 0;
		//alert(obj.offsetParent);
		if (obj.offsetParent != 'null') {
	       	while (obj.offsetParent) {
    	      	curtop += obj.offsetTop;
        	  	obj = obj.offsetParent;
        	  	if(obj == null) {
        	  		return curtop;
        	  	}
       		}
		} else if (obj.y) {
			curtop += obj.y;
		}
		return curtop;
	}
}

function correctDiv() {
	var currentHeight	= document.documentElement.clientHeight;
	var markerPos		= findPosY('marker');
	var divHeight		= currentHeight - 285;
	
	document.getElementById('content').style.height = divHeight + 'px';
	document.getElementById('container').style.height = currentHeight + 'px';
	
}
