/************************************************
 * Funkcje JavaScript
 * autor: Grzegorz Konieczny
 * email: konieczny@tuning.pl
 * data: 14.05.2004
 ***********************************************/

//funkcja pokaze zdjecie w nowym specjalnym oknie
function PhotoPreview(file){
	preview = window.open('','','scrollbars=1,width=680,height=500,left=1,top=1');
	preview.document.open();   
	preview.document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"></head><body><Table border=0 width=100% height=100% ><tr><td align=center valign=middle><img name=photo src='+file+'></td></tr></table></body></html>');
	preview.document.close();
}

//obsluga potwierdzania decyzji (np. czy napewno wyslac zamowienie)
function ConfirmChoice( question, LinkYes ){
	if ( confirm(question) ){
		if ( LinkYes ){
			document.location.href = LinkYes;
		}
		return true;
	}else{
		return false;
	}
}

//do pokazywania tekstu w osobnym okienku
function ShowInfo(text, width, height){
	preview = window.open('','','scrollbars=1,width='+width+',height='+height+',left=50,top=50');
	preview.document.open();   
	preview.document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"></head><body><Table border=0 width=100% height=100% ><tr><td valign=top>'+text+'</td></tr></table></body></html>');
	preview.document.close();
}

//funkcja pokaze male i duze zdjecie w nowym oknie
function BigAndSmallPhotoPreview(SmallPhoto,BigPhoto){
	preview = window.open('','','scrollbars=1,width=650,height=600,left=1,top=1');
	preview.document.open();   
	preview.document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"></head><body><Table border=0 width=100% height=100%><tr><td align="center" valign="middle" style="font-size: 12px;"><b>Małe zdjęcie:</b><br /><img name=photo src="'+SmallPhoto+'"><br /><br /><b>Duże zdjęcie:</b><br /><img name=photo src="'+BigPhoto+'"></td></tr></table></body></html>');
	preview.document.close();
}