<!--
function NPH_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.NPH_p) d.NPH_p=new Array();
    var i,j=d.NPH_p.length,a=NPH_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.NPH_p[j]=new Image; d.NPH_p[j++].src=a[i];}}
}

function NPH_swapImgRestore() { //v3.0
  var i,x,a=document.NPH_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function NPH_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=NPH_findObj(n,d.layers[i].document); return x;
}

function NPH_swapImage() { //v3.0
  var i,j=0,x,a=NPH_swapImage.arguments; document.NPH_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=NPH_findObj(a[i]))!=null){document.NPH_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function addtoFavorites() {
 	if (window.external) {
	external.AddFavorite('raz','dwa')
	}
}

function goUrl(url) {     
    document.location=url;
}


function popup(url,width,height,scrollbars) {
	nazwa= window.open(url,'nazwa','height='+height+',width='+width+',scrollbars='+scrollbars);
}



function imgPopup(url,width,height,name,scale) 
{
	width=width;
	height=height;
	
	x = "TITLEBAR=0,LOCATION=0,RESIZE=0, WIDTH="+width+", HEIGHT="+height;

	newwindow = window.open("",name,x);
	newwindow.document.open();

	newwindow.document.write('<html><head><title>'+name+'</title></head><body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF"><img src="'+url+'" alt="" width="'+width+'" height="'+height+'" border="0" onclick="window.close()"></body></html>');
	newwindow.document.close();

}


function showDiv(divId,html){
	if(document.getElementById(divId).style.visibility==""||document.getElementById(divId).style.visibility=="hidden"){
		if(html!="") {
			document.getElementById(divId).innerHTML=html;
			}
		document.getElementById(divId).style.visibility="visible";
		document.getElementById(divId).style.position="relative";
	}
	else if(document.getElementById(divId).style.visibility=="visible"){
		document.getElementById(divId).style.visibility="hidden";
		document.getElementById(divId).style.position="absolute";
	}
}


function checkAll(form) {
	for(i=0;i<document.forms[form].elements.length;i++){
		if(document.forms[form].elements[i].type == 'checkbox'){
			document.forms[form].elements[i].checked= true;
		}
	}
}


function uncheckAll(form) {
	for(i=0;i<document.forms[form].elements.length;i++){
		if(document.forms[form].elements[i].type == 'checkbox'){
			document.forms[form].elements[i].checked= false;
		}
	}
}


tags=new Array();

tags['bold']		= new Array('[b]','[/b]');
tags['italic']		= new Array('[i]','[/i]');
tags['underline']	= new Array('[u]','[/u]');
tags['pleft']		= new Array('[p align="left"]','[/p]');
tags['pcenter']		= new Array('[p align="center"]','[/p]');


function getSel(what, where)
{
	var txt = '';
	var dane='';
	if(what) {
		if (document.selection.createRange().text!='')	{
			txt = document.selection.createRange().text;
			for(i in document.selection.createRange()) {
				dane+=' '+i;
			}
		}
		else return;
		document.selection.createRange().text=tags[what][0]+document.selection.createRange().text+tags[what][1];
	}
}

function parser(source) {
	dane=source;
	dane = dane.replace(/\[/g, "<").replace(/\]/g, ">");
	return dane;
}

function hidden(form,source) {
	document.form.parsed.value=parser(source.value);
}

function preview(source, width, height) {
	x = "TITLEBAR=0,LOCATION=0,RESIZE=0, WIDTH="+width+", HEIGHT="+height+"";
	newwindow = window.open("",'Preview',x);
	newwindow.document.open();
	newwindow.document.write(source);
	newwindow.document.close();
}


function isNumberKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		return false;
	}
	return true;
}

function setrange(field,maximum) {
	if(field.value>maximum) {
		field.value=maximum;
	}
}

function query(val,field) {
	var wl = new String(window.location);
	if(field.value!='') {
		if(wl.indexOf(val)==-1) {
			var query=wl+'&'+val+'='+field.value;
		} else {
			var query=new String(wl.substr(0,wl.indexOf(val)))+val+'='+field.value;
		}
		document.location=query;
	}
}


function divOver(news, color) {
document.getElementById(news).style.background = color;
}

function divOut(news, color) {
document.getElementById(news).style.background = color;
}


function confSend(msg,form) {
	f=document.getElementById(form);
	if(f!=undefined) {
		if(confirm(msg)==true) {
			f.submit();
		}
	}
}


//-->