// --- First some global functions, without the doranjo namespace

/*
function obj(el) {
	if (typeof el == 'string') { el = document.getElementById(el); }
	return el;
	}
*/

/*
function obj_showhide(objid) {
	if (document.getElementById(objid)) {
		if (document.getElementById(objid).style.display == 'none') {
			document.getElementById(objid).style.display = 'block';
		} else {
			document.getElementById(objid).style.display = 'none';
			}
		}
	}
*/


doranjo.obj = function(el) {
	this.obj = null;
	
	alert(el);
	
	this.id = function() { alert('hello'); }
	
	/*
	if (typeof el == 'string') {
		if (document.getElementById()) {
			if (document.getElementById(el)) {
				this.obj = document.getElementById(el);
				alert('obj found');
				}
			else {
				alert('not found');
				}
			}
		}
	*/
	}
doranjo.obj.action = {
	'id' : function() { alert('hello'); }
	,'toggle' : function() {
		if (this.obj) {
			if (this.obj.style.display == 'none') { this.obj.style.display = 'block'; }
			else { this.obj.style.display = 'none'; }
		} else {
			doranjo.debug.add({
					'type': 'error'
					,'lib': 'obj'
					,'func': 'toggle'
					,'text': 'No object is assigned to this function'
					});
			}
		}
	}
