var languages=new Array()
languages[0]="en"
languages[1]="zh-TW"
languages[2]="es"
languages[3]='ru'
languages[4]='nl'
languages[5]='pt-BR'
languages[6]='zh-CN'
languages[7]='fr'
languages[8]='he'
languages[9]='de'
languages[10]='pt-PT'
languages[11]='cs'
languages[12]='ro'
languages[13]='pl'
languages[14]='it'
languages[15]='fi'
languages[16]='tr'
languages[17]='id'
languages[18]='ja'
languages[19]='ko'
languages[20]='ca'
languages[21]='nb'
languages[22]='ar'
languages[23]='el'



//Check language setting

if(localStorage['language']==null){
localStorage['language']=navigator.language
}





//Translate options page.

function optionpage(){
 var lang = localStorage['language']

 if(lang.search('en')!='-1'){
  draw_title('Options')
 }else if(lang=='zh-TW'){
  draw_title('設定')
  document.title='設定'
  of.innerHTML='整點報時'
  ok.innerHTML='啟用整點報時! (將使用Desktop Notification)'
  ol.innerHTML='顯示該Notification︰'
  om.innerHTML='秒'
  on.innerHTML='(最大為999)'
  obj.innerHTML='開啓瀏覽器時顯示待辦事項'
  ox.innerHTML='顯示'
  oo.innerHTML='使用數字時鐘'
  op.innerHTML='(數字時鐘會使用一定數量的記憶體。)'
  oq.innerHTML='使用「黑暗模式」(選取後將會在圖示後加入一個半透明的圓圈，讓你看清楚些時間。)'
  or.innerHTML='使用指針時鐘'
  os.innerHTML='(每秒大約使用4K記憶體)'
  ot.innerHTML='不要使用滾動效果 (選後會以4個數字取代)'
  ou.innerHTML='使用12小時制 (預設為24小時制)'
  ov.innerHTML='在icon上顯示指針時鐘'
  ow.innerHTML='在圖示下顯示時間'
  oy.innerHTML='意見'
  oz.innerHTML='有意見? 錯誤報告?'
  oaa.innerHTML='動畫通常每幾秒便在舊圖畫上畫一幅新的圖畫上去，所以一定會使用大量的記億體。當然，我其實已經盡量減低了記憶體使用量。'
  obf.innerHTML='每次更新後顯示更新頁'
  obg.innerHTML='更新圖示每︰'
  obi.innerHTML='(時間愈長，暫存記憶體的使用量便愈少。)'
  seclist.options[0].text='1 秒'
  seclist.options[1].text='2 秒'
  seclist.options[2].text='5 秒'
  seclist.options[3].text='10 秒'
  seclist.options[4].text='30 秒'
  seclist.options[5].text='1 分鐘'
  obl.innerHTML="檢視已儲鬧鈴"
  obl.title="檢視已儲鬧鈴"
  document.getElementById('okandclose').value='確定'
  document.getElementById('okbutton').value='套用'
  document.getElementById('cancel').value='取消'
  document.getElementById('about').value='關於'
  document.getElementById('whznew').value='看看更新!'
  obp.innerHTML="無"
  obq.innerHTML="預設鈴聲"
  obr.innerHTML="來自網址"
  obs.innerHTML="所有用途的鈴聲"
  obt.innerHTML="鬧鐘與鈴聲"
 }else if(lang.search('es')!='-1'){
  draw_title('Opciones')
  document.title='Opciones'
  of.innerHTML='Notificación en el Escritorio'
  ok.innerHTML='Activar el Anuncio de la hora! (Notificación en el escritorio)'
  ol.innerHTML='Duración de la notificación en el escritorio:'
  om.innerHTML='segundos.'
  on.innerHTML='Máximo:999'
  ox.innerHTML='Mostrar'
  oo.innerHTML='Usar Reloj Digital'
  op.innerHTML='(Reloj digital utilizará una cierta cantidad de memoria.)'
  oq.innerHTML='Usar en modo para temas oscuros (Para los que usan temas oscuros, se agrega una burbuja semi-transparente para que puedan ver el reloj.)'
  or.innerHTML='Usar reloj analógico'
  os.innerHTML='(Al rededor de 4k por segundo.)'
  ot.innerHTML='No usar el efecto de rotación (Mostrar 4 números en vez de rotar)'
  ou.innerHTML='Usar sistema de 12 horas (Por defecto se usa el sistema de 24 horas)'
  ov.innerHTML='Mostrar reloj en icono (El que tiene las flechas)'
  ow.innerHTML='Mostrar hora en cajón.'
  oy.innerHTML='Comentar'
  oz.innerHTML='Algún comentario? Reportar un error?'
  oaa.innerHTML='La animación usualmente "dibuja" una nueva imagen por segundo, así que normalmente usa mucha memoria después de un tiempo. Estoy trabajando para reducirlo a lo mínimo.'
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Aplicar'
  document.getElementById('cancel').value='Cancelar'
  document.getElementById('about').value='Sobre'
  document.getElementById('whznew').value='Ver que hay nuevo en esta versión.'
 }else if(lang.search('ru')!='-1'){
  draw_title('Настройки')
  document.title='Настройки'
  of.innerHTML='Ежечасное оповещение'
  ok.innerHTML='Включить Ежечасное оповещение (Ежечасовое оповещение)'
  ol.innerHTML='Время отображения оповещения '
  om.innerHTML='секунд'
  on.innerHTML='максимальное значение'
  obj.innerHTML='Отображать напоминания о делах в оповещениях рабочего стола каждый раз, когда загружается браузер.'
  ox.innerHTML='Отображение'
  oo.innerHTML='Режим электронных часов'
  op.innerHTML='(Цифровые часы будет использовать определенный объем памяти)*'
  oq.innerHTML='Использовать тёмный режим (Включить если используете скин в тёмных тонах для Chrome)'
  or.innerHTML='Использовать обычный режим '
  os.innerHTML='(Около 4 Кб в секунду) *'
  ot.innerHTML='Не использовать режим прокрутки (Отображать 4 цифры вместо прокрутки)'
  ou.innerHTML='Использовать 12 часовую систему (По умолчанию 24)'
  ov.innerHTML='Отображать часы на иконке (аналоговые)'
  ow.innerHTML='Отображать на флажке (электронные под аналоговыми)'
  oy.innerHTML='Комментарий'
  oz.innerHTML='Хотите прокомментировать? Сообщить об ошибке?'
  oaa.innerHTML='Анимация "отрисовывает" новую картинку каждую секунду, поэтому через некоторое время начинают потреблять много памяти. Пытаюсь снизить этот эффект'
  obf.innerHTML='Уведомлять меня после каждого обновления этого расширения.'
  obg.innerHTML='Обновлять каждые:'
  obi.innerHTML='(Чем реже - тем меньше ресурсов требуют часы.)'
  seclist.options[0].text='1 секунду'
  seclist.options[1].text='2 секунды'
  seclist.options[2].text='5 секунд'
  seclist.options[3].text='10 секунд'
  seclist.options[4].text='30 секунд'
  seclist.options[5].text='1 минуту'
  obl.innerHTML="Просмотреть сохраненные будильники"
  obl.title="Просмотреть сохраненные будильники"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Применить'
  document.getElementById('cancel').value='Отмена'
  document.getElementById('about').value='примерно'
  document.getElementById('whznew').value='Посмотреть, что нового в этой версии.'
  obp.innerHTML="Нет"
  obq.innerHTML="Рингтон по умолчанию"
  obr.innerHTML="С внешнего источника (URL)"
  obs.innerHTML="Рингтон на любой выбор"
  obt.innerHTML="Будильник и рингтон"
 }else if(lang.search('nl')!='-1'){
  draw_title('Opties')
  document.title='Opties'
  of.innerHTML='Tijdnotificatie per uur'
  ok.innerHTML='Zet tijdnotificatie per uur aan! (Desktop notificatie)'
  ol.innerHTML='Hoe lang moet de notificatie worden weergegeven:'
  om.innerHTML='seconde'
  on.innerHTML='Maximum:999'
  ox.innerHTML='Geef weer'
  oo.innerHTML='Gebruik de digitale klok'
  op.innerHTML='(Waarschuwing: Gebruik van de digitale klok zal veel geheugen verbruiken.)'
  oq.innerHTML="Gebruik de 'Dark theme mode' (Voor diegene die de 'dark theme' gebruiken, zal een halftransparant bubbel onder de cijfers worden geplaatst, zodat je de tijd kunt zien.)"
  or.innerHTML='Gebruik de normale klok'
  os.innerHTML='Rond 4K per seconde'
  ot.innerHTML='Gebruik niet het scroll efeect (Geeft 4 nummers weer in plaats van te scrollen)'
  ou.innerHTML='Gebruik 12-uurs systeem (Standaard wordt het 24-uurs systeem gebruikt)'
  ov.innerHTML='Geef de klok weer op het icoon (Degene met de wijzers)'
  ow.innerHTML='Geef de tijd weer op de badge'
  oy.innerHTML='Reageer'
  oz.innerHTML='Heeft u een reactie? Wilt u een bug melden?'
  oaa.innerHTML='Animaties "tekenen" normaal gesproken een nieuw plaatje per seconde, dus over het algemeen zal het veel geheugen verbruiken terwijl ik het probeer tot het minumum te beperken.'
  obf.innerHTML='Laat de update pagina zien wanneer deze extentie is geüpdate'
  obg.innerHTML='Tijd om het icoon te updaten:'
  obi.innerHTML='(Hoe langer het is, des te lichter is de extentie)'
  seclist.options[0].text='1 seconde'
  seclist.options[1].text='2 seconden'
  seclist.options[2].text='5 seconden'
  seclist.options[3].text='10 seconden'
  seclist.options[4].text='30 seconden'
  seclist.options[5].text='1 minuut'
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Toepassen'
  document.getElementById('cancel').value='Annuleren'
  document.getElementById('about').value='Over'
  document.getElementById('whznew').value='Bekijk wat nieuw is in deze versie'
 }else if(lang=='pt-BR'){
  draw_title('Opções')
  document.title='Opções'
  of.innerHTML='Anúncio a cada hora'
  ok.innerHTML='Ative um anuncio de hora em hora!'
  ol.innerHTML='Tempo para mostrar a notificação'
  om.innerHTML='segundos'
  on.innerHTML='Maximo:999'
  ox.innerHTML='Mostrar'
  oo.innerHTML='Use relógio digital.'
  op.innerHTML='(Aviso: Usando relógio digital ira gastar um pouco de memória de seu computador.)*'
  oq.innerHTML='Use o modo tema Escuro (Para quem usa temos escuros, isto ira adicionar um pouco de transparência na bolha abaixo dos numeros para que você possa ver as horas.)'
  or.innerHTML='Usar relógio Normal'
  os.innerHTML='(Mais ou menos 4k por segundo.)*'
  ot.innerHTML='Não use i efeito de rolagem (Mostra 4 numeros enquanto rolando)'
  ou.innerHTML='Usar sistema de 12 horas (o padrão é o sistema de 24 horas)'
  ov.innerHTML='Mostre o relógio no icone (O relógio na seta)'
  ow.innerHTML='Tempo mostrado na barra'
  oy.innerHTML='Comentário'
  oz.innerHTML='Tem um comentario? Reporta um erro?'
  oaa.innerHTML='Animasoes geralmente "geram" uma nova imagem por segundo, então normalmente isto irá ocupar um pouco de memoria de seu computador após o perio de tempo que eu estou tentando reduzir para o menor.'
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Aplicar'
  document.getElementById('cancel').value='Cancelar'
  document.getElementById('about').value='Sobre'
  document.getElementById('whznew').value='Veja as novidades desta versão'
 }else if(lang=='zh-CN'){
  draw_title('选项')
  document.title='选项'
  of.innerHTML='整点报时'
  ok.innerHTML='使用整点报时！（桌面提醒）'
  ol.innerHTML='桌面提醒显示时间为︰'
  om.innerHTML='秒'
  on.innerHTML='(最长为999秒)'
  obj.innerHTML='浏览器运行时在桌面提醒待办事项。'
  ox.innerHTML='显示'
  oo.innerHTML='使用数字时钟'
  op.innerHTML='（数字时钟会占用一定的内存量。）'
  oq.innerHTML='使用黑暗主题模式（使用暗色调主题的人可选择此项。这会在图标下方加入一层半透明的图案，让图示更加清楚。）'
  or.innerHTML='使用指针时钟'
  os.innerHTML='（每秒大约消耗4KB内存）'
  ot.innerHTML='不使用滚动特效（显示4个数字，不显示其中的冒号）'
  ou.innerHTML='使用12小时制（默认为24小时制）'
  ov.innerHTML='在图标上显示指针时钟'
  ow.innerHTML='在图标下部显示时间'
  oy.innerHTML='意见'
  oz.innerHTML='想留言吗？提交错误？'
  oaa.innerHTML='动画通常会每秒便重新绘制一次，这样会在使用一段时间之后占用大量的内存。当然，我会尽可能的降低内存占用量。'
  obf.innerHTML='每次更新后显示更新页'
  obg.innerHTML='刷新图标的间隔时间：'
  obi.innerHTML='（设定时间越长，该插件占用的内存就越少。）'
  seclist.options[0].text='1 秒'
  seclist.options[1].text='2 秒'
  seclist.options[2].text='5 秒'
  seclist.options[3].text='10 秒'
  seclist.options[4].text='30 秒'
  seclist.options[5].text='1 分钟'
  obl.innerHTML="检视已储闹铃"
  obl.title="检视已储闹铃"
  document.getElementById('okandclose').value='确定'
  document.getElementById('okbutton').value='应用'
  document.getElementById('cancel').value='取消'
  document.getElementById('about').value='关于'
  document.getElementById('whznew').value='查看更新日志'
  obp.innerHTML="无"
  obq.innerHTML="预设铃声"
  obr.innerHTML="来自网址"
  obs.innerHTML="所有用途的铃声"
  obt.innerHTML="闹钟与铃声"
 }else if(lang.search('fr')!='-1'){
  draw_title('Options')
  document.title='Options'
  of.innerHTML='Annonce des heures'
  ok.innerHTML='Activer la notification des heures'
  ol.innerHTML="Temps pour l'affichage de l'annonce:"
  om.innerHTML='secondes.'
  on.innerHTML='Máximo:999'
  obj.innerHTML='Des alertes de tâches dans votre notification bureau quand vous lancez votre fureteur'
  ox.innerHTML='Affichage'
  oo.innerHTML="Utiliser l'horloge digitale"
  op.innerHTML="(Attention: Utiliser l'horloge numérique consommera beaucoup plus la mémoire de votre ordinateur.)"
  oq.innerHTML="Utilisez le mode Dark thème (Pour ceux qui utilisent un thème sombre,  ajoutera une bulle semi-transparente sous les numéros de sorte que vous pourrez voir l'heure.)"
  or.innerHTML="Utiliser l'horloge classique"
  os.innerHTML='(Environ 4K par seconde)'
  ot.innerHTML="N'utilisez pas d'effet de défilement (affichage de 4 chiffres au lieu du défilement)"
  ou.innerHTML='Utiliser le système 12 heures (valeur par défaut du système utilise 24 heures)'
  ov.innerHTML="Affichage de l'horloge sur l'icône (celle avec une flèche)"
  ow.innerHTML="Affichage de l'heure sur le badge"
  oy.innerHTML='Commentaire'
  oz.innerHTML='Vous avez un commentaire? Signaler un bug?'
  oaa.innerHTML="L'animation "+'"'+"dessine"+'"'+" habituellement une nouvelle image chaque seconde, donc normalement il va prendre beaucoup plus de mémoire après une période de temps cependant  je vais essayer de le réduire au plus bas."
  obf.innerHTML='Afficher la mise jour'
  obg.innerHTML="Rafraîchir le recouvrement d l'icône:"
  obi.innerHTML='(plus cette extension est longue,plus elle est légère.)'
  seclist.options[0].text='1 seconde'
  seclist.options[1].text='2 secondes'
  seclist.options[2].text='5 secondes'
  seclist.options[3].text='10 secondes'
  seclist.options[4].text='30 secondes'
  seclist.options[5].text='1 minute'
  obl.innerHTML="afficher les alarmes sauvées"
  obl.title="afficher les alarmes sauvées"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Appliquer'
  document.getElementById('cancel').value='Annuler'
  document.getElementById('about').value='À propos de'
  document.getElementById('whznew').value="Voir ce qu'il y a de nouveau dans cette version."
  obp.innerHTML="Non"
  obq.innerHTML="Sonnerie par défaut"
  obr.innerHTML="à partir du lien"
  obs.innerHTML="Sonnerie"
  obt.innerHTML="Alarme & Sonnerie"
 }else if(lang.search('he')!='-1'){
  draw_title('אפשרויות')
  document.title='אפשרויות'
  of.innerHTML='הכרזה שעתית'
  ok.innerHTML='הפעל הכרזה לפי שעה'
  ol.innerHTML='כמה זמן להציג הכרזה:'
  om.innerHTML='שניות'
  on.innerHTML='מקסימום:999'
  ox.innerHTML='הצג'
  oo.innerHTML='הישתמש בספרות דיגיטליות'
  op.innerHTML='אזהרה:שימוש בספרות דיגיטליות כרוך בשימוש רב של זיכרון המחשב'
  oq.innerHTML='מצב עיצוב כהה)למי שמישתמש בעיצוב כהה,יתוסף בועה חצויה מתחת לספרות כך שאפשר יהיה לראות את השעה)'
  or.innerHTML='שימוש בשעון רגיל-אנלוגי'
  os.innerHTML='4 ק"ב שניה '
  ot.innerHTML='אל תשתמש באפקט גלילה(תצוגת 4 ספרות במקום)י'
  ou.innerHTML='הישתמש במערכת של 12 שעות-ברירת מחדל היא 24'
  ov.innerHTML='עם החץ-הצג שעון באייקון'
  ow.innerHTML='הצג שעון בתיוג'
  oy.innerHTML='תגובה'
  oz.innerHTML='האם יש תגובה-דווח על באג'
  oaa.innerHTML='"אנימציה בדר כלל גוזלת הרבה זיכרון מערכת,'
  document.getElementById('okandclose').value='בסדר'
  document.getElementById('okbutton').value='מסכים'
  document.getElementById('cancel').value='ביטול'
  document.getElementById('about').value='אודות'
  document.getElementById('whznew').value='הצג פרטים חדשים בגירסה זו'
 }else if(lang.search('de')!='-1'){
  draw_title('Optionen')
  document.title='Optionen'
  of.innerHTML='Stündliche Zeitansage'
  ok.innerHTML='Stündliche Zeitanzeige (Desktop Pop Up)'
  ol.innerHTML='Anzeigedauer der Desktop Zeitanzeige'
  om.innerHTML='Sekunden'
  on.innerHTML='maximal:999'
  ox.innerHTML='Anzeige'
  oo.innerHTML='Gebrauche Digitaluhr'
  op.innerHTML='Achtung: Digital Anzeige verbraucht viel Arbeitsspeicher'
  oq.innerHTML='Im dark theme Modus anzeigen. (Für jene, die dunkle Browser Themes nutzen, es wird ein halb-transparenter Hintergrund hinter der Zeitanzeige erzeugt, um die Zeitanzeige besser zu sehen.)'
  or.innerHTML='Gebrauche Analog Uhr'
  os.innerHTML='(Ungefähr 4k pro Sekunde)'
  ot.innerHTML='Kein scroll Effekt (Anzeige von 4 Ziffern anstelle vom Automatischen scrollen)'
  ou.innerHTML='12 Stunden Anzeige (AM/PM) (Standard ist 24 Stunden Anzeige)'
  ov.innerHTML='Zeitanzeige mit Icon (Das mit Pfeil)'
  ow.innerHTML='Zeitanzeige mit kleinen roten Hintergrund'
  oy.innerHTML='Kommentare'
  oz.innerHTML='Haben Sie etwas zu kommentieren? Störung zu melden? Bug Report?'
  oaa.innerHTML='Animation "zeichnet" normalerweise ein neues Bild pro Sekunde, so wird nach einer Weile eine Menge Arbeitsspeicher verbraucht. Ich versuche es so niedrig wie nötig zu reduzieren.'
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Übernehmen'
  document.getElementById('cancel').value='Abbrechen'
  document.getElementById('about').value='Über Chrome Clock'
  document.getElementById('whznew').value='Was ist neu in dieser Version?'
 }else if(lang=='pt-PT'){
  draw_title('Opções')
  document.title='Opções'
  of.innerHTML='Notificação das horas'
  ok.innerHTML='Ligar notificações da hora (hora a hora)'
  ol.innerHTML='Tempo para mostrar a notificação'
  om.innerHTML='segundos'
  on.innerHTML='(Máximo 999)'
  ox.innerHTML='Mostrar'
  oo.innerHTML='Relógio Analógico'
  op.innerHTML='(Atenção: ao usar relógio digital, vão ser usados mais recursos no PC)'
  oq.innerHTML='Para temas negros (Aparece uma bolha semi-transparente para facilitar a leitura da hora)'
  or.innerHTML='Usar relógio analógico'
  os.innerHTML='(Cerca de 4K por seg.)'
  ot.innerHTML='Não usar efeito "scroll" (Mostra 4 números'
  ou.innerHTML='Sistema de 12 horas (Predefinido: 24)'
  ov.innerHTML='Mostrar relógio no icon (analógico)'
  ow.innerHTML='Mostrar horas no icon (digital)'
  oy.innerHTML='Comentar'
  oz.innerHTML='Comentários? Bug?'
  oaa.innerHTML='a animação vai mostrar uma imagem nova por segundo, por isso, mais mem+oria vai ser ocupada'
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Aplicar'
  document.getElementById('cancel').value='Cancelar'
  document.getElementById('about').value='Sobre'
  document.getElementById('whznew').value='Nova versão'
 }else if(lang.search('cs')!='-1'){
  draw_title('Možnosti')
  document.title='Možnosti'
  of.innerHTML='Hodinové upozornění'
  ok.innerHTML='Zapnout hodinové upozornění! (Upozornění na plochu)'
  ol.innerHTML='Čas upozornění:'
  om.innerHTML='sekund.'
  on.innerHTML='(Maximálně:999)'
  ox.innerHTML='Zobrazení'
  oo.innerHTML='Použij digitální hodiny'
  op.innerHTML='(Upozornění: Použití digitálních hodin zabírá hodně počítačové paměti.)'
  oq.innerHTML='Použij režim pro tmavé pozadí (Pokud máte tmavé pozadí pod hodinami, přidá světlou bublinu pod čísla, aby byla čitelná.)'
  or.innerHTML='Použij analogové hodiny'
  os.innerHTML='(Asi 4K za sekundu.)'
  ot.innerHTML='Nepoužívej rolovací efekt (Ukáže 4 čísla místo rolování)'
  ou.innerHTML='Použij 12 hodinový systém (Ve výchozím nastavení je použit 24 hodinový systém)'
  ov.innerHTML='Zobrazuj ikonu hodin (ta se šipkou)'
  ow.innerHTML='Zobrazuj čas na ikonce'
  oy.innerHTML='Komentář'
  oz.innerHTML='Chceš poslat komentář nebo nahlásit chybu? Klikni zde!'
  oaa.innerHTML='Animace obvykle vykresluje nový obrázek za sekundu, takže normálně zabere hodně paměti, ačkoli se snažím ji snížit na minimum.'
  obf.innerHTML='Ukázat stránku s aktualizací pokaždé, když je tento doplněk aktualizován.'
  obg.innerHTML='Frekvence aktualizace ikony:'
  obi.innerHTML='(Čím delší, tím méně paměti tento doplněk zabere.)'
  seclist.options[0].text='1 sekunda'
  seclist.options[1].text='2 sekundy'
  seclist.options[2].text='5 sekund'
  seclist.options[3].text='10 sekund'
  seclist.options[4].text='30 sekund'
  seclist.options[5].text='1 minuta'
  obl.innerHTML="Ukaž uložené alarmy"
  obl.title="Ukaž uložené alarmy"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Použít'
  document.getElementById('cancel').value='Zrušit'
  document.getElementById('about').value='O doplňku'
  document.getElementById('whznew').value='Co je nového v této verzi.'
  obp.innerHTML="Žádné"
  obq.innerHTML="Výchozí vyzvánění"
  obr.innerHTML="Z URL"
  obs.innerHTML="Vyzvánění dle výběru"
  obt.innerHTML="Upozornění a vyzvánění"
 }else if(lang.search('ro')!='-1'){
  draw_title('Optiuni')
  document.title='Optiuni'
  of.innerHTML='Notificare continua'
  ok.innerHTML='Activeaza Notificarea Continua(1h) (notificare in desktop)'
  ol.innerHTML='Durata afisarii notificarii'
  om.innerHTML='secunde'
  on.innerHTML='(maxim:999)'
  obj.innerHTML='De alertă pentru a-do în notificarea pe desktop atunci când rulaţi browser-ul.'
  ox.innerHTML='Afisaz'
  oo.innerHTML='Foloseste Ceasul Digital'
  op.innerHTML='(Avertisment: Folosind Ceasul Digital(Digital Clock) va utiliza resurse semnificative din memoria RAM)'
  oq.innerHTML='Foloseste tema Inchis(Dark)<br>(Pentru cei care folosesc aceasta tema, un balon semi-transparent va fi adaugat sub numere pentru a se putea vedea timpul)'
  or.innerHTML='Foloseste Ceasul Analog'
  os.innerHTML='(Aproximativ 4K pe secunda)'
  ot.innerHTML='Nu folosi efectul scroll. (Afiseaza 4 numbere in schimb.) '
  ou.innerHTML='Foloseste systemul de 12 ore. (Setarile de baza folosesc system de 24 de ore: 0:00 - 23:59)'
  ov.innerHTML='Afiseaza ceasul pe icoana(cel cu aratatoare)'
  ow.innerHTML='Afiseaza timpul pe insigna (cea rosie).'
  oy.innerHTML='Observatie'
  oz.innerHTML='O observatie? Raportezi o eroare? Apasa aici!'
  oaa.innerHTML='Animatia extrage o noua imagine fiecare secunda, deci va necesita resurse de memorie. Eforturi sunt depuse in incercarea de a reduce acest consum. '
  obf.innerHTML='Arata pagina de actualizari de fiecare data cand extensia a fost actualizata. '
  obg.innerHTML='Reimprospateaza icoana in fiecare: '
  obi.innerHTML='(Cu cat durata este mai mare, cu atat mai putine resurse vor fi folosite. )'
  seclist.options[0].text='1 secunda'
  seclist.options[1].text='2 secunde'
  seclist.options[2].text='5 secunde'
  seclist.options[3].text='10 secunde'
  seclist.options[4].text='30 secunde'
  seclist.options[5].text='1 minut'
  obl.innerHTML="Vezi salvate alarme"
  obl.title="Vezi salvate alarme"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Aplica'
  document.getElementById('cancel').value='Anuleaza'
  document.getElementById('about').value='Despre'
  document.getElementById('whznew').value='Vezi ce e nou in aceasta versiune.'
 }else if(lang.search('pl')!='-1'){
  draw_title('Opcje')
  document.title='Opcje'
  of.innerHTML='Powiadomienie co godzinę'
  ok.innerHTML='Włącz powiadomienie co godzinę! (na pulpicie)'
  ol.innerHTML='Czas wyświetlania powiadomienia'
  om.innerHTML='sekund.'
  on.innerHTML='(Maksymalnie:999)'
  obj.innerHTML='Ostrzeżenie na powiadomieniu na pulpicie w przypadku gdy przeglądarka jest uruchomiona.'
  ox.innerHTML='Wyświetlacz'
  oo.innerHTML='Użyj cyfrowego zegara'
  op.innerHTML='(Ostrzeżenie: Używanie cyfrowego zegara może wymagać dużych zasobów pamięci operacyjnej Twojego komputera)'
  oq.innerHTML='Uaktywnij ciemną wersję (Opcja przydatna dla tych, którzy używają ciemnego motywu.)'
  or.innerHTML='Użyj zegara analogowego'
  os.innerHTML='(Około 4000 na sekundę)'
  ot.innerHTML='Nie używaj efektu przewijania (Wyświetla 4 cyfry zamiast przewijania)'
  ou.innerHTML='Użyj zapisu 12-godzinnego (Domyślnie ustawiony jest zapis 24-godzinny)'
  ov.innerHTML='Wyświetlaj zegar na ikonie (Ze strzałką)'
  ow.innerHTML='Wyświetlaj zegar na tabliczce'
  oy.innerHTML='Komentarz'
  oz.innerHTML='Chcesz skomentować? Zgłosić błąd? Kliknij tutaj!'
  oaa.innerHTML='Animacja zwykle "rysuje" nowy obrazek co sekundę, więc normalnie proces ten będzie miał zapotrzebowanie na zasoby Twojego komputera.'
  obf.innerHTML='Pokaż stronę uaktualnienia po każdorazowym uaktualnieniu rozszerzenia.'
  obg.innerHTML='Odśwież ikonę co:'
  obi.innerHTML='(Im dłuższy, tym bardziej jasne jest rozszerzenie)'
  seclist.options[0].text='1 sekunda'
  seclist.options[1].text='2 sekundy'
  seclist.options[2].text='5 sekund'
  seclist.options[3].text='10 sekund'
  seclist.options[4].text='30 sekund'
  seclist.options[5].text='1 minuta'
  obl.innerHTML="Zobacz zapisane alarmy"
  obl.title="Zobacz zapisane alarmy"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Zatwierdź'
  document.getElementById('cancel').value='Porzuć'
  document.getElementById('about').value='O autorze'
  document.getElementById('whznew').value='Wyświetl co nowego w tej wersji rozszerzenia!'
 }else if(lang.search('it')!='-1'){
  draw_title('Opzioni')
  document.title='Opzioni'
  of.innerHTML='Notifiche orarie'
  ok.innerHTML='Attiva le notifiche orarie! (Notifiche al desktop)'
  ol.innerHTML='Durata della visualizzazione della notifica: '
  om.innerHTML='secondi.'
  on.innerHTML='(Massimo:999)'
  obj.innerHTML='Mostra to-do sulle notifiche del desktop mentre il browser è in esecuzione.'
  ox.innerHTML='Mostra'
  oo.innerHTML='Usa orologio digitale'
  op.innerHTML="(Attenzione: usare l'orologio digitale potrebbe richiedere molta memoria del tuo pc.)"
  oq.innerHTML='Usa tema scuro (Per coloro che usano un tema scuro, aggiunge uno sfondo chiaro dietro le cifre, così è possibile visualizzarle.)'
  or.innerHTML='Usa orologio analogico'
  os.innerHTML='(Circa 4k per secondo.)'
  ot.innerHTML="Non usare l'effetto scorrimento (Mostra 4 cifre invece eseguire lo scorrimento)"
  ou.innerHTML="Usa sistema da 12 ore (L'impostazione predefinita utilizza 24 ore)"
  ov.innerHTML="Mostra l'orologio sull'icona (Quella con la freccia)"
  ow.innerHTML="Mostra l'ora digitale davanti all'orologio analogico"
  oy.innerHTML='Commento'
  oz.innerHTML='Hai un commento? Vuoi segnalare un bug? clicca qui!'
  oaa.innerHTML="Le animazioni normalmente disegnano una nuova immagine per secondo, questo normalmente occupa molta memoria dopo un po' di tempo. Sto provando a ridurlo al minimo indispensabile."
  obf.innerHTML='Mostra la pagina informativa dopo ogni aggiornamento.'
  obg.innerHTML="Aggiorna l'icona ogni:"
  obi.innerHTML='(Ad intervalli lunghi corrisponde meno risorse utilizzate.)'
  seclist.options[0].text='1 secondo'
  seclist.options[1].text='2 secondi'
  seclist.options[2].text='5 secondi'
  seclist.options[3].text='10 secondi'
  seclist.options[4].text='30 secondi'
  seclist.options[5].text='1 minuto'
  obl.innerHTML="Vedi salvato allarmi"
  obl.title="Vedi salvato allarmi"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Applica'
  document.getElementById('cancel').value='Annulla'
  document.getElementById('about').value='About'
  document.getElementById('whznew').value='Vedi quali sono le novità in questa versione!'
 }else if(lang.search('fi')!='-1'){
  draw_title('Asetukset')
  document.title='Asetukset'
  of.innerHTML='Jokatuntinen ajan ilmoitus'
  ok.innerHTML='Ota käyttöön jokatuntinen ajan ilmoitus! (Työpöytäilmoitus)'
  ol.innerHTML='Kuinka kauan ilmoitus näytetään?'
  om.innerHTML='sekuntia'
  on.innerHTML='(Suurin arvo:999)'
  obj.innerHTML='Hälytä tehtävistä työpöytäilmoituksessa selaimen ollessa päällä.'
  ox.innerHTML='Näytä'
  oo.innerHTML='Käytä digitaalista kelloa'
  op.innerHTML='(Varoitus: Digitaalisen kellon käyttäminen vie enemmän muistia kuin analogisen.)'
  oq.innerHTML='Käytä tummaa teemaa (Heille, jotka käyttävät tummaa teemaa, tämä lisää puolinäkymättömän kuplan numeroiden alle jotta ajan näkeminen on helpompaa)'
  or.innerHTML='Käytä analogista kelloa'
  os.innerHTML='(Noin 4 KB sekunnissa.)'
  ot.innerHTML='Älä käytä rullausefektiä (Näyttää 4 numeroa rullamisen sijaan)'
  ou.innerHTML='Käytä 12 tunnin kelloa (Oletus on 24 tunnin kello)'
  ov.innerHTML='Näytä kello kuvakkeessa'
  ow.innerHTML='Näytä aika kellon alla'
  oy.innerHTML='Kommentti'
  oz.innerHTML='Kommentteja? Raportoi bugista? Paina tästä!'
  oaa.innerHTML='Yleensä animaatio "piirtää" uuden kuvan joka sekunti, joten normaalisti se vie paljon muistia jonkin ajan sisällä, sillä aikaa kun yritän pienentää sitä.'
  obf.innerHTML='Näytä päivityssivu jokaisen lisäosan päivityksen jälkeen.'
  obg.innerHTML='Päivitä kuvake:'
  obi.innerHTML='(Mitä pidempi tämä on, sitä vähemmän muistia tämä laajennus vie.)'
  seclist.options[0].text='1 sekunti'
  seclist.options[1].text='2 sekuntia'
  seclist.options[2].text='5 sekuntia'
  seclist.options[3].text='10 sekuntia'
  seclist.options[4].text='30 sekuntia'
  seclist.options[5].text='1 minuutti'
  obl.innerHTML="Näytä tallennetut hälytykset"
  obl.title="Näytä tallennetut hälytykset"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Toteuta'
  document.getElementById('cancel').value='Peruuta'
  document.getElementById('about').value='Tietoja'
  document.getElementById('whznew').value='Näytä, mitä uutta tässä versiossa on'
 }else if(lang.search('tr')!='-1'){
  draw_title('Seçenekler')
  document.title='Seçenekler'
  of.innerHTML='Saat başı duyurusu'
  ok.innerHTML='Saat başı duyurusunu aç'
  ol.innerHTML='Show '
  om.innerHTML='saniye bildirim uzun.'
  on.innerHTML='(Maksimum: 999)'
  obj.innerHTML='Tarayıcınızı çalıştırdığınızda yapılacakları masaüstü bildirimlerinde göster'
  ox.innerHTML='Göster'
  oo.innerHTML='Dijital saat kullan'
  op.innerHTML='(Uyarı: Dijital saat kullanmak bilgisayarınızın hafızasını daha çok kullanacak)'
  oq.innerHTML='Koyu tema modu kullan (Koyu tema kullananlar için; sayıların altına yarı-şeffaf kabarcık eklenecektir, böylelikle zamanı görebileceksiniz.)'
  or.innerHTML='Analog saat kullan'
  os.innerHTML='(saniyede yaklaşık 4 KB)'
  ot.innerHTML='Kaydırma efekti kullanma (Kaydırma yerine 4 sayı göster)'
  ou.innerHTML='12 saatlik sistemi kullan (Varsayılan 24 saatlik sistemdir)'
  ov.innerHTML='Simgede saati göster (oklu olan)'
  ow.innerHTML='Simgede saati göster'
  oy.innerHTML='Yorum'
  oz.innerHTML='Bir yorumunuz mu var? Bir hata mı bildireceksiniz? buraya basın!'
  oaa.innerHTML='Animasyon genellikle her saniyede bir yeni bir resim gösterir. Normal de belirli bir süre sonunda daha fazla hafıza kullanımına neden olur ki ben de bunu azaltmaya çalışıyorum.'
  obf.innerHTML='Bu uzantının her güncellenmesinden sonra Güncelleme sayfasını göster'
  obg.innerHTML='Simgeyi her'
  obg2.innerHTML="de yenile"
  obi.innerHTML='(Uzun zamandır, hafif bu uzantısıdır.) '
  seclist.options[0].text='1 saniye'
  seclist.options[1].text='2 saniye'
  seclist.options[2].text='5 saniye'
  seclist.options[3].text='10 saniye'
  seclist.options[4].text='30 saniye'
  seclist.options[5].text='1 dakika'
  obl.innerHTML="Kayıtlı alarmları göster"
  obl.title="Kayıtlı alarmları göster"
  document.getElementById('okandclose').value='Tamam'
  document.getElementById('okbutton').value='Uygula'
  document.getElementById('cancel').value='İptal'
  document.getElementById('about').value='Hakkında'
  document.getElementById('whznew').value='Bu versiyonda yeni neler olduğuna bakın!'
 }else if(lang.search('id')!='-1'){
  draw_title('Pilihan')
  document.title='Pilihan'
  of.innerHTML='Pengumuman Waktu Tiap Jam'
  ok.innerHTML='Nyalakan Pengumuman Waktu Tiap Jam (notifikasi Desktop)'
  ol.innerHTML='Tunjukan notifikasi untuk:'
  om.innerHTML='detik'
  on.innerHTML='(Maksimum:999)'
  obj.innerHTML='Waspada terhadap-dos dalam pemberitahuan desktop saat Anda menjalankan browser Anda. '
  ox.innerHTML='Tampilan'
  oo.innerHTML='Gunakan Jam Digital'
  op.innerHTML='(Peringatan:Menggunakan jam digital akan menggunakan banyak memori komputer Anda.)'
  oq.innerHTML='Gunakan mode tema Gelap (Untuk Anda yang menggunakan tema gelap, akan menambahkan gelembung separuh-transparan di bawah angka sehingga Anda dapat melihat waktu.)'
  or.innerHTML='Gunakan Jam Analog'
  os.innerHTML='(Sekitar 4 KB per detik.)'
  ot.innerHTML='Jangan gunakan efek scroll (Menampilkan 4 angka dan bukan scroll)'
  ou.innerHTML='Gunakan sistem 12 jam (sistem 24 jam digunakan secara default)'
  ov.innerHTML='Tampilkan Jam pada Ikon (Menggunakan panah)'
  ow.innerHTML='Tampilkan waktu pada badge'
  oy.innerHTML='Komentar'
  oz.innerHTML='Punya komentar? Melaporkan bug? Tekan di sini!'
  oaa.innerHTML='Animasi biasanya "menggambar" gambar baru tiap detik, sehingga biasanya akan menggunakan banyak memori setelah beberapa waktu.'
  obf.innerHTML='Tampilkan halaman pembaruan setiap ekstensi ini diperbarui.'
  obg.innerHTML='Perbarui icon setiap:'
  obi.innerHTML='(Semakin lama waktunya, ekstensi ini semakin ringan.)'
  seclist.options[0].text='1 detik'
  seclist.options[1].text='2 detik'
  seclist.options[2].text='5 detik'
  seclist.options[3].text='10 detik'
  seclist.options[4].text='30 detik'
  seclist.options[5].text='1 menit'
  obl.innerHTML="Tampilkan alaram yang disimpan"
  obl.title="Tampilkan alaram yang disimpan"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Ubah'
  document.getElementById('cancel').value='Batal'
  document.getElementById('about').value='Tentang Jam Chrome'
  document.getElementById('whznew').value='Lihat apa yang baru di versi ini'
//  obp.innerHTML=""
//  obq.innerHTML=""
//  obr.innerHTML=""
//  obs.innerHTML=""
//  obt.innerHTML=""
 }else if(lang.search('ja')!='-1'){
  draw_title('設定')
  document.title='設定'
  of.innerHTML='時報'
  ok.innerHTML='時報をONにする（デスクトップ通知）'
  ol.innerHTML='時報表示の持続時間︰'
  om.innerHTML='秒'
  on.innerHTML='(999まで)'
  obj.innerHTML='ブラウザが起動している場合、デスクトップに予定を表示する。'
  ox.innerHTML='表示'
  oo.innerHTML='デジタル時計を使用'
  op.innerHTML='（注意：デジタル時計は、一定量のメモリを使用します）'
  oq.innerHTML='暗いテーマを使う（時刻が見やすいように、背景に半透明の泡が表示されます）'
  or.innerHTML='アナログ時計を使用'
  os.innerHTML='（１秒間に４キロバイトのメモリを使用します）'
  ot.innerHTML='スクロールエフェクトを使用しない（代わりに４つの数字を表示します）'
  ou.innerHTML='12時間表示を使用する（デフォルトでは24時間表示になります）'
  ov.innerHTML='アナログ時計をアイコン表示する'
  ow.innerHTML='背景に半透明の気泡を表示する'
  oy.innerHTML='コメント'
  oz.innerHTML='バグの報告やコメントの送信は、ここをクリックしてください'
  oaa.innerHTML='アニメーションは、通常１秒ごとに新しい画像を表示するため、以前のメモリを削除する間、多くのメモリを使用します。'
  obf.innerHTML='機能が更新された際、アップデートページを開く'
  obg.innerHTML='アイコンの更新頻度：'
  obi.innerHTML='（短いほど、メモリ使用量が軽くなります。）'
  seclist.options[0].text='1秒毎'
  seclist.options[1].text='2秒毎'
  seclist.options[2].text='5秒毎'
  seclist.options[3].text='10秒毎'
  seclist.options[4].text='30秒毎'
  seclist.options[5].text='1分毎'
  obl.innerHTML="保存したアラームを見る"
  obl.title="保存したアラームを見る"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='適用'
  document.getElementById('cancel').value='キャンセル'
  document.getElementById('about').value='Chrome 時計 について'
  document.getElementById('whznew').value='現在のバージョンの変更点を表示する'
  obp.innerHTML="なし"
  obq.innerHTML="デフォルトのアラーム音"
  obr.innerHTML="URLから"
  obs.innerHTML="アラーム音"
  obt.innerHTML="アラーム"
 }else if(lang.search('ko')!='-1'){
  draw_title('옵션')
  document.title='옵션'
  of.innerHTML='매 시각 알림'
  ok.innerHTML='매 시각 알림 켜기 (바탕화면 알림)'
  ol.innerHTML='알림 보이기︰'
  om.innerHTML='초'
  on.innerHTML='(최대︰999)'
  obj.innerHTML='브라우저를 켤 때 데스크탑 알림에서 할 일 알려주기.'
  ox.innerHTML='디스플레이'
  oo.innerHTML='디지털시계 사용'
  op.innerHTML='(참고︰디지털 시계가 메모리의 일정 금액을 사용합니다.)'
  oq.innerHTML='Dark 테마 모드 사용 (Dark 테마를 사용할 시에 반투명 배경이 숫자 아래 추가되어서 시간을 볼 수 있습니다.)'
  or.innerHTML='아날로그 시계 사용'
  os.innerHTML='(대략 초 당 4 KB)'
  ot.innerHTML='스크롤 효과 쓰지 않기(스크롤 대신 4개 숫자를 표시)'
  ou.innerHTML='12시간 체계 사용 (표준값은 24시간 체계입니다)'
  ov.innerHTML='디지털 시계 아이콘 위에 아날로그시계표시'
  ow.innerHTML='Badge에 시간 표시'
  oy.innerHTML='코멘트'
  oz.innerHTML='할 말이 있으세요? 버그를 신고하려고요? 여기를 누르세요!'
  oaa.innerHTML='애니메이션은 보통 매 초 새로운 그림을 "그립니다." 메모리 소모를 최소화하려고 노력하고 있지만, 그렇기 때문에 어느정도 시간 후에는 많은 메모리를 소모합니다. '
  obf.innerHTML='이 확장 프로그램이 업데이트 될 때 마다 업데이트 페이지를 보이기'
  obg.innerHTML='이 시간 마다 시간 새로 고침:'
  obi.innerHTML='(새로 고치는 시간이 길 수록, 이 확장 프로그램이 적은 메모리를 소모합니다.)'
  seclist.options[0].text='1초'
  seclist.options[1].text='2초'
  seclist.options[2].text='5초'
  seclist.options[3].text='10초'
  seclist.options[4].text='30초'
  seclist.options[5].text='1분'
  obl.innerHTML="저장된 알람 보기"
  obl.title="저장된 알람 보기"
  document.getElementById('okandclose').value='확인'
  document.getElementById('okbutton').value='적용'
  document.getElementById('cancel').value='취소'
  document.getElementById('about').value='소개'
  document.getElementById('whznew').value='이 버전에서 달라진 것'
  obp.innerHTML="없음"
  obq.innerHTML="표준 벨소리"
  obr.innerHTML="출처 URL"
  obs.innerHTML="상황에 맞는 벨소리"
  obt.innerHTML="알람 & 벨소리"
 }else if(lang.search('ca')!='-1'){
  draw_title('Opcions')
  document.title='Opcions'
  of.innerHTML='Notificació horària'
  ok.innerHTML="Posar l'avís horari (Notificació d'escriptori)"
  ol.innerHTML='Mostrar la notificació per:'
  om.innerHTML='segons'
  on.innerHTML='(Màxim: 999)'
  obj.innerHTML="Alerta de les tasques pendents amb una notificació a l'escriptori quan s'executi el navegador."
  ox.innerHTML='Pantalla'
  oo.innerHTML='Utilitzar el rellotge digital'
  op.innerHTML="(Avís: L'ús del rellotge digital ocupa mols recursos de l'ordinador)"
  oq.innerHTML="Utilitzar el tema fosc (Per aquells que utilitzeu el tema fosc, cal que utilitzeu un fons clar per poder veure l'hora)"
  or.innerHTML='Utilitzar el rellotge analògic'
  os.innerHTML='(aproximadament 4 KB per segon)'
  ot.innerHTML="No utilitzar l'efecte de rotació (mostra 4 números enlloc rotar)"
  ou.innerHTML="Utilitzar l'opció de 12 hores ( l'opció per defecte és la de 24 hores)"
  ov.innerHTML='Mostra el rellotge com a icona (el de la fletxa)'
  ow.innerHTML='Veure el temps com un distintiu'
  oy.innerHTML='Comentari'
  oz.innerHTML='Teniu algun comentari? Notificar un error? Premeu aquí!!'
  oaa.innerHTML="Animació, generalment, &quot;dibuixa&quot; una imatge nova cada segon, habitualment  (i després d'una estona) això esmerça molts recursos, si l'escolliu tot es pot tornar més més lent."
  obf.innerHTML="Mostrar la pàgina actualitzada cada cop que l'aplicació s'ha actualitzat."
  obg.innerHTML='Actualitzar la icona cada:'
  obi.innerHTML='(posa el que et sembli, serà molt millor.)'
  seclist.options[0].text='1 segon'
  seclist.options[1].text='2 segons'
  seclist.options[2].text='5 segons'
  seclist.options[3].text='10 segons'
  seclist.options[4].text='30 segons'
  seclist.options[5].text='1 minut'
  obl.innerHTML="Veure les alarmes desades"
  obl.title="Veure les alarmes desades"
  document.getElementById('okandclose').value='Acceptar'
  document.getElementById('okbutton').value='Aplicar'
  document.getElementById('cancel').value='Cancel·lar'
  document.getElementById('about').value='Sobre'
  document.getElementById('whznew').value="Veure les novetats d'aquesta versió."
  obp.innerHTML="Cap"
  obq.innerHTML="To predeterminat"
  obr.innerHTML="Des de URL"
  obs.innerHTML="To per a totes les ocasions"
  obt.innerHTML="Alarma i to"
 }else if(lang.search('nb')!='-1'){
  draw_title('Alternativer')
  document.title='Alternativer'
  of.innerHTML='Klokka er nå'
  ok.innerHTML='Slå på notifikasjon for hver hele time'
  ol.innerHTML='Vis i:'
  om.innerHTML='sekunder'
  on.innerHTML='(Maks: 999)'
  obj.innerHTML='Varsle om oppgaver når netteleseren kjøres'
  ox.innerHTML='Visning'
  oo.innerHTML='Bruk digitalklokke'
  op.innerHTML='(Advarsel: Digitalklokke bruker mye minne.)'
  oq.innerHTML='Bruk tilpasninger for mørkt tema'
  or.innerHTML='Bruk analogklokke'
  os.innerHTML='(Omtrent 4 KB per sekund)'
  ot.innerHTML='Ikke brukk rulleeffekt (vis 4 tall i stedet for rulling)'
  ou.innerHTML='Bruk 12-timerssystem (standard er 24-timerssystem)'
  ov.innerHTML='Vis klokka på ikonet'
  ow.innerHTML='Vis klokka på merket'
  oy.innerHTML='Kommentar'
  oz.innerHTML='Har du en kommentar eller en feilrapport? Trykk her!'
  oaa.innerHTML='Animasjon «tegner» et nytt bilde per sekund, så det vil ta opp mye minne, men vi prøver å redusere det.'
  obf.innerHTML='Vis oppdateringssiden hver gang utvidelsen har blitt oppdatert'
  obg.innerHTML='Oppdater ikonet hver:'
  obi.innerHTML='(Jo lenger intervall, jo lettere er utvidelsen.)'
  seclist.options[0].text='1 sekund'
  seclist.options[1].text='2 sekunder'
  seclist.options[2].text='5 sekunder'
  seclist.options[3].text='10 sekunder'
  seclist.options[4].text='30 sekunder'
  seclist.options[5].text='1 minutt'
  obl.innerHTML="Vis lagrede alarmer"
  obl.title="Vis lagrede alarmer"
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='Bruk'
  document.getElementById('cancel').value='Avbryt'
  document.getElementById('about').value='Om'
  document.getElementById('whznew').value='Nytt i denne versjonen'
  obp.innerHTML="Ingen"
  obq.innerHTML="Standard ringetone"
  obr.innerHTML="Fra URL"
  obs.innerHTML="Ringetone for alle formål:"
  obt.innerHTML="Alarm og ringetone"
 }else if(lang.search('ar')!='-1'){
  draw_title('تنظیمات')
  document.title='تنظیمات'
  of.innerHTML='اعلان زمان ساعتی '
  ok.innerHTML='فعال کردن اعلان زمان ساعتی بر روی دسکتاپ '
  ol.innerHTML='مدت نمایش اعلان: '
  om.innerHTML='ثانیه '
  on.innerHTML='(حداکثر: ۹۹۹) '
  obj.innerHTML='اعلام لیست کارهایی که بایستی انجام دهید بر روی دسکتاپ در هنگامی که گوگل کروم شما باز است '
  ox.innerHTML='نمایشگر '
  oo.innerHTML='نمایش ساعت دیجیتال '
  op.innerHTML='(اخطار: استفاده از ساعت دیجیتال باعث مصرف بیشتر حافظه کامپیوتر میشود )'
  oq.innerHTML='استفاده از تم تیره - برای کاربرانی که از تم تیره استفاده میکنند. این تم به صورت نیمه روشن است '
  or.innerHTML='نمایش ساعت عقربه ایی '
  os.innerHTML='(در حدود ۴ کیلو بایت در هر ثانیه )'
  ot.innerHTML='عدم نمایش به صورت فهرست - نمایش ۴ خط بجای فهرست '
  ou.innerHTML='نمایش ساعت بصورت ۱۲ ساعتی  - پیش فرض نمایش ۲۴ ساعتی است '
  ov.innerHTML='نمایش ساعت بر روی آیکن '
  ow.innerHTML='نمایش ساعت بر روی علامت - علامت قرمز جلوی آیکن '
  oy.innerHTML='توضیح '
  oz.innerHTML=' توضیحی دارید؟ خطایی رو میخواهید گزارش کنید؟ اینجا رو کلیک کنید'
  oaa.innerHTML='انیمشن معمولا در هر ثانیه ۱ تصویر میکشد. از اینرو حافظه زیادی مصرف میکند. در حال حاضر من بر روی کاهش مصرف حافظه دارم کار میکنم '
  obf.innerHTML='نمایش وضیعت بروز رسانی هر زمان که که این افزونه بروز شد '
  obg.innerHTML='فراخوانی آیکون در هر: '
  obi.innerHTML='(طولانی تر از آن است، سبکتر این فرمت است)'
  seclist.options[0].text='یک ثانیه'
  seclist.options[1].text=' دو ثانیه'
  seclist.options[2].text=' پنج ثانیه'
  seclist.options[3].text=' ده ثانیه'
  seclist.options[4].text=' سی ثانیه'
  seclist.options[5].text=' یک دقیقه '
  obl.innerHTML="نمایش آلارم های ذخیره شد "
  obl.title="نمایش آلارم های ذخیره شد "
  document.getElementById('okandclose').value='OK'
  document.getElementById('okbutton').value='تایید '
  document.getElementById('cancel').value='لغو '
  document.getElementById('about').value='درباره '
  document.getElementById('whznew').value='دیدن تغییرات جدید در این نسخه '
  obp.innerHTML="بدون صدا "
  obq.innerHTML="صدای زنگ پیش فرض "
  obr.innerHTML="صدای زنگ از اینترنت "
  obs.innerHTML="صدای زنگ برای همه کاربردها "
  obt.innerHTML="آلارم و صدای زنگ "
 }else if(lang.search('el')!='-1'){
  draw_title('Επιλογές')
  document.title='Επιλογές'
  of.innerHTML='Ωριαία Ανακοίνωση Ώρας'
  ok.innerHTML='Ενεργοποίηση Ωριαίας Ανακοίνωσης Ώρας! (κοινοποίηση στην επιφάνεια εργασίας)'
  ol.innerHTML='Εμφάνιση κοινοποίησης για:'
  om.innerHTML='δευτερόλεπτα.'
  on.innerHTML='(Μέγιστη: 999)'
  obj.innerHTML='Ειδοποίηση προς-dos στην επιφάνεια εργασίας, Ειδοποίηση όταν εκτελείτε το πρόγραμμα περιήγησης σας.'
  ox.innerHTML='Εμφάνιση'
  oo.innerHTML='Χρησιμοποιήστε το ψηφιακό ρολόι'
  op.innerHTML='(Προσοχή: Χρησιμοποιώντας το ψηφιακό ρολόι θα καταλαμβάνει πολύ μνήμη του υπολογιστή σας.)'
  oq.innerHTML='Χρησιμοποιήστε τη λειτουργία θέματος σκοτεινό (Για εκείνους που χρησιμοποιούν σκοτεινό θέμα, θα προσθέσουμε μια μισό-διαφανή φούσκα με τους αριθμούς έτσι ώστε να μπορέσετε να δείτε την ώρα.)'
  or.innerHTML='Χρησιμοποιήστε το αναλογικό ρολόι'
  os.innerHTML='(Περίπου 4 KB ανά δευτερόλεπτο.)'
  ot.innerHTML='Μην χρησιμοποιείτε εφέ κύλισης (Εμφάνιση 4 αριθμούς αντί για κύλιση)'
  ou.innerHTML='Χρησιμοποιήστε 12 ώρo σύστημα (Προεπιλογή χρησιμοποιεί 24 ώρο σύστημα)'
  ov.innerHTML='Εμφάνιση ρολογιού στο εικονίδιο (Το ένα με βέλος)'
  ow.innerHTML='Εμφάνιση ώρας στο σήμα'
  oy.innerHTML='Σχολιάστε'
  oz.innerHTML='Έχετε κάποιο σχόλιο; Αναφέρετε ένα σφάλμα; Πατήστε εδώ!'
  oaa.innerHTML='Η αναζωογόνηση συνήθως "σύρει" μια νέα εικόνα ανά δευτερόλεπτο, οπότε κανονικά θα πάρει επάνω πολύ μνήμη μετά από μια χρονική περίοδο, ενώ είμαι προσπαθώντας να μειωθεί στο ελάχιστο.'
  obf.innerHTML='Εμφάνιση της σελίδας ενημέρωσης μετά από κάθε φορά που αυτή η επέκταση έχει ενημερωθεί.'
  obg.innerHTML='Ανανεώστε το εικονίδιο κάθε:'
  obi.innerHTML='(Όσο περισσότερο είναι, τόσο ελαφρύτερη είναι αυτή η επέκταση.)'
  seclist.options[0].text='1 δευτερόλεπτο'
  seclist.options[1].text='2 δευτερόλεπτα'
  seclist.options[2].text='5 δευτερόλεπτα'
  seclist.options[3].text='10 δευτερόλεπτα'
  seclist.options[4].text='30 δευτερόλεπτα'
  seclist.options[5].text='1 λεπτό'
  obl.innerHTML="Προβολή αποθηκευμένων ειδοποιήσεων"
  obl.title="Προβολή αποθηκευμένων ειδοποιήσεων"
  document.getElementById('okandclose').value='Εντάξει'
  document.getElementById('okbutton').value='Εφαρμογή'
  document.getElementById('cancel').value='Ακύρωση'
  document.getElementById('about').value='Σχετικά'
  document.getElementById('whznew').value='Δείτε τι νέο υπάρχει σε αυτήν την έκδοση'
  obp.innerHTML="κανένα"
  obq.innerHTML="Προεπιλεγμένος ήχος"
  obr.innerHTML="Από το URL"
  obs.innerHTML="Ήχος για όλους τους σκοπούς"
  obt.innerHTML="Ξυπνητήρι & Ήχος"
 }else{
  localStorage['language']='en'
 }
restorelang()
}

function restorelang(){

 for (i=0;i<50;i++){
  document.getElementById('langlist').selectedIndex=i
  if(localStorage['language']!="zh-TW"&&localStorage['language']!="zh-CN"&&localStorage['language']!="pt-BR"&&localStorage['language']!="pt-PT"){
   if(langlist.options[document.getElementById("langlist").selectedIndex].value==localStorage['language'].slice(0,2)){
    break
   }
  }else{
   if(langlist.options[document.getElementById("langlist").selectedIndex].value==localStorage['language']){
    break
   }
  }
 }
 for(i=0;i<=languages.length-2;i++){
  if(((navigator.language!='zh-TW'&&navigator.language!="zh-CN"&&localStorage['language']!="pt-BR")?navigator.language.slice(0,2):navigator.language)!=languages[i]){
   shownolang.innerHTML='<b>Translate this extension to your language ('+navigator.language+')! Traslate it <a href="http://spreadsheets.google.com/viewform?formkey=dEtYWXduRzh4dDFtZV9PU1JRYkpEaFE6MA" target="_blank">here</a>.</b>'
  }else{
   shownolang.innerHTML=''
   break
  }
 }



if(localStorage['language']=="id")
{
shownolang.innerHTML='<b> Translation update is needed for <span title="Language code">"'+localStorage['language']+'"</span>! Update it <a href="http://spreadsheets.google.com/viewform?formkey=dEtYWXduRzh4dDFtZV9PU1JRYkpEaFE6MA" target="_blank">here</a>.</b>'
}


}

function savelang(){
localStorage['language']=langlist.options[document.getElementById("langlist").selectedIndex].value
setTimeout("chrome.contextMenus.removeAll();chrome.extension.getBackgroundPage().createMenuItem();location.href='options.html'",500)
//location.reload()
}

function showlang(){
alert('Your browser'+"'"+'s language is "'+navigator.language+'",\nand the language that you are using right now in this extension is "'+localStorage['language']+'".')
}

function showcredit(){
alert('People who have helped me translate:\n\n - Derek [me] (繁體中文)\n - Paulo (Español)\n - Евгений + Cyber (updates) (Russian)\n - Sumurai8 + Jack (Dutch)\n - Loko (Português-BR)\n - WindWT (简体中文)\n - john.carter + Emmanuel DOLCINE (updates) (Français)\n - barko (Hebrew)\n - alm10965 (German)\n - Bruno (European Portuguese pt-PT)\n - Jaykob (Czech)\n - Bogdan (Romanian)\n - Karol Garlicki (Polish)\n - Daniele Guttuso (Italian)\n - kanttii (Finnish)\n - Haldun Alay (Turkish)\n - xiangwei xu (Indonesian)\n - Cure Blossom (日本語)\n - Kusang (한국의)\n - Àngel Agustí (Catalan)\n - Jon Harald Søby (Norwegian [Bokmål])\n - Pedram Jabbari (Persian)\n - ~koloki8as~ (Greek)\n\nThanks for the helps!')
}



//Translate popup page

function popuppage(){
 var lang = localStorage['language']

 if(lang.search('en')!='-1'){

 }else if(lang=='zh-TW'){
popau.title="關閉"
pav.innerHTML='設定'
pag.innerHTML='現在時間是︰'
pat.innerHTML='(我不是Flash時鐘!)'
pbk.innerHTML='版本'
countdownbtn.title='倒數器'
commentbtn.title='意見'
alarmbtn.title='鬧鐘'
info.title="統計"
}else if(lang.search('es')!='-1'){
popau.title="Cerrar"
pav.innerHTML='Configuración'
pag.innerHTML='La hora es:'
pat.innerHTML='(No soy un reloj Flash!)'
}else if(lang.search('ru')!='-1'){
popau.title="Закрыть"
pav.innerHTML='Настpойки'
pag.innerHTML='Сейчас:'
pat.innerHTML='(Это не Flash часы!)'
pbk.innerHTML='Версия'
}else if(lang.search('nl')!='-1'){
popau.title="Sluiten"
pav.innerHTML='Optie'
pag.innerHTML='Het is nu:'
pat.innerHTML='(Ik ben geen Flash klok!)'
}else if(lang=='pt-BR'){
popau.title="Fechar"
pav.innerHTML='Opções'
pag.innerHTML='Agora são:'
pat.innerHTML='(Eu não sou um relógio em Flash!)'
}else if(lang=='zh-CN'){
popau.title="关闭"
pav.innerHTML='设定'
pag.innerHTML='现在是︰'
pat.innerHTML='（我不是Flash时钟！）'
pbk.innerHTML='版本'
countdownbtn.title='倒数器'
commentbtn.title='意见'
alarmbtn.title='鬧钟'
info.title="统计"
}else if(lang.search('fr')!='-1'){
popau.title="Fermer"
pav.innerHTML='Paramètre'
pag.innerHTML='Il est maintenant'
pat.innerHTML='(Je ne suis pas une horloge Flash!)'
pbk.innerHTML='Version'
}else if(lang.search('he')!='-1'){
popau.title="סגור"
pav.innerHTML='הגדרה'
pag.innerHTML='עכשיו'
pat.innerHTML='אני לא גרסת שעון פלש'
}else if(lang.search('de')!='-1'){
popau.title="Fenster schließen"
pav.innerHTML='Einstellungen'
pag.innerHTML='Es ist:'
pat.innerHTML='(Ich bin keine Flash Uhr!)'
}else if(lang=='pt-PT'){
popau.title="Fechar"
pav.innerHTML='Deffenições'
pag.innerHTML='Horas:'
pat.innerHTML='(não é usada nenhuma animação em Flash)'
}else if(lang.search('cs')!='-1'){
popau.title="Zavřít"
pav.innerHTML='Nastavení'
pag.innerHTML='Právě je:'
pat.innerHTML='(Toto nejsou Flashové hodiny!)'
}else if(lang.search('ro')!='-1'){
popau.title="Inchide"
pav.innerHTML='Setari'
pag.innerHTML='Acum este:'
pat.innerHTML='(Nu sunt un ceas Flash!)'
}else if(lang.search('pl')!='-1'){
popau.title="Zamknij"
pav.innerHTML='Ustawienia'
pag.innerHTML='Aktualny czas:'
pat.innerHTML='(Nie jestem zegarem w technologii Flash!)'
pbk.innerHTML='Wersja'
countdownbtn.title='Countdown'
commentbtn.title='Komentarz'
alarmbtn.title='Budzik'
}else if(lang.search('it')!='-1'){
popau.title="Chiudi"
pav.innerHTML='Impostazioni'
pag.innerHTML='Sono le:'
pat.innerHTML='(Non sono un orologio Flash!)'
pbk.innerHTML='Versione'
countdownbtn.title='Conto alla rovescia'
commentbtn.title='Commento'
alarmbtn.title='Sveglia'
}else if(lang.search('fi')!='-1'){
popau.title="Sulje"
pav.innerHTML='Asetus'
pag.innerHTML='Kello on:'
pat.innerHTML='(En ole Flash-kello!)'
pbk.innerHTML='Versio'
countdownbtn.title='Sekuntikello'
commentbtn.title='Kommentti'
alarmbtn.title='Herätyskello'
}else if(lang.search('tr')!='-1'){
popau.title="Kapat"
pav.innerHTML='Ayarlar'
pag.innerHTML='Şu an saat:'
pat.innerHTML='(Ben bir Flash saat değilim!)'
pbk.innerHTML='Versiyon'
countdownbtn.title='Gerisayım'
commentbtn.title='Yorum'
alarmbtn.title='alarm saati'
}else if(lang.search('id')!='-1'){
popau.title="Tutup"
pav.innerHTML='Suntingan'
pag.innerHTML='Waktu sekarang adalah'
pat.innerHTML='(Saya bukan sebuah jam Flash!)'
pbk.innerHTML='Versi'
countdownbtn.title='penghitung mundur'
commentbtn.title='Komentar'
alarmbtn.title='jam alaram'
}else if(lang.search('ja')!='-1'){
popau.title="閉じる"
pav.innerHTML='設定'
pag.innerHTML='現在時刻：'
pat.innerHTML='（この時計はフラッシュ(Adobe Flash)を使用していません）'
pbk.innerHTML='バージョン'
countdownbtn.title='カウントダウンタイマー'
commentbtn.title='コメント'
alarmbtn.title='アラーム'
}else if(lang.search('ko')!='-1'){
popau.title="닫기"
pav.innerHTML='설정'
pag.innerHTML='현재시간:'
pat.innerHTML='(난 Adobe Flash 시계가 아니에요)'
pbk.innerHTML='버젼'
countdownbtn.title='카운트다운 시계'
commentbtn.title='코멘트'
alarmbtn.title='알람 시계'
}else if(lang.search('ca')!='-1'){
popau.title="Tancar"
pav.innerHTML='Ajustament'
pag.innerHTML='Ara són les:'
pat.innerHTML='(No sóc un Adobe Flash rellotge!)'
pbk.innerHTML='Versió'
countdownbtn.title='Temporitzador de compte enrere'
commentbtn.title='Comentari'
alarmbtn.title='Alarma'
}else if(lang.search('nb')!='-1'){
popau.title="Lukk"
pav.innerHTML='Innstillinger'
pag.innerHTML='Klokka er nå:'
pat.innerHTML='(Jeg er ikke en Flash-klokke!)'
pbk.innerHTML='Versjon'
countdownbtn.title='Nedtellingstidtaker'
commentbtn.title='Kommentar'
alarmbtn.title='Alarm'
}else if(lang.search('ar')!='-1'){
popau.title="بستن "
pav.innerHTML='تنظیمات '
pag.innerHTML='زمان'
pat.innerHTML='(نه با استفاده از ادوبی فلش)'
pbk.innerHTML='نسخه '
countdownbtn.title='شمارنده شمارش معکوس '
commentbtn.title='توضیح '
alarmbtn.title='آلارم ساعت '
}else if(lang.search('el')!='-1'){
popau.title="Κλείσιμο"
pav.innerHTML='Ρυθμίσεις'
pag.innerHTML='Τώρα η ώρα είναι:'
pat.innerHTML='(Δεν είμαι ένα ρολόι Flash!)'
pbk.innerHTML='Έκδοση'
countdownbtn.title='χρονόμετρο αντίστροφης μέτρησης'
commentbtn.title='Σχολιάστε'
alarmbtn.title='ξυπνητήρι'
info.title="Στατιστικά"
}

}

function pupweekday(num){
var weeknum
var weekday_en=new Array(7);
weekday_en[0]="Sunday";
weekday_en[1]="Monday";
weekday_en[2]="Tuesday";
weekday_en[3]="Wednesday";
weekday_en[4]="Thursday";
weekday_en[5]="Friday";
weekday_en[6]="Saturday";
var weekday_zh=new Array(7);
weekday_zh[0]="星期日";
weekday_zh[1]="星期一";
weekday_zh[2]="星期二";
weekday_zh[3]="星期三";
weekday_zh[4]="星期四";
weekday_zh[5]="星期五";
weekday_zh[6]="星期六";
var weekday_es=new Array(7);
weekday_es[0]="Domingo";
weekday_es[1]="Lunes";
weekday_es[2]="Martes";
weekday_es[3]="Miércoles";
weekday_es[4]="Jueves";
weekday_es[5]="Viernes";
weekday_es[6]="Sabado";
var weekday_ru=new Array(7);
weekday_ru[0]="Воскресенье";
weekday_ru[1]="Понедельник";
weekday_ru[2]="Вторник";
weekday_ru[3]="Среда";
weekday_ru[4]="Четверг";
weekday_ru[5]="Пятница";
weekday_ru[6]="Суббота";
var weekday_nl=new Array(7);
weekday_nl[0]="Zondag";
weekday_nl[1]="Maandag";
weekday_nl[2]="Dinsdag";
weekday_nl[3]="Woensdag";
weekday_nl[4]="Donderdag";
weekday_nl[5]="Vrijdag";
weekday_nl[6]="Zaterdag";
var weekday_pt=new Array(7);
weekday_pt[0]="Domingo";
weekday_pt[1]="Segunda";
weekday_pt[2]="Terça";
weekday_pt[3]="Quarta";
weekday_pt[4]="Quinta";
weekday_pt[5]="Sexta";
weekday_pt[6]="Sabado";
var weekday_fr=new Array(7);
weekday_fr[0]="Dimanche";
weekday_fr[1]="Lundi";
weekday_fr[2]="Mardi";
weekday_fr[3]="Mercredi";
weekday_fr[4]="Jeudi";
weekday_fr[5]="Vendredi";
weekday_fr[6]="Samedi";
var weekday_he=new Array(7);
weekday_he[0]="יום ראשון";
weekday_he[1]="יום שני";
weekday_he[2]="יום שלישי";
weekday_he[3]="יום רביעי ";
weekday_he[4]="יום חמישי";
weekday_he[5]="יום שישי";
weekday_he[6]="יום שבת";
var weekday_de=new Array(7);
weekday_de[0]="Sonntag";
weekday_de[1]="Montag";
weekday_de[2]="Dienstag";
weekday_de[3]="Mittwoch";
weekday_de[4]="Donnerstag";
weekday_de[5]="Freitag";
weekday_de[6]="Samstag";
var weekday_cs=new Array(7);
weekday_cs[0]="Neděle";
weekday_cs[1]="Pondělí";
weekday_cs[2]="Úterý";
weekday_cs[3]="Středa";
weekday_cs[4]="Čtvrtek";
weekday_cs[5]="Pátek";
weekday_cs[6]="Sobota";
var weekday_ro=new Array(7);
weekday_ro[0]="Duminica";
weekday_ro[1]="Luni";
weekday_ro[2]="Marti";
weekday_ro[3]="Miercuri";
weekday_ro[4]="Joi";
weekday_ro[5]="Vineri";
weekday_ro[6]="Sambata";
var weekday_pl=new Array("Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota")
var weekday_it=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato")
var weekday_fi=new Array("Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai")
var weekday_tr=new Array("Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi")
var weekday_id=new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu")
var weekday_ja=new Array("日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日")
var weekday_ko=new Array("일요일","월요일","화요일","수요일","목요일","금요일","토요일")
var weekday_ca=new Array("Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabtes")
var weekday_nb=new Array("Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag")
var weekday_ar=new Array("یکشنبه","دوشنبه ","سه شنبه ","چهار شنبه" ,"پنجشنبه ","جمعه ","شنبه ")
var weekday_el=new Array("Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο")

if(localStorage['language'].search('zh')!=-1){
weeknum=weekday_zh[num]
}else if(localStorage['language'].search('es')!=-1){
weeknum=weekday_es[num]
}else if(localStorage['language'].search('ru')!=-1){
weeknum=weekday_ru[num]
}else if(localStorage['language'].search('nl')!=-1){
weeknum=weekday_nl[num]
}else if(localStorage['language'].search('pt')!=-1){
weeknum=weekday_pt[num]
}else if(localStorage['language'].search('fr')!=-1){
weeknum=weekday_fr[num]
}else if(localStorage['language'].search('he')!=-1){
weeknum=weekday_he[num]
}else if(localStorage['language'].search('de')!=-1){
weeknum=weekday_de[num]
}else if(localStorage['language'].search('cs')!=-1){
weeknum=weekday_cs[num]
}else if(localStorage['language'].search('ro')!=-1){
weeknum=weekday_ro[num]
}else if(localStorage['language'].search('pl')!=-1){
weeknum=weekday_pl[num]
}else if(localStorage['language'].search('it')!=-1){
weeknum=weekday_it[num]
}else if(localStorage['language'].search('fi')!=-1){
weeknum=weekday_fi[num]
}else if(localStorage['language'].search('tr')!=-1){
weeknum=weekday_tr[num]
}else if(localStorage['language'].search('id')!=-1){
weeknum=weekday_id[num]
}else if(localStorage['language'].search('ja')!=-1){
weeknum=weekday_ja[num]
}else if(localStorage['language'].search('ko')!=-1){
weeknum=weekday_ko[num]
}else if(localStorage['language'].search('ca')!=-1){
weeknum=weekday_ca[num]
}else if(localStorage['language'].search('nb')!=-1){
weeknum=weekday_nb[num]
}else if(localStorage['language'].search('ar')!=-1){
weeknum=weekday_ar[num]
}else if(localStorage['language'].search('el')!=-1){
weeknum=weekday_el[num]
}else{
weeknum=weekday_en[num]
}

return weeknum
}

//Use by Popup and Calendar
function pupmonth(num){
var monthnum
var month_en=new Array(12);
month_en[0]="Jan";
month_en[1]="Feb";
month_en[2]="Mar";
month_en[3]="Apr";
month_en[4]="May";
month_en[5]="Jun";
month_en[6]="July";
month_en[7]="Aug";
month_en[8]="Sep";
month_en[9]="Oct";
month_en[10]="Nov";
month_en[11]="Dec";
var month_zh=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月")
var month_es=new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic")
var month_ru=new Array("Янв","Февр","Мар","Апр","Мая","Июн","Июл","Авг","Сен","Окт","Ноя","Дек")
var month_nl=new Array("Jan","Feb","Maa","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec")
var month_pt=new Array("Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez")
var month_fr=new Array("Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc")
var month_he=new Array(12);
month_he[0]="ינואר";
month_he[1]="פבואר";
month_he[2]="מרץ";
month_he[3]="אפריל";
month_he[4]="מאי";
month_he[5]="יוני";
month_he[6]="יולי";
month_he[7]="אוג";
month_he[8]="ספט";
month_he[9]="אוק";
month_he[10]="נוב";
month_he[11]="דצמ";
var month_de=new Array("Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dez")
var month_cs=new Array("Led","Úno","Bře","Dub","Kvě","Čen","Čec","Srp","Zář","Říj","Lis","Pro")
var month_ro=new Array("Ian","Feb","Mar","Apr","Mai","Lun","Lul","Aug","Sep","Oct","Noi","Dec")
var month_pl=new Array("Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru");
var month_it=new Array("Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic");
var month_fi=new Array("Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu");
var month_tr=new Array("Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara");
var month_id=new Array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des");
var month_ja=new Array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
var month_ko=new Array("1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월");
var month_ca=new Array("Gen.","Feb.","Març","Abr.","Maig","Juny","Jul.","Ago.","Set.","Oct.","Nov.","Dec.");
var month_nb=new Array("Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des");
var month_ar=new Array("ژانویه","فوریه ","مارس ","آوریل"," مه ","ژوئن"," ژوئیه"," اوت"," سپتامبر"," اکتبر"," نوامبر"," دسامبر ");
var month_el=new Array("Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ");

if(localStorage['language'].search('zh')!=-1){
monthnum=month_zh[num]
}else if(localStorage['language'].search('es')!=-1){
monthnum=month_es[num]
}else if(localStorage['language'].search('ru')!=-1){
monthnum=month_ru[num]
}else if(localStorage['language'].search('nl')!=-1){
monthnum=month_nl[num]
}else if(localStorage['language'].search('pt')!=-1){
monthnum=month_pt[num]
}else if(localStorage['language'].search('fr')!=-1){
monthnum=month_fr[num]
}else if(localStorage['language'].search('he')!=-1){
monthnum=month_he[num]
}else if(localStorage['language'].search('de')!=-1){
monthnum=month_de[num]
}else if(localStorage['language'].search('cs')!=-1){
monthnum=month_cs[num]
}else if(localStorage['language'].search('ro')!=-1){
monthnum=month_ro[num]
}else if(localStorage['language'].search('pl')!=-1){
monthnum=month_pl[num]
}else if(localStorage['language'].search('it')!=-1){
monthnum=month_it[num]
}else if(localStorage['language'].search('fi')!=-1){
monthnum=month_fi[num]
}else if(localStorage['language'].search('tr')!=-1){
monthnum=month_tr[num]
}else if(localStorage['language'].search('id')!=-1){
monthnum=month_id[num]
}else if(localStorage['language'].search('ja')!=-1){
monthnum=month_ja[num]
}else if(localStorage['language'].search('ko')!=-1){
monthnum=month_ko[num]
}else if(localStorage['language'].search('ca')!=-1){
monthnum=month_ca[num]
}else if(localStorage['language'].search('nb')!=-1){
monthnum=month_nb[num]
}else if(localStorage['language'].search('ar')!=-1){
monthnum=month_ar[num]
}else if(localStorage['language'].search('el')!=-1){
monthnum=month_el[num]
}else{
monthnum=month_en[num]
}

return monthnum
}

function pupgreeting(num){
var greetingtxt
var greeting_en=new Array(4);
greeting_en[0]="Good Morning!"
greeting_en[1]="Great to see you in the Afternoon!"
greeting_en[2]="Have you eaten your dinner yet?"
greeting_en[3]="It's time to bed."
greeting_en[4]="What's up?"
var greeting_zh_tw=new Array(4);
greeting_zh_tw[0]="早晨!"
greeting_zh_tw[1]="午安!"
greeting_zh_tw[2]="吃了晚餐了嗎?"
greeting_zh_tw[3]="是時候要休息了。"
greeting_zh_tw[4]="你好!"
var greeting_es=new Array(4);
greeting_es[0]="Buenos días!"
greeting_es[1]="Buenas tardes!"
greeting_es[2]="¿Ya cenaste?"
greeting_es[3]="Es hora de dormir."
greeting_es[4]="¿Qué pasa?"
var greeting_nl=new Array(4);
greeting_nl[0]="Goedemorgen!"
greeting_nl[1]="Fijn je in de middag te zien!"
greeting_nl[2]="Heb je al avondeten gegeten?"
greeting_nl[3]="Tijd om naar bed te gaan."
greeting_nl[4]="Wat is er aan de hand?"
var greeting_pt_br=new Array(4);
greeting_pt_br[0]="Bom Dia!"
greeting_pt_br[1]="Boa Tarde!"
greeting_pt_br[2]="Você ja jantou?"
greeting_pt_br[3]="É hora de dormir."
greeting_pt_br[4]="O que há de novo?"
var greeting_zh_cn=new Array(4);
greeting_zh_cn[0]="早上好！"
greeting_zh_cn[1]="下午好！"
greeting_zh_cn[2]="吃晚饭了吗？"
greeting_zh_cn[3]="很晚了，该睡觉了。"
greeting_zh_cn[4]="最近怎样了？"
var greeting_fr=new Array(4);
greeting_fr[0]="Bonjour!"
greeting_fr[1]="Quel plaisir de vous voir cet l'après-midi!"
greeting_fr[2]="Avez-vous déjà diné?"
greeting_fr[3]="Il est temps de se coucher."
greeting_fr[4]="Quoi de neuf?"
var greeting_he=new Array(4);
greeting_he[0]="בוקר טוב"
greeting_he[1]='!טוב לראותך אחה"צ'
greeting_he[2]="האם אכלת את ארוחת הערב?"
greeting_he[3]="הגיע הזמן לישון."
greeting_he[4]="מה שלומך?"
var greeting_de=new Array(4);
greeting_de[0]="Guten Morgen!"
greeting_de[1]="Nett Sie zu sehen, am Nachmittag!"
greeting_de[2]="Haben Sie schon Abendessen gegessen?"
greeting_de[3]="Zeit zum schlafen"
greeting_de[4]="Wie geht's?"
var greeting_pt_pt=new Array(4);
greeting_pt_pt[0]="Bom Dia!"
greeting_pt_pt[1]="Boa Tarde!"
greeting_pt_pt[2]="Já jantaste?"
greeting_pt_pt[3]="Boa Noite"
greeting_pt_pt[4]="Como estás?"
var greeting_ru=new Array(4);
greeting_ru[0]="Доброе утро!"
greeting_ru[1]="Приятно видеть вас днём!"
greeting_ru[2]="Вы уже пообедали?"
greeting_ru[3]="Пора спать."
greeting_ru[4]="Как дела?"
var greeting_cs=new Array(4);
greeting_cs[0]="Dobré ráno!"
greeting_cs[1]="Hezké odpoledne!"
greeting_cs[2]="Už jsi večeřel?"
greeting_cs[3]="Je čas jít spát."
greeting_cs[4]="Co se děje?"
var greeting_ro=new Array(4);
greeting_ro[0]="Buna dimineata!"
greeting_ro[1]="Bine te-am gasit de dupa-masa!"
greeting_ro[2]="Ai luat cina?"
greeting_ro[3]="E timpul de somn."
greeting_ro[4]="Ce faci?"
var greeting_pl=new Array(4);
greeting_pl[0]="Dzień dobry!"
greeting_pl[1]="Dobrze Cię widzieć!"
greeting_pl[2]="Czy jesteś już po obiedzie?"
greeting_pl[3]="Czas iść spać."
greeting_pl[4]="Witam, co słychać?"
var greeting_it=new Array(4);
greeting_it[0]="Buongiorno!"
greeting_it[1]="E` bello vederti di pomeriggio!"
greeting_it[2]="Hai già mangiato?"
greeting_it[3]="E` ora di andare a letto."
greeting_it[4]="Come va?"
var greeting_fi=new Array(4);
greeting_fi[0]="Hyvää huomenta!"
greeting_fi[1]="Mukava nähdä näin iltapäivällä!"
greeting_fi[2]="Oletko vielä syönyt päivällistä? "
greeting_fi[3]="Aika mennä nukkumään."
greeting_fi[4]="Mitä kuuluu?"
var greeting_tr=new Array(4);
greeting_tr[0]="Günaydın!"
greeting_tr[1]="Öğleden sonra seni görmek harika."
greeting_tr[2]="Akşam yemeğini yedin mi?"
greeting_tr[3]="Yatma zamanı."
greeting_tr[4]="Ne oldu?"
var greeting_id=new Array(4);
greeting_id[0]="Selamat Pagi!"
greeting_id[1]="Selamat Siang!"
greeting_id[2]="Sudah Makan Malam?"
greeting_id[3]="Waktunya tidur."
greeting_id[4]="Apa kabar?"
var greeting_ja=new Array(4);
greeting_ja[0]="おはよう!"
greeting_ja[1]="やあ!"
greeting_ja[2]="晩ご飯はもう食べた?"
greeting_ja[3]="もう寝る時間だよ。"
greeting_ja[4]="こんな夜にどうしたの?"
var greeting_ko=new Array(4);
greeting_ko[0]="좋은 아침!"
greeting_ko[1]="좋은 오후!"
greeting_ko[2]="저녁 드셨어요?"
greeting_ko[3]="잘 시간이네요."
greeting_ko[4]="와썹?"
var greeting_ca=new Array(4);
greeting_ca[0]="Bon dia!"
greeting_ca[1]="Que bé que et veig aquesta tarda!"
greeting_ca[2]="Encara has de sopar?"
greeting_ca[3]="És l'hora d'anar a dormir."
greeting_ca[4]="Què passa?"
var greeting_nb=new Array(4);
greeting_nb[0]="God morgen!"
greeting_nb[1]="God ettermiddag!"
greeting_nb[2]="Har du spist middag?"
greeting_nb[3]="Dags for senga."
greeting_nb[4]="Hva skjer?"
var greeting_ar=new Array(4);
greeting_ar[0]="صبح بخیر "
greeting_ar[1]="از دیدنتان در این بعدازظهر خوشحالم "
greeting_ar[2]="هنوز شامتون رو نخوردید؟"
greeting_ar[3]="وقت خواب رسیده "
greeting_ar[4]="چه خبر؟"
var greeting_el=new Array(4);
greeting_el[0]="Καλημέρα!"
greeting_el[1]="Μεγάλη μου χαρά που σας βλέπω μέσα στο Απόγευμα!"
greeting_el[2]="Έχετε φάει το δείπνο σας ακόμα;"
greeting_el[3]="Ήρθε η ώρα για ύπνο."
greeting_el[4]="Τι κάνεις;"


if(localStorage['language']=="zh-TW"){
greetingtxt=greeting_zh_tw[num]
}else if(localStorage['language'].search('es')!=-1){
greetingtxt=greeting_es[num]
}else if(localStorage['language'].search('ru')!=-1){
greetingtxt=greeting_ru[num]
}else if(localStorage['language'].search('nl')!=-1){
greetingtxt=greeting_nl[num]
}else if(localStorage['language']=="pt-BR"){
greetingtxt=greeting_pt_br[num]
}else if(localStorage['language']=="zh-CN"||localStorage['language']=="zh"){
greetingtxt=greeting_zh_cn[num]
}else if(localStorage['language'].search('fr')!=-1){
greetingtxt=greeting_fr[num]
}else if(localStorage['language'].search('he')!=-1){
greetingtxt=greeting_he[num]
}else if(localStorage['language'].search('de')!=-1){
greetingtxt=greeting_de[num]
}else if(localStorage['language']=="pt-PT"){
greetingtxt=greeting_pt_pt[num]
}else if(localStorage['language'].search('cs')!=-1){
greetingtxt=greeting_cs[num]
}else if(localStorage['language'].search('ro')!=-1){
greetingtxt=greeting_ro[num]
}else if(localStorage['language'].search('pl')!=-1){
greetingtxt=greeting_pl[num]
}else if(localStorage['language'].search('it')!=-1){
greetingtxt=greeting_it[num]
}else if(localStorage['language'].search('fi')!=-1){
greetingtxt=greeting_fi[num]
}else if(localStorage['language'].search('tr')!=-1){
greetingtxt=greeting_tr[num]
}else if(localStorage['language'].search('id')!=-1){
greetingtxt=greeting_id[num]
}else if(localStorage['language'].search('ja')!=-1){
greetingtxt=greeting_ja[num]
}else if(localStorage['language'].search('ko')!=-1){
greetingtxt=greeting_ko[num]
}else if(localStorage['language'].search('ca')!=-1){
greetingtxt=greeting_ca[num]
}else if(localStorage['language'].search('nb')!=-1){
greetingtxt=greeting_nb[num]
}else if(localStorage['language'].search('ar')!=-1){
greetingtxt=greeting_ar[num]
}else if(localStorage['language'].search('el')!=-1){
greetingtxt=greeting_el[num]
}else{
greetingtxt=greeting_en[num]
}

return greetingtxt
}


function change_time_to_12(num){
if(num>12){
num=num-12
}
if(num==0){
num=12
}
return num;
}


//Translate background notification

function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}

function bgnotitxt(){
var today=new Date()
if(localStorage["pm"]=="true"){
var time=change_time_to_12(today.getHours())+":"+checkTime(today.getMinutes())+" "+pmam()+".";
var b_time=pmam()+change_time_to_12(today.getHours())+":"+checkTime(today.getMinutes());
}else{
var time=today.getHours()+":"+checkTime(today.getMinutes())+".";
var b_time=today.getHours()+":"+checkTime(today.getMinutes());
}
var title=""

if(localStorage['language']=="zh-TW"){
title="整點報時<br>現在是"+b_time+"。"
}else if(localStorage['language'].search('es')!=-1){
title="Notificación en el Escritorio<br>Ahora son las "+time
}else if(localStorage['language'].search('ru')!=-1){
title="Ежечасное оповещение<br>Сейчас "+time
}else if(localStorage['language'].search('nl')!=-1){
title="Tijdnotificatie per uur<br>Het is nu "+time
}else if(localStorage['language']=="pt-BR"){
title="Anúncio a cada hora<br>Agora são "+time
}else if(localStorage['language']=="zh-CN"||localStorage['language']=="zh"){
title="整点报时<br>现在是"+b_time+"。"
}else if(localStorage['language'].search('fr')!=-1){
title="Annonce des heures<br>Il est maintenant "+time
}else if(localStorage['language'].search('he')!=-1){
title="הכרזה שעתית<br>עכשיו "+time
}else if(localStorage['language'].search('de')!=-1){
title="Stündliche Zeitansage<br>Es ist "+time+"uhr."
}else if(localStorage['language']=="pt-PT"){
title="Notificação das horas<br>Horas "+time
}else if(localStorage['language'].search('cs')!=-1){
title="Oznámení hodiny<br>Právě je "+time
}else if(localStorage['language'].search('ro')!=-1){
title="Notificare continua (1h)<br>Acum este "+time
}else if(localStorage['language'].search('pl')!=-1){
title="Powiadomienie co godzinę<br>Aktualny czas "+time
}else if(localStorage['language'].search('it')!=-1){
title="Notifiche orarie<br>Sono le "+time
}else if(localStorage['language'].search('fi')!=-1){
title="Jokatuntinen ajan ilmoitus<br>Kello on "+time
}else if(localStorage['language'].search('tr')!=-1){
title="Saat başı duyurusu<br>Şu an saat "+time
}else if(localStorage['language'].search('id')!=-1){
title="Pengumuman Waktu Tiap Jam<br>Sekarang pukul "+time
}else if(localStorage['language'].search('ja')!=-1){
title="時報…<br>現在時刻 "+b_time+"。"
}else if(localStorage['language'].search('ko')!=-1){
title="매 시각 알림…<br>현재시각 "+b_time
}else if(localStorage['language'].search('ca')!=-1){
title="Notificació horària...<br>Ara són les "+time
}else if(localStorage['language'].search('nb')!=-1){
title="Klokka er nå...<br>Klokka er "+time
}else if(localStorage['language'].search('ar')!=-1){
title="اعلان زمان ساعتی ...<br>ساعت  "+b_time
}else if(localStorage['language'].search('el')!=-1){
title="Ωριαία Ανακοίνωση Ώρας...<br>Τώρα είναι "+time
}else{
title="Hourly Time annoucement...<br>Time is now "+time
}
return title
}


//Return am or pm

function pmam(){
var today=new Date();
var am
var pm
if(getTimezone()>=12)
{
if(localStorage['language']=="zh-TW"||localStorage['language']=="zh-CN"||localStorage['language']=="zh"){
pm="下午"
}else if(localStorage['language'].search('es')!=-1){
pm="p.m."
}else if(localStorage['language'].search('ru')!=-1){
pm="p.m."
}else if(localStorage['language'].search('he')!=-1){
pm="ערב"
}else if(localStorage['language'].search('cs')!=-1){
pm="<font style=font-size:12px>odpoledne</font>"
}else if(localStorage['language'].search('ja')!=-1){
pm="午後"
}else if(localStorage['language'].search('ko')!=-1){
pm="오후"
}else if(localStorage['language'].search('ca')!=-1){
pm="hores"
}else if(localStorage['language'].search('ar')!=-1){
pm="<font style=font-size:12px>بعد از ظهر </font>"
}else if(localStorage['language'].search('ko')!=-1){
pm="μ.μ"
}else{
pm="pm"
}

return pm
}else{
if(localStorage['language']=="zh-TW"||localStorage['language']=="zh-CN"||localStorage['language']=="zh"){
am="早上"
}else if(localStorage['language'].search('es')!=-1){
am="a.m."
}else if(localStorage['language'].search('ru')!=-1){
am="a.m."
}else if(localStorage['language'].search('he')!=-1){
am="בוקר"
}else if(localStorage['language'].search('cs')!=-1){
am="dopoledne"
}else if(localStorage['language'].search('ja')!=-1){
am="午前"
}else if(localStorage['language'].search('ko')!=-1){
am="오전"
}else if(localStorage['language'].search('ca')!=-1){
am="am"
}else if(localStorage['language'].search('ar')!=-1){
am="<font style=font-size:12px>پیش از ظهر </font>"
}else if(localStorage['language'].search('el')!=-1){
am="π.μ"
}else{
am="am"
}

return am
}
}








function showsaved(){
var txt
if(localStorage['language']=="zh-TW"){
txt="已儲存。"
}else if(localStorage['language']=="zh-CN"){
txt="已保存。"
}else if(localStorage['language'].search('es')!=-1){
txt="Las opciones son salvos."
}else if(localStorage['language'].search('ru')!=-1){
txt="Настройки сохраняются."
}else if(localStorage['language'].search('nl')!=-1){
txt="Opties worden opgeslagen."
}else if(localStorage['language'].search('pt')!=-1){
txt="As opções são salvas."
}else if(localStorage['language'].search('fr')!=-1){
txt="Les options sont enregistrées."
}else if(localStorage['language'].search('de')!=-1){
txt="Optionen werden gespeichert."
}else if(localStorage['language'].search('cs')!=-1){
txt="Volby jsou uloženy."
}else if(localStorage['language'].search('pl')!=-1){
txt="Opcje zostaną zapisane."
}else if(localStorage['language'].search('it')!=-1){
txt="Le opzioni sono salvate."
}else if(localStorage['language'].search('ro')!=-1){
txt="Opţiunile sunt salvate."
}else if(localStorage['language'].search('fi')!=-1){
txt="Valinnat tallennetaan."
}else if(localStorage['language'].search('tr')!=-1){
txt="Seçenekler kaydedilir."
}else if(localStorage['language'].search('ja')!=-1){
txt="保存しました。"
}else if(localStorage['language'].search('ko')!=-1){
txt="저장됨."
}else if(localStorage['language'].search('ca')!=-1){
txt="Desat."
}else if(localStorage['language'].search('nb')!=-1){
txt="Lagret."
}else if(localStorage['language'].search('ar')!=-1){
txt="ذخیره شد "
}else if(localStorage['language'].search('el')!=-1){
txt="Αποθηκεύτηκε."
}else{
txt="Saved."
}





return txt
}


//option page modified options not saved
function opquit(){
if(unsave==1){
var txt=""
switch(localStorage["language"])
{
default:
 txt="Modified options have not been saved! Continue anyway?"
case "es":
 txt="Cambio de las opciones no se guardan! ¿Desea continuar?"
 break;
case "zh-TW":
 txt="修改過的選項還未被儲存! 要繼續嗎?"
 break;
case "zh-CN":
 txt="你忘了储存啊! 要继续吗?"
 break;
case "ja":
 txt="変更されたオプションは保存されません！続行しますか？"
 break;
case "ko":
 txt="수정된 옵션이 저장되지 않았습니다! 계속하시겠습니까?"
 break;
case "el":
 txt="Τροποποιημένο επιλογές δεν έχουν αποθηκευτεί! Θέλετε να συνεχίσετε;"
 break;
}
return txt
}
}






//Create context menu items
function createMenuItem(){


var txt1="Set an alarm"
var txt2="Start a countdown"
//-------------------------
var txt3="Digital Clock"
var txt4="Analog Clock"
//-------------------------
var option="Options..."
//-------------------------
var cmt="Bug report / Comments"
var dont="Don't show these items"
var about="About Chrome Clock"

//child--------------------
var chat="Chat box"
var fourm="Forum"

var lang = localStorage['language']

if(lang=='zh-TW'){
txt1="設定鬧鈴"
txt2="倒數器"
txt3="數字時鐘"
txt4="指針時鐘"
option="設定…"
cmt="問題回報 / 意見"
var dont="隱藏這個右鍵表單"
about="關於 有型時鐘"
chat="聊天室"
fourm="論壇"
}else if(lang=='zh-CN'){
txt1="设定闹铃"
txt2="倒数器"
txt3="数字时钟"
txt4="指针时钟"
option="设定…"
cmt="提交错误 / 意见"
var dont="隐藏这个右键菜单"
about="关于 酷时钟"
chat="聊天室"
fourm="论坛"
}else if(localStorage['language'].search('ja')!=-1){
txt1="アラーム…"
txt2="カウントダウンタイマー"
txt3="デジタル時計"
txt4="アナログ時計"
option="設定…"
cmt="バグの報告 / コメント"
dont="この右クリックメニューを隠す"
about="Cool 時計 について"
var chat="チャットルーム"
var fourm="フォーラム"
}else if(localStorage['language'].search('es')!=-1){
txt1="Alarma..."
txt2="Temporizador de cuenta regresiva"
txt3="Reloj digital"
txt4="Reloj analógico"
option="Opciones..."
cmt="Error / Comentario"
dont="Ocultar el menú del botón derecho"
about="Sobre"
}else if(localStorage['language'].search('ko')!=-1){
txt1="알람 시계..."
txt2="카운트다운 시계"
txt3="디지털 시계"
txt4="아날로그 시계"
option="옵션..."
cmt="버그 보고서 / 의견"
dont="이 마우스 오른쪽 클릭 메뉴 숨기기"
about="에 대하여 Cool 시계"
var chat="대화방"
var fourm="포럼"
}else if(localStorage['language'].search('ca')!=-1){
txt1="Establir una alarma..."
txt2="Temporitzador de compte enrere"
txt3="Utilitzar el rellotge digital"
txt4="Utilitzar el rellotge analògic"
option="Opcions..."
cmt="Reportar un error / comentaris"
about="Sobre Rellotge Cool"
}else if(localStorage['language'].search('nb')!=-1){
txt1="Alarm..."
txt2="Nedtellingstidtaker"
txt3="Bruk digitalklokke"
txt4="Bruk analogklokke"
option="Innstillinger..."
cmt="Send en bug / kommentarer"
about="Om Cool-klokke"
}else if(localStorage['language'].search('ar')!=-1){
txt1="آلارم ساعت... "
txt2="شمارنده شمارش معکوس "
txt3="نمایش ساعت دیجیتال "
txt4="نمایش ساعت عقربه ایی "
option="تنظیمات... "
cmt="گزارش اشکالات / نظرات"
about="درباره Cool ساعت"
}else if(lang.search('el')!=-1){
txt1="Ορίστε μια ειδοποίηση"
txt2="χρονόμετρο αντίστροφης μέτρησης"
txt3="ψηφιακό ρολόι"
txt4="αναλογικό ρολόι"
option="Ρυθμίσεις..."
cmt="Έκθεση Bug / Σχόλια"
var dont="Να μην εμφανίζονται αυτά τα στοιχεία"
about="Σχετικά Cool ρολόι"
chat="Chat room"
fourm="Φόρουμ"
}


var digitka
if(localStorage["use_digit"]=="true"||localStorage["use_digit"]==null){
digitka=true
}else{
digitka=false
}

var ext_name=chrome.i18n.getMessage('extName')

chrome.contextMenus.create({title:"   --- "+ext_name+" ---",onclick:function(){window.open("http://goo.gl/uxCaW","_blank")}});
chrome.contextMenus.create({type:"separator"});
chrome.contextMenus.create({title:txt1,onclick:function(){alarm()}});
chrome.contextMenus.create({title:txt2,onclick:function(){countdown()}});
chrome.contextMenus.create({type:"separator"});
chrome.contextMenus.create({type:"radio",checked:digitka,title:txt3,onclick:function(){localStorage["use_digit"]=true}})
chrome.contextMenus.create({type:"radio",title:txt4,onclick:function(){localStorage["use_digit"]=false}})
chrome.contextMenus.create({type:"separator"});
//chrome.contextMenus.create({title:option,onclick:function(){window.open("options.html","_newtab","width="+(screen.width-10)+",height="+(screen.availHeight-40)+",top=0,left=0");}})
chrome.contextMenus.create({title:option,onclick:function(){window.open("options.html","_blank")}})
chrome.contextMenus.create({type:"separator"});
var cmtid=chrome.contextMenus.create({title:cmt});
chrome.contextMenus.create({title:"> "+chat,parentId:cmtid,onclick:function(){window.open("comments.html","_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=500,left=10,top=10")}});
chrome.contextMenus.create({title:"> "+fourm,parentId:cmtid,onclick:function(){window.open("http://goo.gl/WwuLR","_blank")}});
chrome.contextMenus.create({title:"> Facebook",parentId:cmtid,onclick:function(){window.open("http://www.facebook.com/coolclock","_blank")}});

chrome.contextMenus.create({title:dont,onclick:function(){if(confirm("Are you sure?\n\nYou can turn it back on in the options page.")==false){return false};localStorage["context_menu_item_enable"]="false";chrome.contextMenus.removeAll()}});
chrome.contextMenus.create({title:about,onclick:function(){aboutCC()}});

}
