// JavaScript Document

/*
* col1_resize
* Calculate available space to be used by col1.
* It was implemented because when using the width as percentage in CSS, is not really posible to calculate
* the exact width of the column.
* col1Width is the windows size - col2width - vertical scroll bar
* col2Width = 376px (home) or 200px (other pages)
* vertical scroll bar = 26px
*/
function col1_resize()
{
	var winW;
	var col1Width;
	var col1 = document.getElementById('col1');
	if (navigator.appName.indexOf('Microsoft') !=-1) {
		winW = document.body.offsetWidth;
	} else {
		winW = window.innerWidth;
	}
	//col1Width = winW - col2Width - vertical scroll bar
	col1Width = winW-col2Width-26;
	if (col2Width ==0) {
		col1.style.width = '100%';
	} else {
		if (col1Width < 0) {
			col1Width = 0;
		}
		col1.style.width = col1Width+'px';
	}
}

//col1_resize(); //need to call this function on load
window.onresize = function() {
	col1_resize();
}
