setTimeout('animateSubss(isubss.s2)',4000);

var options = {
        target:        '#pwd-settings'
}; 

var isubss = {
		s1:	'-14px',
		s2:	'-49px',
		s3:	'-84px',
		s4:	'-118px',
		s5:	'-153px',
		s6:	'-189px',
		}
		
	var jj=2;
	var nexxxt;

		function animateSubss(px) {
			
			
			
			$('#subss').animate({
					backgroundPosition: '-18px '+px+''
			}, 500);
			
				jj++;
				if (jj==7) {
				jj=1;
			}	
			
			nexxxt = eval('isubss.s'+jj);
			setTimeout('animateSubss(nexxxt)',4000);	
			
		}

		var tipsall = {
				all1:	'Kod zostaje przysłany e-mailem automatycznie po wygranej aukcji.'
		}
		
				function checkPass() {
					if ($('#firstPass').attr('value')!==$('#secPass').attr('value')) {
						alert('wpisane hasła się od siebie różnią!');
						$('#submitAddUser').attr('disabled','disabled');
						return false;
					} else {
						$('#submitAddUser').attr('disabled','');
						return true;
					}
				}

				function checkRegForm() {
					if (!checkPass()) {
						alert('formularz nie może być wysłany');
						return false;
					}
				}
				
	function checkLoginUser(vall) {
		if (vall!=='') {
			$('#loginResult').load('open.php?act=checkLoginUser&inseted='+trim(vall));
		}
	}
	
	function hideNotify() {
		$('#loginResult').html('&nbsp;');
	}
	
	function trim(str, chars) {
		return ltrim(rtrim(str, chars), chars);
	}
	 
	function ltrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
	}

	function rtrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
	}	
	
	function jjj(id) {
		$('#resInfo').toggle();
		$('#subform'+id).ajaxSubmit(options);
		$('#pwd-settings').addClass("important");
	}
