function switchForm( BlockName ){
	if( "sfProducts" == BlockName ){
		document.getElementById( "sfProducts" ).className = "visibility_on";
		document.getElementById( "sfInfo" ).className = "visibility_off";
		document.getElementById( "sfBG" ).className = "search_product_bg";
	}
	if( "sfInfo" == BlockName ){
		document.getElementById( "sfProducts" ).className = "visibility_off";
		document.getElementById( "sfInfo" ).className = "visibility_on";
		document.getElementById( "sfBG" ).className = "search_info_bg";
	}
	if( "sfMain" == BlockName ){
		document.getElementById( "sfMain" ).className = "visibility_on";
		document.getElementById( "sfInternet" ).className = "visibility_off";
	}
	if( "sfInternet" == BlockName ){
		document.getElementById( "sfInternet" ).className = "visibility_on";
		document.getElementById( "sfMain" ).className = "visibility_off";
	}
	if( "sfInternet_index" == BlockName ){
		document.getElementById( "sfInternet_index" ).className = "visibility_on";
		document.getElementById( "sfInternet_index_switcher" ).className = "switcher_on";
		document.getElementById( "sfUkraine_index" ).className = "visibility_off";
		document.getElementById( "sfUkraine_index_switcher" ).className = "switcher_off";
		document.getElementById( "sfMain_index" ).className = "visibility_off";
		document.getElementById( "sfSite_index_switcher" ).className = "switcher_off";
	}
	if( "sfUkraine_index" == BlockName ){
		document.getElementById( "sfInternet_index" ).className = "visibility_off";
		document.getElementById( "sfInternet_index_switcher" ).className = "switcher_off";
		document.getElementById( "sfUkraine_index" ).className = "visibility_on";
		document.getElementById( "sfUkraine_index_switcher" ).className = "switcher_on";
		document.getElementById( "sfMain_index" ).className = "visibility_off";
		document.getElementById( "sfSite_index_switcher" ).className = "switcher_off";
	}
	if( "sfMain_index" == BlockName ){
		document.getElementById( "sfInternet_index" ).className = "visibility_off";
		document.getElementById( "sfInternet_index_switcher" ).className = "switcher_off";
		document.getElementById( "sfUkraine_index" ).className = "visibility_off";
		document.getElementById( "sfUkraine_index_switcher" ).className = "switcher_off";
		document.getElementById( "sfMain_index" ).className = "visibility_on";
		document.getElementById( "sfSite_index_switcher" ).className = "switcher_on";
	}
}

function ChangeSearchInput( FieldName, Act ){
	if( "q" == FieldName ){
		if( "on" == Act ){
			document.getElementById( "sfInternet_index_input" ).value = "";
			document.getElementById( "sfInternet_index_input" ).className = "sfInternet_index_on";
		}
		if( "off" == Act ){
			if( "" == document.getElementById( "sfInternet_index_input" ).value ){
				document.getElementById( "sfInternet_index_input" ).value = "Введите запрос";
				document.getElementById( "sfInternet_index_input" ).className = "sfInternet_index_off";
			}
		}
	}
	if( "s_str" == FieldName ){
		if( "on" == Act ){
			document.getElementById( "sfMain_index_input" ).value = "";
			document.getElementById( "sfMain_index_input" ).className = "sfMain_index_on";
		}
		if( "off" == Act ){
			if( "" == document.getElementById( "sfMain_index_input" ).value ){
				document.getElementById( "sfMain_index_input" ).value = "Введите запрос";
				document.getElementById( "sfMain_index_input" ).className = "sfMain_index_off";
			}
		}
	}
}

function checkEmailFormat( objForm, fieldEmail ) {
	var email = objForm.elements[fieldEmail].value;
	if( "" != email ){
		emailTest = "^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$";
		var regex = new RegExp( emailTest );
		if( !regex.test( email ) || !( email.length > 0 ) ){
			alert( "Поле \"Ваш e-mail\" заполнено некорректно!" );
			return false;
		}else{
			return true;
		}
	}else{
		alert( "Поле \"Ваш e-mail\" не заполнено!" );
		return false;
	}
}

function ShowMainFormComment(){
	document.getElementById( "divCommentForm" ).className = "visibility_on";
}
function ShowFormComment( id ){
	document.getElementById( "comment" + id ).className = "visibility_on";
}
function HideFormComment( id ){
	document.getElementById( "comment" + id ).className = "visibility_off";
}