function setHeight()
{
	mainColumn = document.getElementById("main_column");
	mainContent = document.getElementById("main_content");
	leftStuff = document.getElementById("left_stuff");
	copyText = document.getElementById("copytext");
	
	copyMargin = mainColumn.offsetHeight;
	
	winHeight = getHeight();
	logoHeight = 150;
	
	//alert (winHeight);
	//alert ("winHeight=" + winHeight + "; mainContent.offsetHeight=" + mainContent.offsetHeight);

	mainContent.style.height = mainColumn.offsetHeight + "px";
	copyText.style.marginTop =  copyMargin - leftStuff.offsetHeight - 70 + "px";
	
	if (mainContent.offsetHeight + logoHeight < winHeight)
	{	
		// alert ("winHeight=" + winHeight + "; mainContent.offsetHeight=" + mainContent.offsetHeight);
		mainContent.style.height 	= winHeight - logoHeight + "px";
		mainColumn.style.height 	= winHeight - logoHeight + "px";
		copyText.style.marginTop 	= winHeight - logoHeight - leftStuff.offsetHeight - 70 + "px";
	}

}


function getHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
	return myHeight;
}


function getWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
	return myWidth;
}

function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}

function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function init () {
	mainContent = document.getElementById("main_content");
	w = getWidth();
	if (w < mainContent.offsetWidth &&  f_scrollLeft() == 0)
	{
		x = (mainContent.offsetWidth / 2) - (w / 2);
		window.scrollBy(x,0);
	}
	
		setHeight();

}