function init_onclick(){
	// =========== tu wpisz takie stringi, które beda wyczyszczone po kliknieciu... =============
	var del_string = new Array("Search...", "Newsletter. Add Your e-mail...");

	var i, j, e=document.getElementsByTagName('input');
	for(i=0; i<e.length; i++){
		e[i].onfocus=function(){
			val=this.value;
			for(j=0; j<del_string.length; j++){
				if(val==del_string[j]){
					// ============ rozne przykladowe triki: ===========
					// this.style.backgroundColor='#ddf';
					// this.style.color='#000';
					// this.style.cursor='pointer';
					// alert('alert na onclick');
					this.value='';
				}
			}
		}

		// ustawienie domyslnych wartosci dla inputow przy wychodzeniu z nich gdy user nic nie wpisal. teksty sa przypisywane na podstawie atrybutu 'name'
		e[i].onblur=function(){
			val=this.value;
			name=this.name;
			if(val==''){
				switch(name){
					case 'sphrase':
						this.value='Search...';
						break;
					case 'email':
						this.value='Newsletter. Add Your e-mail...';
						break;
					default:
						this.value='';
				}
			}
		}
	}
}


function changeType (input, newType){
	if(input.type=='text'){
		if (input.parentNode != null){
			var oldSibling = input.nextSibling;
			var parentNode = input.parentNode;
			parentNode.removeChild(input);
			var newInput = input.cloneNode(true);
			newInput.type = newType;
			parentNode.insertBefore(newInput, oldSibling);
			newInput.value='';
		} else {
			input.type = newType;
		}
	}
} 
function change_type(id){
	el=document.getElementById('login_passwd');
	//el.value='';
	//el.type='password';
	setType(el,'password');
}

function setType(oElem, bPassword) {
  try {
    oElem.type = bPassword? "password" : "text";
  }
  catch(oErr1) {
    var sNewHTML = "<input type=\"" + (bPassword? "password" : "text")
                 + "\" value=\"" + oElem.value + "\" class=\""
                 + oElem.className + "\" name=\"" + oElem.name + "\">";
    try {
      var oNewElem = oElem.parentElement.replaceChild(
        document.createElement(sNewHTML),
        oElem
      );
    }
    catch(oErr2) {
    }
  }
} 
