﻿var fHeight = 610;
var fWidth = 990;

function gettSize() {
  var wndw = new Object();
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
	wndw.ie=false;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
	wndw.ie=true;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
	wndw.ie=true;
  }
  
  wndw.w = myWidth;
  wndw.h = myHeight;
  return wndw;
}

function scroll(delta) {
	window.scrollBy(0,(-delta*10));
}

function updateScrollBar(w,h){

	if(w != undefined && w != "undefined"){
		fWidth = w;
	}	
	if(h != undefined && h != "undefined"){
		fHeight = h;
	}


	var wndw = gettSize();
	var fDiv = document.getElementById("flashContainer");

	if(fHeight>wndw.h){
		fDiv.style.height = fHeight;	
	}else{
		fDiv.style.height = "100%";
	}

	if(fWidth>wndw.w){
		fDiv.style.width = fWidth;
	}else{
		fDiv.style.width = "100%";
	}
}


window.onload = onWindowResize;

function onWindowResize() {
  updateScrollBar();
}

window.onresize= onWindowResize;
