I've got the function below which replaces greek letters with a similar 'normal' letter. However, a few browsers don't really like this code (IE). I imagine its because of the greek letters in the code.
How can I do this without breaking js?
function string_to_url(string) {
replace = new Array('á','Á','é','É','í','Í','ó','Ó','ú','Ú','ü','Ü','ö','Ö','õ','Õ','û','Û','¾','š','è','ž','ý','ô','ä','ò','å','¼','Š','È','Ž','Ý','Ò','Å','ì','Ì','ê','Æ','æ','Ø','ø');
replace_n = new Array('a','A','e','E','i','I','o','O', 'u','U','u','U','o','O','o','O','u','U','l','s','c','z','y','o','a','n','a','l','s','C','Z','Y','N','A','e','E','e','AE', 'ae','O','o');
for (var i = 0; i < replace.length; i++) {
string = string.replace(replace[i], replace_n[i]);
}
return string;
}