main.events.onload.addEvent(function () {
	var addFlush = new function () {
		
		var ids	= [];
			ids.push('vacancy_form');

		var init = function () {
			if (ids.length > 0) {
				for ( var i in ids ) {
					if (document.getElementById(ids[i]))
						addFlush(document.getElementById(ids[i]));
				}
			}
		};

		var addFlush = function (form) {
			for ( var i in form.children ) {
				if (form.children[i].tagName !== undefined) {
					if (form.children[i].tagName.toLowerCase() == 'input') {

						if (form.children[i].type == 'text' || form.children[i].type == 'password') {

							form.children[i].onfocus = function () {
								if (this.value == this.defaultValue)
									this.value = '';
							};
							form.children[i].onblur = function () {
								if (this.value == '')
									this.value = this.defaultValue;
							}

						}

					} else if (form.children[i].tagName.toLowerCase() == 'textarea') {

						form.children[i].onfocus = function () {
							if (this.value == this.defaultValue)
								this.value = '';
						};
						form.children[i].onblur = function () {
							if (this.value == '')
								this.value = this.defaultValue;
						}

					}
				}
			}

		};

		init();
	}();

});
