function watermark(node){
	this.node = node;
	this.node.Parent = this;
	this.passwd = false;
	this.text = CB.getClassParameter(this.node, 'tekst', '').replace(/#/g, " ");
	if(this.nodeName == "INPUT"){
	    if(node.value != this.text){
	        this.node.className = this.node.className.replace(/\s?watermark/g, "");
	    }
	}else if(this.nodeName == "TEXTAREA"){
	    if(this.node.innerHTML != this.text){
		    this.node.className = this.node.className.replace(/\s?watermark/g, "");
		}
	}
	if(navigator.appName.indexOf('Microsoft') == -1){
		if(this.node.attributes['type'] != null && this.node.attributes['type'].value == 'password'){
			this.passwd = true;
			this.node.attributes['type'].value = 'text';
		}
	}
	this.node.onfocus = this.focus;
	this.node.onblur = this.blur;
}
	watermark.prototype.focus = function(){
		if(this.nodeName == "INPUT"){
			if(this.value == this.Parent.text){
				this.value = "";
			}
			if(this.Parent.passwd){
				this.attributes['type'].value = 'password';
			}
		}else if(this.nodeName == "TEXTAREA"){
			if(this.innerHTML == this.Parent.text){
				this.innerHTML = "";
			}
		}
		this.className = this.className.replace(/\s?watermark/g, "");
	}
	watermark.prototype.blur = function(){
		if(this.nodeName == "INPUT"){
			if(this.value == this.Parent.text || this.value == ""){
				this.value = this.Parent.text;
				this.className = this.className.replace(/\s?watermark/g, "");
		        this.className += " watermark"; 
				if(this.Parent.passwd){
					this.attributes['type'].value = 'text';
				}
			}
			
		}else if(this.nodeName == "TEXTAREA"){
			if(this.innerHTML == this.Parent.text || this.innerHTML == ""){
				this.innerHTML = this.Parent.text;
				this.className = this.className.replace(/\s?watermark/g, "");
		        this.className += " watermark"; 
			}
		}
		if(this.autosuggest){
		    setTimeout("this.autosuggest.hideSuggestions()", 200);
		}
	}