isIE = ((/MSIE/i).test(navigator.appVersion));
function addEvent(el, event, fn) {if (isIE) el.attachEvent('on'+event,fn); else el.addEventListener(event,fn,false);}
function $(p){return document.getElementById(p)}

function inpFocus(el,elval) {
	el.onblur  = function fun() {if (el.value == "") el.value = elval;}
	el.onfocus = function fun() {if (el.value == elval) el.value="";};
}

// ==============================
addEvent (window, 'load', init0);
function init0() {
	// init Inputs
	var fms = document.forms;
	for (i=0; i<fms.length; i++) {
		var inps = fms[i].elements;
		if (fms[i].className != 'sended') {
			for (j=0; j<inps.length; j++) {
				if ((inps[j].type == 'text') || (inps[j].type == 'password')) inpFocus(inps[j], inps[j].value);
				if (inps[j].type == 'textarea') inpFocus(inps[j], inps[j].innerHTML);
			}
		}
	}
}