// created by "InternetLab" function $(id) {	return document.getElementById(id);}function getLeasingForm(leasingType) {	objArray = Array();	objArray[0]=$("leasingForm1");	objArray[1]=$("leasingForm2");	objArray[2]=$("leasingForm3");	objArray[3]=$("leasingForm4");	objArray[4]=$("leasingForm5");	objArray[5]=$("leasingForm6");	objArray[6]=$("leasingForm7");	objArray[7]=$("leasingForm8");	objArray[8]=$("leasingForm9");	for(i=0;i<objArray.length;i++) {		objArray[i].style.display = 'none';	}	if(leasingType==0) {	for(i=0;i<objArray.length;i++) {		objArray[i].style.display = 'none';	}	return false;	}	if(leasingType==5) {	objArray[4].style.display = 'block';	}		objArray[leasingType-1].style.display = 'block';	}function getLeasingForm1(leasingType) {	objArray = Array();	objArray[0]=$("leasingForm6");	objArray[1]=$("leasingForm7");	objArray[2]=$("leasingForm8");	objArray[3]=$("leasingForm9");	for(i=0;i<objArray.length;i++) {		objArray[i].style.display = 'none';	}	if(leasingType==0) {	for(i=0;i<objArray.length;i++) {		objArray[i].style.display = 'none';	}	return false;	}			objArray[leasingType-1].style.display = 'block';}function goodInputs() {        df = document.forms;        function myonfocus(el,elval) {                el.onblur  = function fun() {if (el.value == "") el.value = elval};                el.onfocus = function fun() {if (el.value == elval) el.value=""};        }        for (i=0; i<=df.length-1; i++) {                dfe=df[i].elements;                for (j=0; j<=dfe.length-1; j++)                        if (dfe[j].type == 'text') myonfocus(dfe[j], dfe[j].value);        }}function submitForm(formName) {	if(formName=='leasingForm1')	{		var forma = document.leasingForm1;	}	if(formName=='leasingForm2')	{		var forma = document.leasingForm2;	}	if(formName=='leasingForm3')	{		var forma = document.leasingForm3;	}	if(formName=='leasingForm4')	{		var forma = document.leasingForm4;	}	if(formName=='leasingForm6')	{		var forma = document.leasingForm6;	}	if(formName=='leasingForm7')	{		var forma = document.leasingForm7;	}	if(formName=='leasingForm8')	{		var forma = document.leasingForm8;	}	if(formName=='leasingForm9')	{		var forma = document.leasingForm9;	}		if(forma.phone && (forma.phone.value == '' || forma.phone.value == 'Введите')) {	alert('Пожалуйста укажите контактный телефон');	return;	}	if (forma.email && (( forma.email.value == "" || forma.email.value == 'Введите') || ( forma.email.value.search("@") == -1 ) || ( forma.email.value.search("[.*]" ) == -1 ) ) ) {	alert( 'Пожалуйста заполните правильно поле "E-mail"' );	return;	}	if(forma.contactName && (forma.contactName.value == '' || forma.contactName.value == 'Введите')) {	alert('Пожалуйста укажите контактное лицо');	return;	}	if(forma.tel && (forma.tel.value == '' || forma.tel.value == 'Введите')) {	alert('Заполните поле "Контактный телефон"');	return;	}	if(forma.region && (forma.region.value == ''  || forma.region.value == 'Введите')) {	alert('Заполните поле "Город"');	return;	}	if(forma.country && (forma.country.value == '' || forma.country.value == 'Введите')) {	alert('Заполните поле "Страна"');	return;	}	forma.submit();}window.onload = function (){	goodInputs();};
