   	function showHelp(lay)
	{
		document.getElementById([lay]).style.display = 'block';
	}

	function hideHelp(lay)
	{
		document.getElementById([lay]).style.display = 'none';
	}

	function switchPhotosSize(photo_size_mode)
	{
		document.switch_photo_size_form.photo_size_mode.value = photo_size_mode;
		document.switch_photo_size_form.operation.value = 'switch_photo_size';
		document.switch_photo_size_form.submit();
	}

	function switchPhotosSort(photo_sort_mode)
	{
		document.switch_photo_sort_form.photo_sort_mode.value = photo_sort_mode;
		document.switch_photo_sort_form.operation.value = 'switch_photo_sort';
		document.switch_photo_sort_form.submit();
	}

	function switchScreenMode(screen_mode)
	{
		document.switch_screen_mode_form.screen_mode.value = screen_mode;
		document.switch_screen_mode_form.operation.value = 'switch_screen_mode';
		document.switch_screen_mode_form.submit();
	}


	function adminPhotoLabLogout()
	{
		document.photo_lab_admin_form.operation.value = 'photo_lab_admin_logout';
		document.photo_lab_admin_form.submit();
	}

	function adminLogout()
	{
		document.admin_form.operation.value = 'admin_logout';
		document.admin_form.submit();
	}

	function putPhotosInBasket()
	{
        document.photo_block_form.operation.value = 'put_photos_in_basket';
    	document.photo_block_form.submit();
	}

	function skeletonSearchPhotos()
	{
//        document.skeleton_photos_search_form.operation.value = 'search_photos';
    	document.skeleton_photos_search_form.submit();
	}

	var pushed_buttons = [];
    function changeButton2Style(obj, mode)
    {
		for (var button in pushed_buttons)
		{
		    if (button == obj)
		    {
		        mode = 'over';
		    }
		}

        document.getElementById(obj+'_l_b2').style.backgroundImage = "url(/pics/skeleton_new/b_2_l_border_"+mode+".gif)";
        document.getElementById(obj+'_c_b2').style.backgroundImage = "url(/pics/skeleton_new/b_2_c_border_"+mode+".gif)";
        document.getElementById(obj+'_r_b2').style.backgroundImage = "url(/pics/skeleton_new/b_2_r_border_"+mode+".gif)";
    }

    function checkFormByEnter(event, operation)
    {
        if( event.keyCode == 13 )
        {
            document.data_form.operation.value = operation;
            document.data_form.submit();
        }
    }