		var a=0; var arrow=0; var arrow2=0; 
		var heightm=0; var flag_1=0; var fl=0;

		function loadContent(id,m,r) {
			if(m==3)
			{	
				document.getElementById("zelop").style.display='block';
			}
			jQuery("#opisanie").load("div.php?id="+id+"&c=i&m="+m+"&r="+r);
			jQuery("#name").load("div.php?id="+id+"&c=n&m="+m+"&r="+r);
			jQuery("#razmer").load("div.php?id="+id+"&c=r&m="+m+"&r="+r);
			}
			
		function loadPict(id,m) {
			Lightview.updateViews();
			jQuery("#pathb").load("div.php?id="+id+"&c=p&m="+m);
			if(m==5) jQuery("#kartina").load("div.php?id="+id+"&c=k&m="+m);
			}
			
		function fireEvent(obj,evt){
				var fireOnThis = obj;
				if( document.createEvent ) {
				  var evObj = document.createEvent('MouseEvents');
				  evObj.initEvent( evt, true, false );
				  fireOnThis.dispatchEvent(evObj);
				} else if( document.createEventObject ) {
				  fireOnThis.fireEvent('on'+evt);
				}
			}
			
		function loadCvqt(id,count,m) {
			jQuery("#scrollbar_content").load("div.php?id="+id+"&c=c&m="+m);
			document.getElementById("scroll_top").title=count;
			}
		
		function loadCl(m,r)
		{
			jQuery("#pathb").load("search_model.php?c=cl&r="+r+"&m="+m);
			jQuery("#name").load("search_model.php?c=cln&r="+r+"&m="+m)
		}
		function loadName(id,m)
		{
			jQuery("#name").load("search_model.php?c=ln&id="+id+"&m="+m)
		}
		
		function loadName1(id,m)
		{
			jQuery("#name").load("search_model.php?c=ln1&id="+id+"&m="+m)
		}
		
		function loadSearch(m,r) {

			var t1=document.getElementById('tab1');
			var t2=document.getElementById('tab2');
			t1.style.backgroundImage='url(images/blue.jpg)';
			t1.style.paddingLeft="16px";
			document.getElementById('tab1a').style.color="#ffffff";
			t2.style.backgroundImage='url(images/pink.jpg)';
			t2.style.paddingLeft="15px";
			t2.style.paddingRight="4px";
			document.getElementById('tab2a').style.color='#333333';
			jQuery("#scroll_div").load("search_model.php?c=s&r="+r+"&m="+m);
			jQuery("#name").load("search_model.php?c=cln&r="+r+"&m="+m);
			jQuery("#pathb").hide();
			jQuery("#cvqt").hide();
			jQuery("#zelop").hide();
			jQuery("#click").hide();
			jQuery("#zeltabl").hide();
		}

		function emptySearch(m)
		{
			jQuery("#search").empty();
			jQuery("#pathb").show();
			jQuery("#cvqt").show();
			jQuery("#zelop").show();
			jQuery("#click").show();
			if(m=='3')
			{
				jQuery("#zeltabl").show();
			}
		}
		function SearchModel(m,r)
		{
			var w=document.getElementById("search_model").value;
			jQuery("#name").load("search_model.php?c=cln&r="+r+"&name="+w+"&m="+m);
			jQuery("#search").load("search_model.php?c=smp&name="+w+"&m="+m+"&r="+r);
			jQuery("#pathb").hide();
			jQuery("#cvqt").hide();
			jQuery("#zelop").hide();
			jQuery("#click").hide();
		}

		function Show(id){
				if(id==1)
				{
					if(document.getElementById("opisanie").style.display=="none")
						document.getElementById("opisanie").style.display="block";
					else 
						document.getElementById("opisanie").style.display="none";
					if(arrow==0) { document.getElementById("arrow").src='images/arrow_up.gif'; arrow=1; }
					else { arrow=0; document.getElementById("arrow").src='images/arrow_left.gif';}
				}
				if(id==2)
				{
					if(document.getElementById("razmer").style.display=="none")
						document.getElementById("razmer").style.display="block";
					else 
						document.getElementById("razmer").style.display="none";
					if(arrow2==0) { document.getElementById("arrow2").src='images/arrow_up.gif'; arrow2=1; }
					else { arrow2=0; document.getElementById("arrow2").src='images/arrow_left.gif';}
				}
		}

	function change(id1,m)
	{
		if(m==3)
		{
			document.getElementById(a).style.borderColor="#fff";
			a=id1;
			document.getElementById(id1).style.borderColor="#017cc9";
		}
		else
		{
			document.getElementById(a).style.borderColor="#cccccc";
			a=id1;
			document.getElementById(id1).style.borderColor="#017cc9";
		}
	}
		
	function showF(a,b)
	{
		document.getElementById(a).style.backgroundImage='url(images/point_.gif)';
		document.getElementById(b).style.color="#86c326";
	}
	function hideF(a,b)
	{
		document.getElementById(a).style.backgroundImage='';
		document.getElementById(b).style.color="#007dc6";
	}
	
	
	function loadHudognici(r)
	{
		jQuery("#inside_menu").load("div.php?c=hud&r="+r);
		document.getElementById("o1").className="tab_or_1";
		document.getElementById("o2").className="tab_or_2";
	}
	
	function loadTemi(r)
	{
		jQuery("#inside_menu").load("div.php?c=temi&r="+r);
		document.getElementById("o1").className="tab_orp_1";
		document.getElementById("o2").className="tab_orp_2";
	}
	
	function loadKart(id,count,m) {
			jQuery("#scrollbar_content").load("div.php?id="+id+"&c=kart&m="+m);
	}
	
	function loadKart1(id,count,m) {
			jQuery("#scrollbar_content").load("div.php?id="+id+"&c=kar&m="+m);
	}

			


