var _st = window.setTimeout;
window.setTimeout = function(fRef, mDelay)
{
 if(typeof fRef == 'function'){
  var argu = Array.prototype.slice.call(arguments,2);
  var f = (function(){ fRef.apply(null, argu); });
  return _st(f, mDelay);
 }
 return _st(fRef,mDelay);
}

function isset(variable)
{
	return typeof variable == 'undefined' ? false : true;
}

function getid(id)
{
	return document.getElementById(id);
}

function in_array(needle, haystack)
{
	if(typeof needle == 'string')
	{
		for(var i in haystack)
		{
			if(haystack[i] == needle)
			{
				return true;
			}
		}
	}
	return false;
}
function fetchOffset(obj)
{
	var left_offset = obj.offsetLeft;
	var top_offset = obj.offsetTop;
	while((obj = obj.offsetParent) != null)
	{
	  left_offset += obj.offsetLeft;
	  top_offset += obj.offsetTop;
	}
	return { 'left' :left_offset,'top':top_offset};
}

function getsize(obj)
{
	var w = obj.offsetWidth;
	var h = obj.offsetHeight;
	return {"width":w,"height":h};
}