function start() {
	Nifty("div#cennik_top","top transparent");
	Nifty("div#cennik_karty","bottom transparent");
	Nifty("div#uslugi_karty","bottom transparent");
	Nifty("h3","normal transparent");
	Nifty("div.ramka","normal transparent");
	Nifty("div.uslugi_toptop","top transparent");
	Nifty("div.top_left_nifty","tl transparent");
	Nifty("div.top_right_nifty","tr transparent");
	Nifty("div.praca_element_data","top transparent");	
	Nifty("div.praca_element_top","tl transparent");	
	Nifty("div.praca_element_bottom","bottom transparent");	
	Nifty("div.vip","small transparent");	
//	Nifty("div#limo_kreska","tr transparent");	
//	Nifty("div#limo_karty","bl transparent");	

	Nifty("a.limo_tab","tr transparent");		
	Nifty("a.limo_tab_active","tr transparent");		

	//zegarek
	if($('clock')) {
		clockPE = new PeriodicalExecuter(setClock,1);
	}
	
	if(history.length>0&&$('powrot')) $('powrot').show();
	
	if($('zamow')) {
		//zamów online
		checkSerwer();
	}
}
window.onload = start;

//zegarek
var clockPE;
var dwukropek = ':';
function setClock() {
	var bonaClock=new Date();
	var cy = bonaClock.getFullYear();
	var cm = bonaClock.getMonth()+1;
	var cd = bonaClock.getDate();
	var ch = bonaClock.getHours();
	var cmin = bonaClock.getMinutes();
	cm = (cm<10?'0'+cm:cm);
	cd = (cd<10?'0'+cd:cd);
	ch = (ch<10?'0'+ch:ch);
	cmin = (cmin<10?'0'+cmin:cmin);
	dwukropek = (dwukropek==':'?'<span style="color:#000;">:</span>':':');
	$('clock').update(cd+'.'+cm+'.'+cy+' '+ch+dwukropek+cmin);
}
//zegarek - koniec

function setText(oTextInput) {
	if(oTextInput.value=='') oTextInput.value = oTextInput.defaultValue;
}
function clearText(oTextInput) {
	if(oTextInput.value==oTextInput.defaultValue) oTextInput.value = '';
}

function isEmail(address) {
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   return(reg.test(address));
}

var okno = null;
function window_open(page,PosX,PosY,width,height)
{
  borderless = false;
  
  if(okno != null && !document.layers)
  {
    okno.close();
  }
  if(borderless && !document.layers)
  {
	okno = window.open(page, "", "fullscreen=0, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0");
	okno.resizeTo(w, s);
	okno.moveTo(PosX, PosY);
  }
  else
  {
	okno = window.open(page, "", "menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width=" + width + ", height=" + height + ", left=" + PosX + ", top=" + PosY);
  }
  okno.focus();
  okno = null;
}
function window_open_scroll(page,PosX,PosY,width,height)
{
  borderless = false;
  
  if(okno != null && !document.layers)
  {
    okno.close();
  }
  if(borderless && !document.layers)
  {
	okno = window.open(page, "", "fullscreen=0, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0");
	okno.resizeTo(w, s);
	okno.moveTo(PosX, PosY);
  }
  else
  {
	okno = window.open(page, "", "menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width=" + width + ", height=" + height + ", left=" + PosX + ", top=" + PosY);
  }
  okno.focus()
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function selectedRadioValue(oForm, sRadioName) {
	var retval = '';
	for(var i=0;i<oForm.elements.length;i++) {
		if(oForm.elements[i].type!='radio'||oForm.elements[i].name!=sRadioName) continue;
		if(oForm.elements[i].checked) retval = oForm.elements[i].value;
	}
	return retval;
}
