function showSpecs(sProdID, sProdName) {
	if (document.getElementById){
		var specContainer = document.getElementById('spec' + sProdID);
		var specContent = document.getElementById('spec_content');
		var prodName = document.getElementById('prod_name');
		
		if (specContainer && specContent && prodName) {
			specContent.innerHTML = specContainer.innerHTML;
			prodName.innerHTML = sProdName;
		}
		else {
			if (specContent) specContent.innerHTML = '';
			if (prodName) prodName.innerHTML = '';
		}
	}
}

var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body

function positionSpecs() { 
	var dsoctop=document.all? iebody.scrollTop : pageYOffset
	var headerOffset = 140;
	
	if (document.all || document.getElementById) {
		var specWrapper = document.getElementById('rt_spec_wrapper');
		var prodWrapper = document.getElementById('lt_prod_wrapper');
		
		var specHeight = specWrapper.offsetHeight //+ headerOffset;
		var prodHeight = prodWrapper.offsetHeight //+ headerOffset;
		
		if (specWrapper) {
			if (dsoctop > headerOffset && specHeight < prodHeight) {
				if (dsoctop - headerOffset + specHeight > prodHeight)
					specWrapper.style.marginTop=(prodHeight - specHeight )+"px";
				else
					specWrapper.style.marginTop=(dsoctop - headerOffset)+"px";
			}
			else
				specWrapper.style.marginTop="0px";
		}
	}
}

setInterval("positionSpecs()",500)

function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;}
function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;}
function posRight() {return posLeft()+pageWidth();} function posBottom() {return posTop()+pageHeight();}

