var smartinput_values = new Array();
function smartinput(id,default_value) {	smartinput_values[id] = default_value;
	obj = document.getElementById(id);
	if (obj !== null) {		if (obj.type == "text" || obj.type == "password") {			obj.className = "inactive_input";
			obj.value = default_value;
			obj.title = default_value;
			obj.onmouseover = function() { if (this.value == smartinput_values[this.id]) this.className = "active_input"; };
			obj.onmouseout = function() { if (this.value == smartinput_values[this.id]) this.className = "inactive_input"; };
			obj.onfocus = function() { if (this.value == smartinput_values[this.id]) { this.className = "active_input"; this.value = ""; } };
			obj.onblur = function() { if (this.value == '') { this.value = smartinput_values[this.id]; this.className = "inactive_input";}};		}	}}
// another smart feature: alt tags for images are converted into title for better usability
function smartimagesalt() {	img_objs = document.getElementsByTagName('img');
	if (img_objs.length > 0) {		for(i=0;i<img_objs.length;i++) {   			if (img_objs[i].alt != "" && img_objs[i].title == "")
				img_objs[i].title = img_objs[i].alt;
		}	}
}