function sravnenie(idwhat,idwithwhat,iddest)
    {
    if(document.getElementById(idwhat).value!=document.getElementById(idwithwhat).value)
        document.getElementById(iddest).innerHTML='<font color="red">Не совпадает</red>';
    else
        document.getElementById(iddest).innerHTML='<font color="green">Совпадает</red>';
    }
	
function showPasswordChangeInputs(){
	// show/hide passwordchange inputs
	if (document.getElementById('resetpassword').checked){
		$('.changepassrow').slideDown('slow');
	}
	else{
		$('.changepassrow').slideUp('slow');
	}
}

function showSpeackerFields(){
	if (document.getElementById('bespeacker').checked){
		$('.bespeackerrow').slideDown('slow');
	}
	else{
		$('.bespeackerrow').slideUp('slow');
	}
}

function loadGallery(gal){
	$.ajax({
		url:'/ajaxgallery.php?gal='+gal,
		type: 'POST',
		dataType: 'html',
		success: function (data){
			//alert($(data).html());
			$('#viewNext').unbind('click').removeClass('disabled');
			$('#viewPrev').unbind('click').addClass('disabled');
			$('.vertCarusel > ul').empty().append($(data).html());
			appendGallery();
		}
	});
	return false;
}

function appendGallery(){
 $(".vertCarusel").jCarouselLite({
        btnNext: "#viewNext",
        btnPrev: "#viewPrev",
        vertical: true,
        visible: 4,
        circular: false						      
    });

$(".prv").click(function(){
     $(".viewerDiv").find('a').attr('href',$(this).attr('rev'));
     $(".viewerDiv").find('a img').attr('src',$(this).attr('rel'));
});
}

function photoListDisplay(){
	if($('.albumstop').css('display')=='none'){
		$('.albumstop').slideDown()
	}
	else{
		$('.albumstop').slideUp();
	}
}