//<script>

	var 
		IE = new Number(document.all ? 1 : 0);

	function error_handler(msg, url, line) {

		var str_error = "Javascript error:\n\n" + msg + "\nLine " + line + "\n" + url + "\n\n";
		//alert(str_error);

		if (IE==1)
			event.returnValue = null;
	return true;
	};

//	window.onerror = error_handler;
	
	function getEl(id) {
		var el;
		try {
		 	el = document.getElementById(id);
			return el;
		} catch(e) {
		} 
	};

	function add_propertie(id, prop, value, doc) {
		if (!doc) doc = document;
		doc.getElementById(id)[prop] += value;
	};

	function set_propertie(id, prop, value, doc) {
		if (!doc) doc = document;
		try {
			doc.getElementById(id)[prop] = value;
		} catch(e)  {
			//alert(id + '\n' + prop + '="'+value+'"');
		}
	};

	function get_propertie(id, prop, doc) {
		if (!doc) doc = document;
		return doc.getElementById(id)[prop];
	};

	function set_display(id, value, doc) {
		if (!doc) doc = document;
		var el = doc.getElementById(id);
		//if ((navigatorOpera==1 || navigatorFirefox==1) && (value=='block'))			value = 'inline-block';
		try {
			el.style.display = value;
		} catch(e) {
			if (value=='table')
				el.style.display = 'block';
		}
	};

	function get_display(id, doc) {
		if (!doc) doc = document;
		return doc.getElementById(id).style.display;
	};
 
	function set_visibility(id, value, doc) {
		//if (document.getElementById(id).style.visibility != value)
		if (!doc) doc = document;
		try {
		doc.getElementById(id).style.visibility = value;
	 	} catch(e) { /*alert(e.description + ' id:' + id);*/ }
	};

	function get_visibility(id, doc) {
		if (!doc) doc = document;
		return doc.getElementById(id).style.visibility;
	};
 
	function change_src(objeto, nsrc, doc) {
		if (IE==0)
			set_propertie(objeto, 'src', '', doc);
		set_propertie(objeto, 'src', nsrc, doc);
	};

	function cancelEvent(evt){
		if (evt) {
			evt.returnValue = false;
			evt.cancelBubble = true;
			if (typeof(evt.stopPropagation)!='undefined')
				evt.stopPropagation();
			if (typeof(evt.preventDefault)!='undefined')
				evt.preventDefault();	
		}
		return false;
	};
	

