function get_style_value(obj_id, attribut) {
	var obj_style;
	var obj = (!isObject(obj_id))?document.getElementById(obj_id):obj_id;
	if (document.body.currentStyle) {
        obj_style = obj.currentStyle;
    } else if (window.getComputedStyle) {
        obj_style = window.getComputedStyle(obj, null);
    }
    if(obj_style[attribut]=='auto' && attribut == 'height') {
    	return obj.offsetHeight;
    }
    return obj_style[attribut];
}

function set_style_value(obj_id, attribut, value) {
	var obj_style, obj;
	obj = (!isObject(obj_id))?document.getElementById(obj_id):obj_id;
	obj.style[attribut] = value;
}

function to_num(x) {
	if(isNaN(x)) {
		if(isString(x)) {
			x = x.substr(0, x.length-2);
		}
	}
	return parseInt(x);
}
function pause(ms) {
	var date = new Date();
	var curDate = null;
	do {
		curDate = new Date();
	}
	while(curDate-date < ms);
}
function clear_timeouts(type, obj_id) {
    if(top.timeouts[type][obj_id])
    for(key in top.timeouts[type][obj_id]) {
        window.clearTimeout(top.timeouts[type][obj_id][key]);
    }
    top.timeouts[type][obj_id] = null;
}
this.isString = function(obj) {
     return (isNative(obj) && (obj.constructor == String));
}
this.isUndefined = function(obj) {
     return (typeof(obj) == "undefined");
};
this.isNull = function(obj) {
     return ((typeof(obj) == "object") && (obj === null));
};
this.isNative = function(obj) { // returns true for every ECMA-object that is this global functions argument;
	return (!isUndefined(obj) && !isNull(obj) && (typeof(obj.constructor) == "function"));
};
this.isBoolean = function(obj) {
     return (isNative(obj) && (obj.constructor == Boolean));
};
this.isAlien = function(obj) {
  return (isObject(obj) && (typeof(obj.constructor) != "function"));
};
this.isNode = function(obj) {
  return (((isAlien(obj) && isUndefined(obj.prototype) && isUndefined(obj.constructor)) || (isNative(obj) && isUndefined(obj.prototype) && (obj.constructor == Object))) ? ((obj.nodeType&&obj.cloneNode) ? (true) : (false)) : (false));
};
this.isNumber = function(obj) {
  return (isNative(obj) && (obj.constructor == Number) && isFinite(obj));
};
this.isPrimitive = function(obj) {
  return (isString(obj) || isNumber(obj) || isBoolean(obj));
};
this.isObject = function(obj) {
  return (!isUndefined(obj) && !isNull(obj) && !isPrimitive(obj));
};
this.isDate = function(obj) {
  return (isNative(obj) && (obj.constructor == Date));
};
this.isError = function(obj) {
  return (isNative(obj) && (obj.constructor == Error));
};
this.isRegExp = function(obj) {
  return (isNative(obj) && (obj.constructor == RegExp));
};
this.isFunction = function(obj) {
  return (isNative(obj) && (obj.constructor == Function));
};
this.isArray = function(obj) {
  return (isNative(obj) && (obj.constructor == Array));
};
