
var isNew = 0;
var isNS4 = 0;
var isIE4 = 0;  
var isIE=(document.all) ? true : false; 
var okno=null;

var brow = ((navigator.appName) + (parseInt(navigator.appVersion)));
if (parseInt(navigator.appVersion) >= 5) { isNew = 1; }
else if (brow == "Netscape4") { isNS4 = 1; }
  else if (brow=="Microsoft Internet Explorer4"){isIE4=1;}
if (isNS4 || isIE4 || isNew) {
  var docObj = (isNS4) ? 'document' : 'document.all';
  var styleObj = (isNS4) ? '' : '.style';
}




function okienko(w,h,nazwa) {
	if (okno) { 
 	  if (isIE4) okno.close(); 
 	  else if (isNS4) okno.closed; 
 	  okno=null 
 	}; 
	  okno=window.open(nazwa,'okno',"status=no,menubar=no,scrollbars=no,resizable=no, width="+w+", height="+h+", top=50,left=100");
}


function my_replace(str, find, rep)
{
    var res = str;
    var i = 0;
    while(true)
    {
        i = res.indexOf(find, i);
        if (i == -1) break;
        res = res.substr(0, i) + rep + res.substr(i + find.length);
        i += rep.length;
    }
    return res;
}


function zdjecie(w,h,nazwa,tytul,scrolling) {
	if (okno) { 
 	  if (isIE4) okno.close(); 
 	  else if (isNS4) okno.closed; 
 	  okno=null 
 	}; 
	  okno=window.open("",'okno',"status=no,menubar=no,scrollbars="+scrolling+",resizable=no, width="+w+", height="+h+", top=50,left=100");
	  okno.document.write("<html><head><meta http-equiv'=Content-type' charset='iso-8859-2' 'content=text/html; charset=iso-8859-2'><meta http-equiv='Pragma' content='no-cache'><title>"+tytul+"</title></head><body bgcolor='#FFFFFF' bottommargin='0' leftmargin='0' marginheight='0' marginwidth='0' rightmargin='0' topmargin='0'><img src='"+nazwa+"' width='"+w+"' height='"+h+"' alt='"+tytul+"'></body></html>");
	
}


function drukuj_kontakt(l1,l2,l3,print_mailto) {
	//alert(l1);
	//alert(l2);
	//alert(l3);
	
	if (l1==1) {l1='<a href="';}
	
	l2=my_replace(l2,'|||','@');
	l2=my_replace(l2,'###','.');
	l2=my_replace(l2,' ','');

	
	
	document.write(l1);
	if (print_mailto=='yes') {
   	document.write("ma");
   	document.write("i");
   	document.write("");
   	document.write("lt");
   	document.write("");
   	document.write("o");
   	document.write(":");
	}
	
	for (i=0;i<l2.length;i++) {
		document.write(l2.substr(i,1));
	}
	
	document.write(l3);
}

