﻿<!--


//===================================
// 01
//===================================


//===================================
// 02
//===================================
function Main(){
gstrLn=AppsGetLang(location.href);
SetLanguage(gstrLn);
webInitOptLang();

var anchor=AppsGetUrlParam(location.href,"an");
location.href="#" + anchor;
}


//===================================
// 06
//===================================
function SetLanguage(lng){

gstrLn=lng;

AppsSaveCookie("lng",gstrLn);

AppsRefreshUrl();

//document.title=LoadResString(1);
//document.getElementsByTagName("h1")[0].innerHTML=LoadResString(1);


var lrs=new Array();

lrs[0]=new Array("ln-chordtrans",2);
/*lrs[1]=new Array("bookmarklets-info",10);
lrs[2]=new Array("bookmarklets-gpscc-info",11);
lrs[3]=new Array("bookmarklets-mcgpx-info",12);
*/

for(var i=0;i<lrs.length;i++)document.getElementById(lrs[i][0]).innerHTML=LoadResString(lrs[i][1]);



}


//===================================
// 07
//===================================
function LoadResString(id,lng){

if(lng==undefined)lng=gstrLn;

//CZECH
if(lng=="cs"){
	switch(id){

		case 1:return("Software");
		case 2:return("Transponer akordů");
		
		case 10:return("Bookmarklet je krátký kód napsaný v nějakém skriptovacím jazyce, např. v javascriptu. Kód je vložen přímo do html stránky jako běžný odkaz - link. Bookmarklet přidejte pomocí myši kliknutím pravého tlačítka mezi Oblíbené položky  vašeho internetového prohlížeče. Kliknutím na bookmarklet z oblíbených položek bude spuštěn kód bookmarkletu.");
		case 11:return("Je určen pro všechny, kteří jsou postiženi závislostí zvanou geocaching. Ze stránky, listingu, nějaké konkrétní keše na serveru <i>www.geocaching.com /seek/cache_detail.aspx...</i>  pošle souřadnice programu <i>GPS Coord Calc</i>, který je zpracuje.");
		case 12:return("Další bookmarklet určený pro geocachery posílá souřadnice etap (stages) ze stránky, listingu, nějaké konkrétní multikeše na serveru <i>www.geocaching.com /seek/cache_detail.aspx...</i> na web <i>www.txtester.com</i>, který vytvoří text GPX souboru.");

		//SYSTEM ERROR: UNDEFINED ID
		default:return("LoadResString: nedefinované id=" + id);

	}//end-of-switch
}//end-of-if


//NOT ENGLISH
if(lng!="en"){
	var strEn=LoadResString(id,"en");
	try{
		google.language.translate(strEn,"en",lng,function(result){
			if(!result.error)return(result.translation);
		});
		return(strEn);
	}
	catch(err){
		return(strEn);
	}
}


//ENGLISH = ENGLISH + SOURCE LANGUAGE FOR TRANSLATING
if(lng=="en"){
	switch(id){

		case 1:return("Software");
		case 2:return("Chord Transposer");

		case 10:return("Bookmarklet is a short code written in any scripting language, such as JavaScript. The code is inserted directly into the html page as a regular link. Bookmarklet add by clicking the right mouse button, the Favorites menu of your browser. Clicking on the bookmarklet from the Favorites will start bookmarklet code.");
		case 11:return("It is intended for all who are affected by addiction called geocaching. The coordinates of a cache <i>from server www.geocaching.com / seek / cache_detail.aspx</i> sends on <i>GPS Coord Calc</i> for processing.");
		case 12:return("This bookmarklet sends coordinates of the multicache stages from  <i>www.geocaching.com / seek / cache_detail.aspx ...</i> to <i>www.txtester.com</i> site, which will creates a <i>GPX</i> file text.");

		//SYSTEM ERROR: UNDEFINED ID
		default:return("LoadResString: undefined id=" + id);

	}//end-of-switch

}//end-of-switch

}//end-of-LoadResString

--> 