//author:  Matthias Crommelinck v0.2//



/*
function scrollFlash_DoFSCommand(command, args) {
args=unescape(args);

	switch (command) {
		case 'rozmiar':
			//updateScrollBar('flashcontent',1000,600);
			//alert('teraz');
		break;
	}
}
if (navigator.appName && navigator.appName.indexOf("Microsoft")!=-1 && navigator.userAgent.indexOf("Windows")!=-1) {
	document.writeln('<script language=VBScript\>');
	document.writeln('on error resume next');
	document.writeln('sub scrollFlash_FSCommand(ByVal command, ByVal args)');
	document.writeln('call scrollFlash_DoFSCommand(command, args)');
	document.writeln('end sub');
	document.write('</script\> \n');
};
*/




var fWidth=0,fHeight=0,fDiv;

function updateScrollBar(p,w,h)
{
	if(p != undefined)
	{
		fDiv = document.getElementById(p);
	}
	if(w != undefined)
	{
		fWidth = w;
	}	
	if(h != undefined)
	{
		fHeight = h;
	}

	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	
	if(parseInt(fHeight)>myHeight)
	{
		fDiv.style.height = fHeight;	
	}else
	{
		fDiv.style.height = "100%";
	}
	
	if(parseInt(fWidth)>myWidth)
	{
		fDiv.style.width = fWidth;
	}else
	{
		fDiv.style.width = "100%";
	}	
}

function onWindowResize() {
	//updateScrollBar();
	window.onresize= onWindowResize;
	updateScrollBar('flashcontent',950,1340);
}



