function stretchLeftColumn()
{
	if ($('cmsLeft') || $('npShopMenu')){
		var lc = $('cmsLeft') ? $('cmsLeft') : $('npShopMenu');
		lc.style.height = null;
		var innerH;
		var theHeight;
		var b = document.body;
		if (!window.innerWidth){
			//IE
			innerH = b.clientHeight;
			theHeight = b.scrollHeight;
		}else{
			//w3c
			if (document.documentElement){
				b = document.documentElement;
			}
			theHeight = b.scrollHeight;
			innerH = window.innerHeight;
		}
		if (theHeight < innerH){
			theHeight = innerH;
		}
		var reduce_by = parseInt(getStyle($('header'), 'height')) + parseInt(getStyle($('bottom'), 'height')) + parseInt(getStyle(lc, 'padding-bottom'));
		lc.style.height = (theHeight - reduce_by) + 'px';
	}
}

//---TOOLTIPS->>

function attach_tips()
{
	var as = s$$('A');
	for (var i = 0; i < as.length; i++){
		if (hasClass(as[i],'tooltip')){
			var tt = as[i].href.split('#');
			var ttId = tt.pop();
			if (s$(ttId)){
				s$(ttId).style.display = 'none';
				as[i].style.position = 'relative';
				var tip = document.createElement('div');
				tip.style.display = 'none';
				tip.style.position = 'absolute';
				tip.style.zIndex = 99;
				tip.style.top = '0px';
				tip.style.left = (as[i].offsetWidth + 5) + 'px';
				tip.className = 'tooltipdisplay';
				tip.id = ttId + 'display';
				tip.innerHTML = s$(ttId).innerHTML;
				addListener(as[i], 'mouseover', showToolTip, true);
				addListener(as[i], 'mouseout', hideToolTip, true);
				as[i].appendChild(tip);
			}
		}
	}
}

var IE = document.all && !window.opera ? true : false;

function getBody()
{
	return (!window.opera && document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body;
}

function showToolTip(e)
{
	var trigger = getTrigger(e,'a');
	var tt = trigger.href.split('#');
	var ttId = tt.pop() + 'display';
	if (s$(ttId)){
		var x = e.pageX ? e.pageX : (event.clientX ? event.clientX : window.event.x);
		var y = e.pageY ? e.pageY : (event.clientY ? event.clientY : window.event.y);
		var divw = 200; //s$(ttId).offsetWidth;
		var divh = 200; //s$(ttId).offsetHeight;
		var winw = window.innerWidth ? window.innerWidth : getBody().clientWidth;
		var winh = window.innerHeight ? window.innerHeight : getBody().clientHeight;
		var offsetw = getBody().scrollLeft;
		var offseth = getBody().scrollTop;
		var contentw = getBody().scrollWidth;
		var contenth = getBody().scrollHeight;

		if ((x - offsetw + divw) > winw){
			s$(ttId).style.left = null;
			s$(ttId).style.right = (trigger.offsetWidth + 5) + 'px';
		}else{
			s$(ttId).style.right = null;
			s$(ttId).style.left = (trigger.offsetWidth + 5) + 'px';
		}

		if ((y - offseth + divh) > winh){
			s$(ttId).style.top = null;
			s$(ttId).style.bottom = '0px';
		}else{
			s$(ttId).style.bottom = null;
			s$(ttId).style.top = '0px';
		}

		s$(ttId).style.display = '';
	}
}

function hideToolTip(e)
{
	var trigger = getTrigger(e,'a');
	var tt = trigger.href.split('#');
	var ttId = tt.pop() + 'display';
	if (s$(ttId)){
		s$(ttId).style.display = 'none';
	}
}

//<<-TOOLTIPS---
