﻿<!--


//===================================
// 01
//===================================


//===================================
// 02
//===================================
function Main(){
gweb.ln=gweb.GetLang(location.href);
SetLanguage(gweb.ln);
gweb.InitOptLang();

var anchor=gweb.GetUrlParam(location.href,"an");
location.href="#" + anchor;
}


//===================================
// 06
//===================================
function SetLanguage(lng){

gweb.ln=lng;
gweb.SaveCookie("lng",gweb.ln);
gweb.RefreshUrl();

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=gweb.ln;

//CZECH
if(lng=="cs"){
	switch(id){

		case 1:return("Bookmarklety");
		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("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.<br /><br />Kategorie: Geocaching");
		case 12:return("Do stránky multikeše na serveru <i>www.geocaching.com /seek/cache_detail.aspx...</i> vloží do tabulky waypointů textové pole, které vyplní vygenerovaným textem pro GPX soubor.<br /><br />Kategorie: Geocaching");

		//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("Bookmarklets");
		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("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.<br /><br />Category: Geocaching");
		case 12:return("Generates a text for the GPX. On the multicache's page <i>from server www.geocaching.com / seek / cache_detail.aspx</i> adds textarea into the table of waypoints. This textarea is filled by text for the GPX file.<br /><br />Category: Geocaching");

		//SYSTEM ERROR: UNDEFINED ID
		default:return("LoadResString: undefined id=" + id);

	}//end-of-switch

}//end-of-switch

}//end-of-LoadResString

--> 
