function registration(){
 window.open('/registration', 'play', 'width=200,height=315,menubar=no,toolbar=no,scrollbars=no');	
}
function password(){
 window.open('/forgot_password', 'play', 'width=200,height=200,menubar=no,toolbar=no,scrollbars=no');	
}
function exti_reg(){
 JsHttpRequest.query(
    "/getemail",
    {                
     'EXIT_REG': "tr"
    },            
    function(result, errors) 
	{	 
     if (result) 
	 {	 		   
	  document.location.href = window.location.href;
	 }			  
    },
    false
  );
}

$(document).ready(function () {
 //var width = screen.width   //Определяем ширину экрана в пикселях
 var width = 0;
 width = document.body.clientWidth;  
 if( width < 800)
   width=990;


  $('#content_box').css("width",width-285-15);
  $('.container').css("width",width-285);
  $('.content_box_2').css("width",width-180-300);
  $('.content').css("width",width-15-285);
  $('.contbox').css("width",width-15-285);
  $('.accordion').css("width",width-15-285);
  $('html').css("width",width);
 
});

$(document).ready(function () {
 var width = screen.width;   //Определяем ширину экрана в пикселях
  
  logo=$(".logo").width();
  phoneT=$(".main_phone").width();
  about=$(".about").width();
  
  phone=$(".phone").width();
  block_body=$(".block_body").width();
  
  phone_need=(width-logo-about-phoneT)/2;
  //alert(phone_need);
  
  $('.phone').css("left",logo+phone_need);
  $('.block_body').css("left",logo+phone_need);
});



$(window).load(function height_copyright() {
	l=$(".logo").height();
	n=$("#navigator").height();
	r=$(".registration").height();
	f=$("#find").height();
	t=$(".tags").height();
	h=$(".help").height();
	h_c=$(".help_c").height();
	b=$(".banner").height();


	box1=$("#content_box").height();
	box2=$(".content_box_2").height();
	box3=$(".box_category").height();
	box4=$(".banner_content").height();
	
	left=l+n+box1+box2;
	right=l+n+r+f+t+h+h_c+b;
	
	box=l+n+box3+box4;
	
	
	if(left>right)
	{
	height_need=left;
	//alert(height_need);	
	}
	else{
		height_need=right;
	//alert(height_need);
	}
	
	$('.copyright').css("top",height_need+100);
});


$(window).load(function banner() {
	l=$(".logo").height();
	n=$("#navigator").height();
	r=$(".registration").height();
	f=$("#find").height();
	t=$(".tags").height();
	h=$(".help").height();
	h_c=$(".help_c").height();

	box=$(".box_category").height();
	
	right=l+n+r+f+t+h+h_c;
	left=l+n+box;
	
	$('.banner').css("top",right+42);
	$('.banner_content').css("top",left+42);
});

$(window).load(function help() {
	l=$(".logo").height();
	n=$("#navigator").height();
	r=$(".registration").height();
	f=$("#find").height();
	t=$(".tags").height();
	
	right=l+n+r+f+t;
	
	$('.help').css("top",right+20);
});
