function showSWF(plik, width, height, bgcolor, flashVars) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+plik+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+plik+'" />');
	document.write('<param name="id" value="'+plik+'" />');
	document.write('<param name="menu" value="false" />');
	if(flashVars.length>0)
		document.write('<param name="flashVars" value="'+flashVars+'"/>');
	document.write('<param name="quality" value="high" />');
	if(bgcolor!=''){
		document.write('<param name="bgcolor" value="'+bgcolor+'" />');
	} else {
		document.write('<param name="wmode" value="transparent" />');
	}
	document.write('<embed src="'+plik+'" quality="high" ');
	if (bgcolor.length>0){
		document.write('bgcolor="'+bgcolor+'"');
	} else {
		document.write('wmode="transparent"');
	}
	if(flashVars.length>0)
		document.write(' flashVars="'+flashVars+'"');
	document.write(' menu="false"');
	document.write(' width="'+width+'" height="'+height+'" name="'+plik+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function ShowYouTubeMovie(id){
	document.write('<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/'+id+'&rel=0&color1=0x3a3a3a&color2=0x999999&hl=pl"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+id+'&rel=0&color1=0x3a3a3a&color2=0x999999&hl=pl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
}

function showMail(cz1, cz2){
	document.write('<a href="mailto:'+cz1+'@'+cz2+'">'+cz1+'@'+cz2+'</a>');
}

function showImg2(file) {
	window.open('/zdjecie_duze/'+file+'','_blank','width=300, height=300');void(0);
}

function showImg1(file) {
	document.getElementById('prod_img').innerHTML='<img src="/zdjecie/5,'+file+'" class="prod_kart_img3" alt="" onclick="showImg2(\''+file+'\');" title="Kliknij aby powiększyć">';
}

function showImg3(file) {
	window.open('/strony,zdjecie_duze/'+file+'','_blank','width=300, height=300');void(0);
}

function changeCart() {
	alert("Po zmianie ilości produktu pamiętaj aby ponownie przeliczyć swój koszyk.");
}

function ajaxfn1(zm) {
	var ajaxRequest;
	try {
		ajaxRequest = new XMLHttpRequest();
	} catch (e) {
		try {
		ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser broke!");
				return false;
			}
		}
	}

	ajaxRequest.onreadystatechange = function() {
		if(ajaxRequest.readyState == 4) {
			var ajaxDisplay = document.getElementById('wyszukiwarka');
			ajaxDisplay.innerHTML=ajaxRequest.responseText;
		}
	}

	var queryString = "?wyszukiwarka="+zm;
	ajaxRequest.open("GET", "/ajax.php" + queryString, true);
	ajaxRequest.send(null);
}
