function showSWF(plik, width, height, bgcolor, flashVars, wersja, align) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+wersja+',0,0,0" width="'+width+'" height="'+height+'" id="'+plik+'" align="'+align+'">');
	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+'" align="'+align+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function showMail(cz1, cz2) {
	document.write('<a href="mailto:'+cz1+'@'+cz2+'">'+cz1+'@'+cz2+'</a>');
}

function showSearch1() {
	document.getElementById('s2').style.display="none";
	document.getElementById('s1').style.display="inline";
}

function showSearch2() {
	document.getElementById('s1').style.display="none";
	document.getElementById('s2').style.display="inline";
}

function ajaxSelect1(ss) {
	document.getElementById('ssel1').innerHTML='<input type="text" name="sf2_sel3" value="trwa ładowanie..." class="sinput3">';

	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('ssel1');
			ajaxDisplay.innerHTML=ajaxRequest.responseText;

			if(ss>0)
				document.sform2.sf2_sel2.focus();	
			else
				ajaxSelect2(0);
		}
	}

	var queryString = "?sel1=" + ss;
	ajaxRequest.open("GET", "/ajax.php" + queryString, true);
	ajaxRequest.send(null);
}

function ajaxSelect2(ss) {
	document.getElementById('ssel2').innerHTML='<input type="text" name="sf2_sel3" value="trwa ładowanie..." class="sinput4">';

	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('ssel2');
			ajaxDisplay.innerHTML=ajaxRequest.responseText;
			if(ss>0)
				document.sform2.sf2_sel3.focus();
		}
	}

	zm1=document.sform2.sf2_sel1.options[document.sform2.sf2_sel1.selectedIndex].value;

	var queryString = "?p1=" + zm1 + "&sel2=" + ss;
	ajaxRequest.open("GET", "/ajax.php" + queryString, true);
	ajaxRequest.send(null);
}

function showImg1(file) {
	window.open('/powieksz_zdjecie?'+file+'','_blank','width=300, height=300');void(0);
}
