	function change_order_button(but,on_off)
	{
		if (on_off == 'on')
		{
			but.src = ('images/zakazat_over.gif')
		}
		if (on_off == 'off')
		{
			but.src = ('images/zakazat.gif')
		}
		
	}
	
	function show_drop(menu_id)
	{
		var t = document.body.clientWidth
		if (t == 'undefined') t = document.body.innerWidth 
		t = (t-975)/2
		if (menu_id == 'menu_1')
		{
			t = t + 62
		}

		if (menu_id == 'menu_2')
		{
			t = t + 595
	}

		t=parseInt(t)
		document.getElementById(menu_id).style.left = t + 'px'

		var  isDOM
		var  isOpera
		var  isOpera6
		var  isOpera7
		var  isMSIE
		var  isMSIE5
		var  isStrict
		var  isNN
		var  isNN4
		var  isNetscape4
		var  isMozilla1
		var  isMozilla2


		 isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
		isOpera=isOpera5=window.opera && isDOM //Opera 5+
		isOpera6=isOpera && window.print //Opera 6+
		isOpera7=isOpera && document.readyState //Opera 7+
		isMSIE=isIE=document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+
		isMSIE5=isDOM && isMSIE //MSIE 5+
		isStrict=document.compatMode=='CSS1Compat'
		isNN=isNC=navigator.appName=="Netscape"
		isNN4=isNC4=isNN && !isDOM
		isNetscape4=document.layers //Netscape 4.*
		isMozilla1=isNN6=isNN && isDOM
		isMozilla2=isDOM && navigator.appName=="Netscape" //Mozilla ??? Netscape 6.*
		

	if (isMozilla1 || isMozilla2 || isOpera || isOpera6 || isOpera7)
	{
			document.getElementById(menu_id).style.top = '140px'
		}
			else
		{
			document.getElementById(menu_id).style.top = '143px'
		}
			document.getElementById(menu_id).className = "menu_show"
	}

	function menu_hide()
	{
		document.getElementById('menu_1').className = "menu_hide"
		document.getElementById('menu_2').className = "menu_hide"
	}

	////////////Form Validation////////////

	function check_digits(phoneVal)
	{
		var filter  = /[^0-9]/;
		if (filter.test(phoneVal)) 
		return false;
		return true;
	}

	function checkMail(emailVal)
	{
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(emailVal)) 
		return true;
		return false;
	}

	function check_form()
	{
	var errors = '';
	var phone = document.frm.phone_frm.value
	var mail = document.frm.mail_frm.value
	
	if((phone == '' || check_digits(phone) == false) && (checkMail(mail)==false || mail == ''))
	{
	errors = false
	document.getElementById('hidden_text').innerHTML = 'Пожалуйста, укажите Ваш правилный E-mail или телефон.'
	document.getElementById('hidden_text').style.paddingBottom = '10px'
	document.frm.phone_frm.value = ''
	document.frm.mail_frm.value = ''
	}

	else
	
		document.getElementById('name_frm1').value=ToUnicode(document.getElementById('name_frm').value)
		document.getElementById('frm_com1').value=ToUnicode(document.getElementById('frm_com').value)
		document.frm.submit()
	}
	
	 function ToUnicode(unicode)
	{

     var tstr = unicode
     var bstr = '';
      for(i=0; i < tstr.length; i++)
      {
       //if(tstr.charCodeAt(i)>127) 
       // {
         bstr += '&#' + tstr.charCodeAt(i) + ';';
       // } 
      //else 
      // {
      //  bstr += tstr.charAt(i);
      // }
      }
      return (bstr);
	  
    }	 

	// Questions - Answers //

	function opn(tr_open,tr_cloze,answer)
	{
		document.getElementById(tr_open).style.display = 'none';
		document.getElementById(tr_cloze).style.display = 'block';
		document.getElementById(answer).style.display = 'block';
	}

	function clz(tr_open,tr_cloze,answer)
	{
		document.getElementById(tr_open).style.display = 'block';
		document.getElementById(tr_cloze).style.display = 'none';
		document.getElementById(answer).style.display = 'none';
	}

	function x()
	{
	}

