// JavaScript Document
function belowFixedHeader(idScrollToName,belowHeader){
	checkIE6(idScrollToName)

	scrollToPlace=document.getElementById(idScrollToName)
	scrollToPlacePosition=getPosition(scrollToPlace)
	headerHeight=document.getElementById(belowHeader)
	document.documentElement.scrollTop ?document.documentElement.scrollTop :document.body.scrollTop 
	window.scrollBy(0,scrollToPlacePosition[1]-document.documentElement.scrollTop-headerHeight.offsetHeight)
}

function getPosition(theElement)
{
	var positionX=0
	var positionY=0
	while (theElement !=null)
	{	
		positionX += theElement.offsetLeft
		positionY += theElement.offsetTop
		theElement = theElement.offsetParent
	}
	return [positionX , positionY];
};

function checkIE6(place){
	var browserVersion=navigator.userAgent
	findIndex=browserVersion.indexOf('MSIE')
	if (findIndex>=0)
	{
		findIndex=findIndex+5
		browserVersion=parseInt(browserVersion.substring(findIndex,findIndex+1));
		if (browserVersion==6){
			location.hash=place;
		}
		else{
			return
		}
	}
}

