function login_f(elm){
				  if(elm.value=='Пароль'){
					   elm.value = '';
					   elm.type='password'
				    }
				    else elm.value = '';
				}

function login_b(elm){
 if(elm.value=='') {
					if(elm.name=='password') {
					    elm.value = 'Пароль';
					    elm.type='text'
					} else elm.value = 'Логин';		
					}	   
				}

function provcb()
{if (!document.getElementById('c1').checked && !document.getElementById('c2').checked && !document.getElementById('c3').checked && !document.getElementById('c4').checked && !document.getElementById('c5').checked)
{alert ('Выберите один вариант ответа!!!');return;}
document.getElementById('test_go').submit();
}

var checkboxHeight = "25";

document.write('<style type="text/css">input.ch_box { display: none; }input.ch_box2 { display: none; }</style>');
var Custom = {
	init: function() {
		var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
		for(a = 0; a < inputs.length; a++) {
			if(inputs[a].type == "checkbox" && inputs[a].className == "ch_box") {
				span[a] = document.createElement("span");
				span[a].className = inputs[a].type;

				if(inputs[a].checked == true) {
					if(inputs[a].type == "checkbox") {
						position = "0 -" + (checkboxHeight*2) + "px";
						span[a].style.backgroundPosition = position;
					} 
				}
				inputs[a].parentNode.insertBefore(span[a], inputs[a]);
				inputs[a].onchange = Custom.clear;
				if(!inputs[a].getAttribute("disabled")) {
					span[a].onmousedown = Custom.pushed;
					span[a].onmouseup = Custom.check;
				} else {
					span[a].className = span[a].className += " disabled";
				}
			}
		}

		document.onmouseup = Custom.clear;
	},
	pushed: function() {
		element = this.nextSibling;
		if(element.checked == true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
		} else if(element.checked != true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
		}
	},
	check: function() {
		element = this.nextSibling;
		if(element.checked == true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 0";
			element.checked = false;
		} else {
			if(element.type == "checkbox") {
				this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			}
			element.checked = true;
		}
	},
	clear: function() {
		inputs = document.getElementsByTagName("input");
		for(var b = 0; b < inputs.length; b++) {
			if(inputs[b].type == "checkbox" && inputs[b].checked == true && inputs[b].className == "ch_box") {
				inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			} else if(inputs[b].type == "checkbox" && inputs[b].className == "ch_box") {
				inputs[b].previousSibling.style.backgroundPosition = "0 0";
			} 
		}
	}
}
window.onload = Custom.init;
function sendform()
{
name=document.getElementById('name').value;
mail=document.getElementById('email').value;
tema=document.getElementById('tema').value;
text=document.getElementById('text').value;
s_code=document.getElementById('s_code').value;
if (name.length<3)
{alert ('Вы не ввели имя!!!');return;}
if (mail.length<7)
{alert ('Вы не ввели е-маил!!!');return;}
if (tema.length<5)
{alert ('Вы не ввели тему письма!!!');return;}
if (text.length<10)
{alert ('Вы не ввели текст письма!!!');return;}
if (s_code.length<5)
{alert ('Вы не ввели код безопасности!!!');return;}
document.getElementById('fsend').submit();
}
function t_getc()
{document.location.href='/pdd.html'; return;}
