/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/

//document.body.clientHeight

// pod Netscape:
/*
function setFlashHeight(newH){
	if (window.innerHeight > newH){
		document.getElementById("flash_cont").style.height = '100%';
	}else{
		document.getElementById("flash_cont").style.height = newH+"px";
	}		
}*/
function setFlashHeight(newH){
	document.getElementById("flash_cont").style.height = newH+"px";
	document.getElementById("css_menu").style.height = newH+"px";
	/*if (document.body.clientHeight > newH){
		document.getElementById("flash_cont").style.height = '100%';
	}else{
		document.getElementById("flash_cont").style.height = newH+"px";
	}*/		
}


function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
// scroll over flash
function getScrollXY (){
	var scrOfX = 0, scrOfY = 0;
	if (typeof (window.pageYOffset) == 'number'){
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	}
	else if (document.body && (document.body.scrollLeft || document.body.scrollTop)){
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	}
	else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}
	return [scrOfX, scrOfY];
}
//
function scrollDiv(delta){
	window.scroll(getScrollXY()[0], getScrollXY()[1] +  (0 - delta * 8));
}

