// JavaScript Document
function resizeStage (h)
{
	document.getElementById ('vt_flashcontent').style.height = h;
	getWebsite().height = h;
}
				  
function getWebsite ()
{
	if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
		return document.VYDIO;
	}
	return window.VYDIO;
}

function scrollTabPos (y)
{
	var viewportheight;
	
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerWidth != 'undefined')
	{
		viewportheight = window.innerHeight;
	}
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
	{
		viewportheight = document.documentElement.clientHeight;
	}
	// older versions of IE
	else
	{
		viewportheight  = document.getElementsByTagName('body')[0].clientHeight;
	}
	
	// avoid use scroll to Mac OSX + Firefox, Flash Page refreshing issue
	if (navigator.userAgent.indexOf('Mac') != -1 && navigator.userAgent.indexOf('Firefox') != -1 )
	{
		return;
	}
	
	scrollPageTo (0, y- (viewportheight/2));
}

function scrollPageTo (x, y)
{
	/*if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
		document.body.scrollLeft = x;
		document.body.scrollTop = y;
		return;
	}*/
	window.scroll(x, y);
}
