/*

 */

		function load(site_image, site_url, site_big_image_url, site_title, big_image_width, big_image_height) {
			$("#site_image").html("<img src='img/small/" + site_image + "'/>").show();

			if (site_url != null)
				$("#site_url").html("<a href=\"javascript:openSite('" + site_url + "')\">" + site_url + "</a>");
			else
				$("#site_url").html("");

			$("#site_big_image_url")[0].href="javascript:openPicture('" + site_big_image_url + "','::'," + big_image_width +"," + big_image_height +")";
			
			$("#site_title").html(site_title);
		}
	
		function openPicture (a_picturePath, a_windowTitle, a_width, a_height) { 
		  var l_left; 
		  var l_top; 
   
		  l_left = (window.screen.width  - a_width)  / 2; 
		  l_top  = (window.screen.height - a_height) / 2; 
     
		  with (window.open ("", "", 'scrollbars=no, resizable=no, toolbar=no, width=' + a_width + ', height=' + a_height + ', left=' + l_left + ', top=' + l_top).document) { 
		    write ("<html>"); 
		    write ("<title>" + a_windowTitle + "</title>"); 
		    write ("<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"); 
  
			write ("<img src = '" + a_picturePath + "' border = 0>"); 
  
			write ("</body>"); 
		    write ("</html>"); 
		  } 
		}
		
		function openSite(site_url){
 		   window.open(site_url, '_blank');
	    return;
		}
		
		var splited = false;
        function move(d){
            if (splited || (d != 'up' && d != 'down')) return;
            
            var shift = 150; //шаг прокрутки !!!
            var frame_height = $('#menu_frame').height(); 
            var height=$('#menu').height();

            var top=parseInt($('#menu').css('top'));
            top = (isNaN(top)?0:top);
            
            var rest = (d == 'up' ? (top + height - frame_height) : -top);
            if (rest <=0) return;
            if (rest < shift) shift = rest;

            splited = true;
            $('#menu').animate({'top': (d=='up'?'-':'+')+'='+shift.toString()+'px'}, 700, null, window.setTimeout(function() { splited = false; }, 710 ));
        }