currentHeight: 0;

function WindowHeight()
{
	
	if (typeof(window.innerHeight) == "number") // not ie 
		return window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight) // ie6 standards compliant mode 
		return document.documentElement.clientHeight;
	else if (document.body && document.body.clientHeight) // ie4 compatible 
		return document.body.clientHeight;
}

function DocumentY()
{
	// position y for our document 
	if (typeof(window.pageYOffset) == "number") // netscape 
		return window.pageYOffset;
	else if (document.body && typeof(document.body.scrollTop) == "number") // dom 
		return document.body.scrollTop;
	else if (document.documentElement && typeof(document.documentElement.scrollTop) == "number") // ie6 standards compliant mode 
		return document.documentElement.scrollTop;
}


function refreshHeight()
	{
		newSize("",currentHeight);
	}
	
function dispatchScroll()
	{
		getFlash().onScroll(DocumentY());
	}


function getFlash()
	{
		return document.getElementById("main");
	}

function newSize(datoX,datoY) { 
   currentHeight = datoY;
   getFlash().style.height = (datoY>WindowHeight()) ? datoY+'px': '100%';
}


function get_anchor() {
	window.scrollTo(0, -getScrollTop());	
}



function getScrollTop(){
		var scrollT;
		if (window.pageYOffset){
			scrollT = window.pageYOffset;
		} else if (document.documentElement && document.documentElement.scrollTop){
			scrollT = document.documentElement.scrollTop;
		} else if (document.body){
			scrollT = document.body.scrollTop;
		}
		return scrollT;

}

function setScrollPos(numPosX,numPosY){
		window.scrollTo(numPosX,numPosY);
	}

function get_focus() {
  		window.focus();
	}

function get_history() {
		parent.history.back();
		
	}



