$(function(){
	move = 0;
	$(".menuDrivePicture>a.right").mouseup(function(){
		Count = $("td", ".PictureLine").length;
		roll = 3;
		if(Count-move <= 6){
			roll = Count-move-3;
			$(this).addClass('noneRight');
		}
		move = move + roll;
		$("table", ".PictureLine").animate({left: '-'+(284*move)+'px'}, 300, "swing");
		$(".menuDrivePicture>a.left").removeClass('noneLeft');

	});
	$(".menuDrivePicture>a.left").mouseup(function(){
		Count = $("td", ".PictureLine").length;
		roll = 3;
		if(move <= 3){
			roll = move;
			$(this).addClass('noneLeft');
		}
		move = move - roll;

		$("table", ".PictureLine").animate({left: '-'+(284*move)+'px'}, 300, "swing");
		$(".menuDrivePicture>a.right").removeClass('noneRight');
	});
	$("a",".listLogo").mouseover(function(){
		$("img", $(this)).each(function(i){
			if(i == 0)
				$(this).css('display', 'none');
			else
				$(this).css('display', 'block');
		});
	});
	$("a",".listLogo").mouseout(function(){
		$("img", $(this)).each(function(i){
			if(i != 0)
				$(this).css('display', 'none');
			else
				$(this).css('display', 'block');
		});
	});
	$('input','.contactsForm').blur(function(){
		if($(this).attr('value') == undefined){
			$(this).removeClass('select');
			$(this).attr('value', $(this).attr('title'));
		}
	});
	$('input','.contactsForm').focus(function(){
		if($(this).attr('value') == $(this).attr('title')){
			$(this).attr('value','');
			$(this).addClass('select');
		}
	});
	$('textarea','.contactsForm').blur(function(){
		if($(this).attr('value') == undefined){
			$(this).removeClass('select');
			$(this).attr('value', $(this).attr('title'));
		}
	});
	$('textarea','.contactsForm').focus(function(){
		if($(this).attr('value') == $(this).attr('title')){
			$(this).attr('value','');
			$(this).addClass('select');
		}
	});
	$('#captcha').mouseup(function(){
		$(this).html('');
		$(this).html('<img src="/bitrix/templates/Main/captcha/captcha.php?r='+Math.random(999)+'" />');
	});
});



function Close(){
	
	alert(m)
}

function ImgShw(ID, width, height, alt)
{
var scroll = "no";
var top=0, left=0;
if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
width = Math.min(width, screen.width-10);
height = Math.min(height, screen.height-28);
var wnd = window.open("http://abtukraine.com/bitrix/templates/Main/include_files/img.php?ID="+ID+"&alt="+alt,"","menubar=1,scrollbars="+scroll+",resizable=0,width="+width+",height="+height+",left="+left+",top="+top);
/*wnd.document.write(
"<html><head>"+
"<title>"+(alt == ""? "Картинка":alt)+"</title></head>"+
"<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">"+
"<img src=\""+ID+"\" border=\"0\" alt=\""+alt+"\" />"+
"</body></html>"
);*/
wnd.document.close();
}
