public static function addFile($file, $type = '')
    {
        
		if(empty($type)){
			if(preg_match("/\.".tao_helpers_Scriptloader::CSS."$/", $file)){
				$type = tao_helpers_Scriptloader::CSS;
			}
			if(preg_match("/\.".tao_helpers_Scriptloader::JS."$/", $file)){
				$type = tao_helpers_Scriptloader::JS;
			}
		}
		switch(strtolower($type)){
			case tao_helpers_Scriptloader::CSS: self::$cssFiles[] = $file; break;
			case tao_helpers_Scriptloader::JS:  self::$jsFiles[]  = $file; break;
			default:
				throw new Exception("Unknown script type for file : ".$file);
		} 
        
    }