function checkStringPREV(t, f){
  if(f) t.className = '';
  else if(t.value == '') t.className = 'searchstring';
  else t.className = '';
}
function checkLogin(t, f){
  if(f) t.className = 'loginEmpty';
  else if(t.value == '') t.className = 'loginstring';
  else t.className = 'loginEmpty';
}
function checkPassword(t, f){
  if(f) t.className = 'loginEmpty';
  else if(t.value == '') t.className = 'passwordstring';
  else t.className = 'loginEmpty';
}
function checkEmail(t, f){
  if(f) t.className = 'emailEmpty';
  else if(t.value == '') t.className = 'emailstring';
  else t.className = 'emailEmpty';
}
function checkNewsletter(){
  var r = /.+@.+\..+/i;
  if(!r.test(document.newsform.email.value)){
    alert('Musisz podać poprawny adres e-mail.');
    return false;
  }
  return true;
}
function mycarousel_initCallback(carousel){
  carousel.clip.hover(function(){
    carousel.stopAuto();
  }, function(){
    carousel.startAuto();
  });
};
function checkSymbol(){
  var r = /([0-9]+)\/([0-9]+)/i;
  var x = r.exec(document.calform.www_nazwa.value);
  if(x != null){ 
    location.href = '/web/?page=oferta;i='+x[1]+';o='+x[2];
    return false;
  }
}

function checkSymbol2(){
  var r = /([0-9]+)\/([0-9]+)/i;
  var x = r.exec(document.calform2.www_nazwa.value);
  if(x != null){ 
    location.href = '/web/?page=oferta;i='+x[1]+';o='+x[2];
    return false;
  }
}

function checkString(t, f){
  if (f)
		$(t).val('');
	else if ($(t).val() == '')
		$(t).val('Fraza lub nr oferty');
}
