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();
		
	}

function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) {
			return true;
		}
		if((parseInt(ua.substr(opera+6, 1)) >= 7)){
			return false;
		}
		if((parseInt(ua.substr(opera+6, 1)) < 7)){
			return false;
		}
		
	}
	
}

function notFound(){
		parent.window.location = "/notfound";
		//alert(document.all ? document.body.scrollTop: window.pageYOffset);
	}


