// dz
function log(value, type, cls)
{
	if(typeof(console) == 'object') {

		if(cls && typeof(console.clear) == 'function') console.clear();
		
		switch(type) {
			case 'info': {
				if(typeof(console.info) == 'function') console.info(value);
				break;
			}
			case 'warn': {
				if(typeof(console.warn) == 'function') console.warn(value);
				break;
			}
			case 'error': {
				if(typeof(console.error) == 'function') console.error(value);
				break;
			}
            case 'group': {
                if(typeof(console.group) == 'function') console.group(value);
                break;
            }
            case 'groupEnd': {
                if(typeof(console.groupEnd) == 'function') console.groupEnd();
                break;
            }
			default: {
				if(typeof(console.debug) == 'function') console.debug(value);
			}
		}
	}
}

