
		function fulltime(){
			var time=new Date();
			var myM=time.getMinutes();
			var myS=time.getSeconds();
			var myH=time.getHours();
			if (myH < 10) myH = "0" + myH;
			if (myS < 10) myS = "0" + myS;
			if (myM < 10) myM = "0" + myM;
			document.getElementById("myTimes").innerHTML=myH + ':' +  myM + ':' + myS;
		};

		$(document).ready(function() {
			fulltime();
			setInterval('fulltime()',1000);
		});
		
		function rates(rate) {
			var loadTxt = 'загрузка...';
			$('#RateGraph').css("background", "url('/u/c/" + rate + ".png')");
			$('a.rates').attr("class", "link20 rates");
			$('a#' + rate).attr("class", "link20_active rates");
			$('#RateDollar').html(loadTxt);
			$('#RateEuro').html(loadTxt);
			$('#RateGraph span').html(loadTxt);
			$.getJSON('/_a.php?rate=' + rate,
				function(data){
					$('#RateDollar').html(data.USD);
					$('#RateEuro').html(data.EUR);
					$('#RateGraph span').html(data.dtime);
				});
			
			return false;
		};

		function MyWin(myurl, offs, w, h) {
			if (!myurl) return false;var width = w, height = h; var window_top = (screen.height - height) / 2; var window_left = (screen.width - width) / 2 + offs;var win = window.open(myurl, '', 'width='+width+', height='+height+', top='+window_top+', left='+window_left+', toolbar=0, statusbar=1, location=0, scrollbars=1, resizable=1');return false;
		};
		function CheckClick(mess){
			if (!mess){ mess='Вы подтверждаете ваш выбор?'; }if (confirm(mess)){return true;}else{return false;}
		};
	
		
		
		
		
		$( function() {
			

			/*
			* login form
			*/
			
			$( '#liveSForm' ).LiveFormWithEvents();
			
			$( '#inpText, #inpPass' )
				.focus( function() { 
					$( this ).css( { backgroundPosition: '0 -1000px' } ); 
				} )
				.blur( function() {
					if ( this.value == '' ) { 
						$( this ).css( { backgroundPosition: '0 0' } );
					} 
				} )
				.focus().blur();
			
			
			
			//Users - Registration
			$( '.thickbox' ).bind( "thickboxAjaxAfterLoad", function ( ) {

				$("#regForm")			
					.LiveFormWithEvents()
					.SubmitBefore( function() {
						//this.preventDefault = ! $( '#iagree' ).attr( 'checked' );
					} )
					.SubmitError ( function () {
						//$("#regForm #kcaptcha").attr( "src", "/etc/kcaptcha/image.php?"+(Math.floor(Math.random()*1000000)) );
						//$("#regForm #captcha").val('');
					})
					.SubmitSuccess(function( event, response ) {
						if ( response.regInfo ) 
						{
							$("#regForm").html( response.regInfo );
							if ( window.tb_remove ) {
								$("#registerComplete").click( tb_remove );
							}
						}
					});
									
			} );
			
			//Users - Recovery password
			$("#recoveryForm")
				.LiveFormWithEvents()
				.SubmitError ( function () {
					$("#recoveryForm #kcaptcha").attr( "src", "/users/kcaptcha/?"+(Math.floor(Math.random()*1000000)) );
					$("#recoveryForm #captcha").val('');
				})
				.SubmitSuccess(function( event, response ) {
					if ( response.regInfo ) 
					{
						$("#recoveryForm").html( response.regInfo );
						$("#recoveryComplete").click( function () {
							window.location.reload();
						});
					}
				});

			$("#registerForm")			
				.LiveFormWithEvents()
				.SubmitBefore( function() {
					//this.preventDefault = ! $( '#iagree' ).attr( 'checked' );
				} )
				.SubmitSuccess(function( event, response ) {
					if ( response.regInfo ) 
					{
						$("#registerForm").html( response.regInfo );
					}
				});
			
			$("#nextCode").click( function () {
				$("#kcaptcha").attr( "src", "/users/kcaptcha/?"+(Math.floor(Math.random()*1000000)) );
				return false;
			});		


		});