/**
 * @author Grzesiu MF (2009)
 */

var subMenu = document.getElementById('resized_flash');
var place=new Array();
place[1]="-78px";
place[0]="-68px";

var max = 1; 
gm_sizerek();
  
window.onresize = function alertSize(){
	gm_sizerek();
	
  
}

function gm_sizerek(){
	
	
	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 (myWidth < 1100 && max!=0) {
  	//window.alert('Width = ' + myWidth);
	max = 0;
	
	sub_Flash(940,498,0);
	} else if(myWidth >= 1100 && max!=1){
		max = 1;
		
		sub_Flash(1112,582,1);
	}
	
	
}

function sub_Flash(w,h,p) { //widh, height, polozenie 
	
	var sub = '<div id="top_banner"  style="position: relative; left:';
	sub += place[p];
	sub += '; margin: 0px auto; width: 1112px">';
	sub += '<div	id="b_banner"> brak</div>'; 
	sub += '</div>';
	subMenu.innerHTML = sub;
	adreso = base_url+"symulator/main_flash.swf";
	swfobject.embedSWF(adreso, "b_banner", w, h, "9.0.124","<?PHP echo base_url()?>scripts/swfobject/expressInstall.swf", b1, b2);
	
	
	
	
}
