function initColumns()
{
	var _main = document.getElementById('col1');
	var _sidebar = document.getElementById('col2');
	var _w1 = document.getElementById('w1');
	/*
	if(_sidebar && _main){
		if(_sidebar.offsetHeight > _main.offsetHeight-28){
			_main.style.height = _sidebar.offsetHeight-4+'px';
		}else{
			_sidebar.style.height = _main.offsetHeight-28+'px';
		}
	} 
	*/
	if(_sidebar && _main){
		if(_sidebar.offsetHeight > _main.offsetHeight-28){
			_main.style.height = _sidebar.offsetHeight+4+'px';
		}else{
			_sidebar.style.height = _main.offsetHeight+28+'px';
		}
	} 
	if(_w1){
		setInterval(function(){
			var _height = 0;
			if (window.innerHeight) {_height = window.innerHeight;} else {_height = document.documentElement.clientHeight;}
			_w1.style.height = 'auto';
			if(_height > _w1.offsetHeight){
				_w1.style.height = _height+'px';
			}
		}, 300);
	} 
}

/*//find element by tag and class
function findEl(tag,tagClassName,node,eq){
	if (node == null || node=='*') node = document;
	if (tag == null) tag = '*';
	var _tags= new Array();
	var _result = new Array();
	var _cnt = 0;
	_tags = node.getElementsByTagName(tag);
	if ( eq == null ) eq = _tags.length;
	for (var i=0; i<_tags.length; i++){
		if (_tags[i].className.indexOf(tagClassName)!=-1){
			_result[_cnt]=_tags[i];
			if (eq==_cnt) return _result[eq];
			_cnt++;
		}
	}
	return _result.length ? _result : false;
}

function hideFormText(){
	var _sf = findEl('div','search-field');
	
	if (_sf){
		for(var i=0; i<_sf.length; i++) {
			_sf[i].onmouseover = function(){
				if(this.className.indexOf('active')==-1){
				this.className += ' active';
				}
			}
			_sf[i].onmouseout = function(){
				this.className = this.className.replace("active", "");
			};
		}
	}
}*/
if (window.addEventListener)
	window.addEventListener("load", initColumns, false);
else if (window.attachEvent)
	window.attachEvent("onload", initColumns);
