// JavaScript Document
<!--
function request_form_check()
{
	var my_name = document.form.name.value;
    var my_phone = document.form.phone.value;
    var my_mail = document.form.mail.value;
	var my_text = document.form.text.value;
	if (my_name == 'Имя' || my_name.length<1){
    	alert('Укажите Имя');
        return false;
    }
    if ((my_phone == 'Телефон' || my_mail.length<1) && (my_mail == 'E-mail' || my_phone.length<1)){
    	alert('Укажите E-mail или Телефон');
        return false;
    }
    if (my_text.length<1){
    	alert('Отсутствует текст сообщения');
        return false;
    }
	if (my_text.length>1000){
    	alert('Допустимый размер сообщения 1000 символов, Вы написали ' +my_text.length+ ' .');
        return false;
    }
    else{
        return true;
    }
}

function check_form()
{
	var my_name = document.send.name.value;
    var my_mail = document.send.mail.value;
    var my_phone = document.send.phone.value;
    var my_text = document.send.text.value;
    if (my_name.length<1){
    	alert('Укажите Имя');
        return false;
    }
    if (my_mail.length<1 && my_phone.length<1){
    	alert('Укажите E-mail или Телефон');
        return false;
    }
    if (my_text.length<1){
    	alert('Отсутствует текст сообщения');
        return false;
    }
	if (my_text.length>1000){
    	alert('Допустимый размер сообщения 1000 символов, Вы написали ' +my_text.length+ ' .');
        return false;
    }
    else{
    	send.submit();
        return true;
    }
}

function show(toShow) {
	var t_show = document.getElementById(toShow);
	if(t_show.style.display=="none") t_show.style.display = "";
	else t_show.style.display="none";
}

function hide(toShow) {
	var t_show = document.getElementById(toShow);
	t_show.style.display = "none";
}

function hl(obj) {
	 obj.style.backgroundColor='#EEEEEE';
}
function unhl(obj) {
	 obj.style.backgroundColor='';
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function chkbox_switch(chkbox_id,input_id,text_id) {
    if(document.getElementById(chkbox_id).checked){
        document.getElementById(input_id).disabled=false;
		document.getElementById(text_id).className = 'bold';
}
    else {
        document.getElementById(input_id).disabled=true;
		document.getElementById(text_id).className = '';
	}
}

function getRadioGroupValue(radioGroupObj){
	for (var i=0; i < radioGroupObj.length; i++)    
		if (radioGroupObj[i].checked) return radioGroupObj[i].value; 
		
	return null;
}

//-->
