public static function slashJS($string, $extended = FALSE, $char = "'") {
		if ($extended) {
			$string = str_replace("\\", "\\\\", $string);
		}
		return str_replace($char, "\\" . $char, $string);
	}