function detectUserBrowserErrors() {
    var minimalRequiredFlashVersion = 9;
    var hasRequiredFlashVersion = DetectFlashVer(minimalRequiredFlashVersion,0,0)
    if (!hasRequiredFlashVersion) {
        document.getElementById('flashWrapper').style.display = 'none';
        document.getElementById('errors').style.display = 'block';
        document.getElementById('noFlash').style.display = 'block';
        document.body.style.background = '#000000 url(_images/layout/mainBG.jpg) no-repeat 50% -100px;'
    }
}


// funkcja inicjujaca
function initScrolls() {
	var minWidth = 1200;
	var minHeight = 600;
	var FB = new K2FlashBody('flashWrapper',minWidth,minHeight);
}



function openpopup(url) {

		var theURL=url;
		var winName='popup_cokezero';
		var width=500;
		var height=580;
		var topY=(screen.height-height)/2;
		var leftX=(screen.width-width)/2;
		var features='innerWidth=' + width+',innerHeight='+height+',width=' + width+',height='+height+',top='+topY+',left='+leftX+',resizable=0,srollbars=0';

	
	    var popup=window.open(theURL,winName,features);
		popup.focus();
}

function facebookPopup() {



        $('#facebookPopup').remove();
        
        FB.init("a9d92ba216c544f61a752bf756df9a10");
        
        $('body').append('<div id="facebookPopup">' +
        '   <a href="#" class="close" onclick="facebookPopupClose(); return false;">x</a>' +
        '   <fb:fan profile_id="237841459356" stream="1" connections="10" logobar="1" width="300"></fb:fan>' +
        '   <div style="font-size:10px; padding-left:10px">' +
        '       <a href="http://www.facebook.com/pages/Marek-Nowakowski/237841459356">Marek Nowakowski</a> on Facebook' +
        '   </div>' +
        '</div>');    
    
    
    
        
}


function facebookPopupClose() {

        $('#facebookPopup').remove();
    
  
}




