	function addCart(addr){    
		window.open(addr, "newwindow", config="width=300, height=100, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=1"); 
	}
	
	function isEmpty(str) 
	{
		for (var intLoop = 0; intLoop < str.length; intLoop++)
			if (" " != str.charAt(intLoop))
				return false;
			return true;
	}
	
	
	function checkRequired(f) {
		var strError = "";
		for  (var intLoop = 0; intLoop<f.elements.length; intLoop++)
			if (null!=f.elements[intLoop].getAttribute("required"))	
				if (isEmpty(f.elements[intLoop].value))
					strError +="  " + f.elements[intLoop].name + "\n";
		if ("" != strError)	{
			alert ("Ошибка, заполните пожалуйста все поля!\n");
	
			return false;
		}
	}
	
	
	function addItem(tId) {
	 basket.location = "basket.php?id="+tId+"&"+"<?=SID?>";
	}

		
		
	
		
		
		var mode_over1=0;
		var mode_click1=0;
		function mouse_over1(id, mode, pr)
		{
			if (!pr)
				pr='';
			var menu=document.getElementById("LM_"+id);
			if (menu && (mode_click1!=id) && ((id!=mode_over1) && (mode==1) || (id==mode_over1) && (mode==0)))
			{
				if (mode==1)
				{
					mode_over1=id;
					menu.className='LeftMenuPodrazdel'+pr+'Over';
				}else
				{
					mode_over1=0;
					menu.className='LeftMenuPodrazdel'+pr+'Out';
				}
			}
		}
		function mouse_click1(id)
		{
			mode_click1=id;
		}

	
	function SetPosition()
	{
		if (document.body.scrollTop>250)
		{
			if (document.body.scrollTop+document.getElementById('LeftMenu').offsetHeight+250<document.getElementById('MainTable').offsetHeight)
				document.getElementById('LeftMenu').style.top=document.body.scrollTop;
		}else
			document.getElementById('LeftMenu').style.top=250;
	}
	
	window.onload = SetPosition;
	window.onscroll=SetPosition;
	window.onresize=SetPosition;
	
		
if (screen.width == '640') {document.write ('<LINK href="/css/1.css" rel="stylesheet" type="text/css">'); }
  else {if (screen.width == '800') {document.write ('<LINK href="/css/1.css" rel="stylesheet" type="text/css">'); }
    else {if (screen.width == '1024') {document.write ('<LINK href="/css/1.css" rel="stylesheet" type="text/css">'); }
      else {if (screen.width == '1280') {document.write ('<LINK href="/css/2.css" rel="stylesheet" type="text/css">'); }
        else {document.write ('<LINK href="/css/2.css" rel="stylesheet" type="text/css">'); }
        }
      }
    }

