var
IE  = navigator.userAgent.indexOf('MSIE') != -1,
IE6 = navigator.userAgent.indexOf('MSIE 6') != -1,
IE7 = navigator.userAgent.indexOf('MSIE 7') != -1,
IE8 = navigator.userAgent.indexOf('MSIE 8') != -1;

isset = function(v){ 
	return typeof v != "undefined";
}
extractNumber = function(value){
	var n=parseInt(value);
	return n==null||isNaN(n)?0:n;
}
ComputedStyle = function(e,v){
	if(typeof e == 'string')
		e=document.getElementById(e);
		
	return e.currentStyle?e.currentStyle[v]:document.defaultView.getComputedStyle(e,null).getPropertyValue(v);
}
/* From prototype.js */
if(!document.getElementsByClassName){
	document.getElementsByClassName = function(className){
		var children = document.getElementsByTagName('*') || document.all;
		var elements = new Array();
	  
		for(var i = 0; i < children.length; i++){
			var child = children[i];
			var classNames = child.className.split(' ');
			for(var j = 0; j < classNames.length; j++){
				if(classNames[j] == className){
					elements.push(child);
					break;
				}
			}
		}
		return elements;
	}
}

var timer = {
    start:function (){
		d=null,time=null;
        d = new Date();
        time  = d.getTime();
    },
    end:function (){
        d = new Date();
        return (d.getTime()-time);
    }
}