function ID(ID)
{
return document.getElementById(ID);
}
function Tag(Tag)
{
return document.getElementsByTagName(Tag);
}
function Name(Name)
{
return document.getElementsByName(Name);
}
function ClassName(ClassName)
{
var TagIndex = 0;
var TagMatched = 0;
var Elements = new Array();
var Tags = Tag('*');
var Condition = ' ' + ClassName + ' ';
for (TagIndex = 0; TagIndex < Tags.length; TagIndex++)
{
var Pattern = ' ' + Tags[TagIndex].className + ' ';
if (Pattern.indexOf(Condition) != -1)
{
Elements[TagMatched] = Tags[TagIndex];
TagMatched++;
}
}
return Elements;
}
function validate_formmail(f)
{
antyspam_answer = $(".antyspamVer").attr('answer');
antyspam_value = $(".antyspamVer").val();
antyspam_title = $(".antyspamVer").attr('title');
if(antyspam_answer != antyspam_value || antyspam_value == '')
{
alert("Odpowiedz na pytanie weryfikujące");
return false;
}
required = 0;
wymagane = $(".required_field");
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 3)
{
alert('Wypelnij pole obowiązkowe: '+title);
required++;
}
});
if(required > 0)
{
return false;
}
}
function registration()
{
required = 0;
required_titles = '';
wymagane = $(".required_field");
errorStyle = "solid 1px #FA5A5A";
okStyle = "solid 1px #BDBDBD";
var ErrorMsg = '';
mailValue = $(".userProfileEmail").val();
if(!MailIsValid(mailValue))
{
$(".userProfileEmail").css('border', errorStyle);
ErrorMsg = ErrorMsg+"
Podano nieprawidłowy adres e-mail";
required++;
}
else
{
$.get("Registration.html", { ajaxData: "get", userMail: mailValue },
function(data){
if(data == 'MAIL_EXIST')
{
$(".userProfileEmail").css('border', errorStyle);
alert("Podany adres e-mail jest już używany");
required++;
}
else if(data == 'MAIL_EMPTY')
{
$(".userProfileEmail").css('border', errorStyle);
required++;
}
else
{
$(this).css('border', okStyle);
}
});
}
pass1 = $("#register1").val();
pass2 = $("#register2").val();
if(pass1 != pass2)
{
ErrorMsg = ErrorMsg+"
Podane hasła są różne";
$("#register1, #register2").css('border', errorStyle);
required++;
}
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 1)
{
//alert('Wypelnij pole obowiązkowe: '+title);
//required_titles = required_titles+"
Wypełnij poprawnie wszystkie wymagane pola
Pola które musisz wypełnić zostały oznaczone czerwonym kolorem"+ErrorMsg+"
dostawiam
"); console.log('xxx'); }, function(){ }); function tooltip() { xOffset = 10; yOffset = 20; $(".pokazOpis").hover(function(e){ t = $(this).attr('title'); baseTitle = t; $(this).removeAttr('title'); $("body").append(""+ t +"
"); $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ title = baseTitle; $(this).attr('title', title); $("#tooltipA").remove(); }); $(".pokazOpis").mousemove(function(e){ $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); } tooltip(); $(function() { //$('a.lightbox').lightBox({fixedNavigation:true}); $('#nav').droppy({speed: 1}); $("a[rel^='prettyPhoto'], a.lightbox").prettyPhoto({theme:'facebook'}); /* if (ID('StronaGlowna')) { ID('StronaGlowna').onmouseover = function() { this.className = (this.className == 'StronaGlownaOn') ? 'StronaGlownaOff' : 'StronaGlownaOn'; } ID('StronaGlowna').onmouseout = function() { this.className = (this.className == 'StronaGlownaOn') ? 'StronaGlownaOff' : 'StronaGlownaOn'; } } if (ID('PrzepisyPrawne')) { ID('PrzepisyPrawne').onmouseover = function() { this.className = (this.className == 'PrzepisyPrawneOn') ? 'PrzepisyPrawneOff' : 'PrzepisyPrawneOn'; } ID('PrzepisyPrawne').onmouseout = function() { this.className = (this.className == 'PrzepisyPrawneOn') ? 'PrzepisyPrawneOff' : 'PrzepisyPrawneOn'; } } if (ID('Czyszczenie')) { ID('Czyszczenie').onmouseover = function() { this.className = (this.className == 'CzyszczenieOn') ? 'CzyszczenieOff' : 'CzyszczenieOn'; } ID('Czyszczenie').onmouseout = function() { this.className = (this.className == 'CzyszczenieOn') ? 'CzyszczenieOff' : 'CzyszczenieOn'; } } if (ID('Dezynfekcja')) { ID('Dezynfekcja').onmouseover = function() { this.className = (this.className == 'DezynfekcjaOn') ? 'DezynfekcjaOff' : 'DezynfekcjaOn'; } ID('Dezynfekcja').onmouseout = function() { this.className = (this.className == 'DezynfekcjaOn') ? 'DezynfekcjaOff' : 'DezynfekcjaOn'; } } if (ID('Referencje')) { ID('Referencje').onmouseover = function() { this.className = (this.className == 'ReferencjeOn') ? 'ReferencjeOff' : 'ReferencjeOn'; } ID('Referencje').onmouseout = function() { this.className = (this.className == 'ReferencjeOn') ? 'ReferencjeOff' : 'ReferencjeOn'; } } if (ID('Kontakt')) { ID('Kontakt').onmouseover = function() { this.className = (this.className == 'KontaktOn') ? 'KontaktOff' : 'KontaktOn'; } ID('Kontakt').onmouseout = function() { this.className = (this.className == 'KontaktOn') ? 'KontaktOff' : 'KontaktOn'; } } */ Cufon.replace('h1'); Cufon.replace('h2'); function Position(Delay) { setTimeout("$('#BorderLeft').css('height', parseInt($('#container').height() - 383) + 'px');", Delay); setTimeout("$('#BorderRight').css('height', parseInt($('#container').height() - 383) + 'px');", Delay); setTimeout("$('#FooterLeft').css('top', parseInt($('#Top').height() + $('#Buttons').height() + $('#SubTop').height() + $('#container').height() - 54) + 'px');", Delay); setTimeout("$('#FooterRight').css('top', parseInt($('#Top').height() + $('#Buttons').height() + $('#SubTop').height() + $('#container').height() - 54) + 'px')", Delay); } Position(1000); });