function displayWindow(url, width, height) {
    var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes' );
 }

function showRightFoto( foto ) {
	if ( foto != '' ) {
		$("#innerRightColumn").html( '<img src="' + foto + '" alt="' + foto + '" width="140" />' );
	}
}


function showArtykul( file ) {
	artykul = window.open (file, null, 'menubar=no,toolbar=no,scrollbars=yes');
}


function diagnoza(step, text) {
	$.ajax({
		type: "POST",
		url: "/_ajax/diagnoza.php",
		data: { 'step' : step, 'text' : text },
		success: function(data) {
			$("#diagnoza").html( data );
		}
	});
}


function sendDiagnozaForm( step, pytanie, odp) {
	$.ajax({
		type: "POST",
		url: "/_ajax/diagnoza.php",
		data: { 'step' : step, 'pytanie' : pytanie, 'odp' : odp },
		success: function(data) {
			if ( step == '' ) {
				var loc = $("#loc").val().replace(/.html/, "");
				document.location.href = loc + ',wynik:true.html';
			} else {
				$("#diagnoza").html( data );
			}
		}
	});
}


function diagnozaWynik() {
	$.ajax({
		type: "POST",
		url: "/_ajax/diagnoza.php",
		data: { 'wynik' : true },
		success: function(data) {
			$("#diagnoza").html( data );
		}
	});
}


function sendPage(link, lang) {
	var link = window.location;
	send = window.open ('/send_to_friend.php?link='+link, null, 'menubar=no,toolbar=no,scrollbars=yes,width=500,height=300');
}


function printWindow( prod ) {
	druk = window.open ('/print.php?prod='+prod, null, 'menubar=no,toolbar=no,scrollbars=yes,width=800,height=600');
}


function popupImage( image, width, height ) {
	if ( image != '' ) {
		nagroda = window.open (image, null, 'menubar=no,toolbar=no,scrollbars=yes,width='+width+',height='+height);
	}
}
