     // name - name of the cookie
     // value - value of the cookie
     // [expires] - expiration date of the cookie (defaults to end of current session)
     // [path] - path for which the cookie is valid (defaults to path of calling document)
     // [domain] - domain for which the cookie is valid (defaults to domain of calling document)
     // [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
     // * an argument defaults when it is assigned null as a placeholder
     // * a null placeholder is not required for trailing omitted arguments
     function setCookie(name, value, expires, path, domain, secure) {
       var curCookie = name + "=" + escape(value) +
           ((expires) ? "; expires=" + expires.toGMTString() : "") +
           ((path) ? "; path=" + path : "") +
           ((domain) ? "; domain=" + domain : "") +
           ((secure) ? "; secure" : "");
       document.cookie = curCookie;
     }

     // name - name of the desired cookie
     // * return string containing value of specified cookie or null if cookie does not exist
     function getCookie(name) {
       var dc = document.cookie;
       var prefix = name + "=";
       var begin = dc.indexOf("; " + prefix);
       if (begin == -1) {
         begin = dc.indexOf(prefix);
         if (begin != 0) return null;
       } else
         begin += 2;
       var end = document.cookie.indexOf(";", begin);
       if (end == -1)
         end = dc.length;
       return unescape(dc.substring(begin + prefix.length, end));
     }

     // name - name of the cookie
     // [path] - path of the cookie (must be same as path used to create cookie)
     // [domain] - domain of the cookie (must be same as domain used to create cookie)
     // * path and domain default if assigned null or omitted if no explicit argument proceeds
     function deleteCookie(name, path, domain) {
       if (getCookie(name)) {
         document.cookie = name + "=" + 
         ((path) ? "; path=" + path : "") +
         ((domain) ? "; domain=" + domain : "") +
         "; expires=Thu, 01-Jan-70 00:00:01 GMT";
       }
     }

     // language - name of language
     function setLanguage(language) {
       // create an instance of the Date object
       var now = new Date();
       // cookie expires in 1 days
       // 365 days in a year
       // 24 hours in a day
       // 60 minutes in an hour
       // 60 seconds in a minute
       // 1000 milliseconds in a second
       now.setTime(now.getTime() + 1 * 24 * 60 * 60 * 1000);
       setCookie("language", language , now);
     }

     // assure english for index.html from greek or russian
     function setEng() {
       var language = getCookie("language");
       if (language == "grk" || language == "rus"){setLanguage("eng");}
     }

     // line - line number 0,1,2,3,4
     function setLine(line,lang) {
       var blink = "";
       var blinke = "";
       var language = getCookie("language");
       if (lang == language){
		blink = "<blink><font color=#00FFFF>";
            blinke = "</font></blink>";
       }
       if (lang != null){language = lang;}
       if (language == "eng") {
            if (line == "0"){
                 if (lang != null){document.write(blink+"English"+blinke);}
              }
            if (line == "4") {document.write("No");}
      }
       if (language == "che") {
            if (line == "0"){document.write(blink+"Eski"+blinke);}
            if (line == "1"){document.write("Vítat druh.");}
		if (line == "2"){document.write("Vychování èlen urèitý duše a duch.");}
            if (line == "3"){document.write(": SLOVA");}
            if (line == "4"){document.write("(Czech)");}
            return
	 }
       if (language == "cro") {
            if (line == "0"){document.write(blink+"Hrvatski"+blinke);}
            if (line == "1"){document.write("Dobrodošlica prijatelj.");}
		if (line == "2"){document.write("Prehrana od duša i duh.");}
            if (line == "3"){document.write(": RIJEÈS");}
            if (line == "4"){document.write("(Croatian)");}
            return
	 }
       if (language == "dan") {
            if (line == "0"){document.write(blink+"Danske"+blinke);}
            if (line == "1"){document.write("Velkommen bekendt.");}
		if (line == "2"){document.write("Hygge nemlig den sjæl og appel.");}
            if (line == "3"){document.write(": ORD");}
            if (line == "4"){document.write("(Danish)");}
            return
	 }
       if (language == "dut") {
            if (line == "0"){document.write(blink+"Flemisch"+blinke);}
            if (line == "1"){document.write("Welkomstgroet vriendin.");}
		if (line == "2"){document.write("Troost voor naar de ziel en vurigheid.");}
            if (line == "3"){document.write(": TEKST");}
            if (line == "4"){document.write("(Dutch)");}
            return
	 }
       if (language == "tag") {
            if (line == "0"){document.write(blink+"Tagalog"+blinke);}
            if (line == "1"){document.write("Taggapin kaibigan.");}
		if (line == "2"){document.write("Bumuhay ang kaluluwa at tangayin.");}
            if (line == "3"){document.write(": PUMASOK");}
            if (line == "4"){document.write("(Filipino)");}
            return
	 }
       if (language == "fin") {
            if (line == "0"){document.write(blink+"Suomi"+blinke);}
            if (line == "1"){document.write("Tervetullut ystävä.");}
		if (line == "2"){document.write("Hoito ilmaisee omistajaa se sielu ja henki.");}
            if (line == "3"){document.write(": PUHE");}
            if (line == "4"){document.write("(Finnish)");}
            return
	 }
       if (language == "fre") {
            if (line == "0"){document.write(blink+"Fran&ccedil;ais"+blinke);}
            if (line == "1"){document.write("Bienvenue amie.");}
		if (line == "2"){document.write("Élever de l'âme et âme.");}
            if (line == "3"){document.write(": RÉDIGER");}
            if (line == "4"){document.write("(French)");}
            return
	 }
       if (language == "ger") {
            if (line == "0"){document.write(blink+"Deutsche"+blinke);}
            if (line == "1"){document.write("Sie begrüßen Freund.");}
		if (line == "2"){document.write("Nährend der Seele und Geist.");}
            if (line == "3"){document.write(": TEXT");}
            if (line == "4"){document.write("(German)");}
            return
	 }
       if (language == "grk") {
            if (line == "0"){document.write(blink+"ÅëëçíéêÞ"+blinke);}
            if (line == "1"){document.write("Êáëþs Þñèáôå ößëïs.");}
		if (line == "2"){document.write("ÔñïöÞ ãéá øõ÷Þ êáé ðíåýìá.");}
            if (line == "3"){document.write(": ËÝÎÇ");}
            if (line == "4"){document.write("(Greek)");}  
            return
	 }
       if (language == "tur") {
            if (line == "0"){document.write(blink+"Türkçe"+blinke);}
            if (line == "1"){document.write("Hoþ geldiniz arkadaþ.");}
		if (line == "2"){document.write("Yemek servisi belgili tanýmlýk ruh & can.");}
            if (line == "3"){document.write(": Girmek");}
            if (line == "4"){document.write("(Turkish)");}
            return
	 }
       if (language == "hun") {
            if (line == "0"){document.write(blink+"Magyar"+blinke);}
            if (line == "1"){document.write("Szívesen látnak barát.");}
		if (line == "2"){document.write("Táplál a léleknek és szellem.");}
            if (line == "3"){document.write(": SZÖVEG");}
            if (line == "4"){document.write("(Hungarian)");}
            return
	 }
       if (language == "ice") {
            if (line == "0"){document.write(blink+"&Iacute;slenska"+blinke);}
            if (line == "1"){document.write("Velkominn vinur.");}
		if (line == "2"){document.write("Uppfóstrun af sál og andi.");}
            if (line == "3"){document.write(": ORÐ");}
            if (line == "4"){document.write("(Icelandic)");}
            return
	 }
       if (language == "ita") {
            if (line == "0"){document.write(blink+"Italiano"+blinke);}
            if (line == "1"){document.write("Benvenuto amico.");}
		if (line == "2"){document.write("Nutrimento del anima e spirito.");}
            if (line == "3"){document.write(": PAROLA");}
            if (line == "4"){document.write("(Italian)");}
            return
	 }
       if (language == "jpn") {
            if (line == "0"){document.write(blink+"Nihongo"+blinke);}
            if (line == "1"){document.write("kouguu tomonari.");}
		if (line == "2"){document.write("kaii kokoronokinsen kouotsu goshou.");}
            if (line == "3"){document.write(": WABUN");}
            if (line == "4"){document.write("(Japanese)");}
            return
	 }
       if (language == "nor") {
            if (line == "0"){document.write(blink+"Norsk"+blinke);}
            if (line == "1"){document.write("Velkommen venn.");}
		if (line == "2"){document.write("Omsorg for sjelen og sprit.");}
            if (line == "3"){document.write(": ORD");}
            if (line == "4"){document.write("(Norwegian)");}
            return "(" + language + ")"
	 }
       if (language == "poe") {
            if (line == "0"){document.write(blink+"Portueguese"+blinke);}
            if (line == "1"){document.write("Bem vindo amigo.");}
		if (line == "2"){document.write("Criação do alma e alento.");}
            if (line == "3"){document.write(": PALAVRAS");}
            if (line == "4"){document.write("(Portuguese)");}
            return
	 }
       if (language == "pob") {
            if (line == "0"){document.write(blink+"Portueguese do Bresil"+blinke);}
            if (line == "1"){document.write("benvido amiga.");}
		if (line == "2"){document.write("Ave da alma E hálito.");}
            if (line == "3"){document.write(": Texto");}
            if (line == "4"){document.write("(Brazilian Spanish)");} 
            return
	 }
       if (language == "pol") {
            if (line == "0"){document.write(blink+"Polski"+blinke);}
            if (line == "1"){document.write("Mile widziany przyjaciel.");}
		if (line == "2"){document.write("Wychowujšcy ten dusza i duch.");}
            if (line == "3"){document.write(": S£OWA");}
            if (line == "4"){document.write("(Polish)");}
            return
	 }
       if (language == "rus") {
            if (line == "0"){document.write(blink+"Ðóññêèé"+blinke);}
            if (line == "1"){document.write("Äîáðî ïîæàëîâàòü äðóã.");}
		if (line == "2"){document.write("Ïèòàíèå ÿíèå) îò ãðàììàòè÷åñêèé îïðåäåëåííûé ÷ëåí äóøà è äóõ.");}
            if (line == "3"){document.write(": ÑËÎÂÎ");}
            if (line == "4"){document.write("(Russian)");}
            return
	 }
       if (language == "sel") {
            if (line == "0"){document.write(blink+"Srpski"+blinke);}
            if (line == "1"){document.write("Dobrodošao prijatelj.");}
		if (line == "2"){document.write("Othraniti nad odreðeni èlan duša pa duh.");}
            if (line == "3"){document.write(": REÈI");}
            if (line == "4"){document.write("(Serbian)");} 
            return
	 }
       if (language == "rom") {
            if (line == "0"){document.write(blink+"Român"+blinke);}
            if (line == "1"){document.write("Bun venit prieten.");}
		if (line == "2"){document.write("Mamã art.hot. de-a pururi corp ºi spirit.");}
            if (line == "3"){document.write(": Intrã");}
            if (line == "4"){document.write("(Romanian)");} 
            return
	 }
       if (language == "bul") {
            if (line == "0"){document.write(blink+"Áúëãàðèí"+blinke);}
            if (line == "1"){document.write("äîáðå äîøúë ïðèÿòåë.");}
		if (line == "2"){document.write("Õðàíÿ äóøà è äóõ.");}
            if (line == "3"){document.write(": Äóìà");}
            if (line == "4"){document.write("(Bulgarian)");} 
            return
	 }
       if (language == "slo") {
            if (line == "0"){document.write(blink+"Slovenski"+blinke);}
            if (line == "1"){document.write("Izreèi dobrodošlico prijatelj.");}
		if (line == "2"){document.write("Vzgoja od duša ter duh.");}
            if (line == "3"){document.write(": TEKST");}
            if (line == "4"){document.write("(Slovenian)");}
            return
	 }
       if (language == "spa") {
            if (line == "0"){document.write(blink+"Espa&ntilde;ol"+blinke);}
            if (line == "1"){document.write("Acogen amigo.");}
		if (line == "2"){document.write("Nutren de la alma y genio.");}
            if (line == "3"){document.write(": PALABRAS");}
            if (line == "4"){document.write("(Spanish)");}
            return
	 }

       if (language == "swe") {
            if (line == "0"){document.write(blink+"Svensk"+blinke);}
            if (line == "1"){document.write("Välkommen vännen.");}
		if (line == "2"){document.write("Omsorg om själen och anden.");}
            if (line == "3"){document.write(": ORDEN");}
            if (line == "4"){document.write("(Swedish)");}
            return
	 }
       if (language == "wel") {
            if (line == "0"){document.write(blink+"Cymraeg"+blinke);}
            if (line == "1"){document.write("Hawddamor chyfaill.");}
		if (line == "2"){document.write("Maethu 'r enaid a hysbryd.");}
            if (line == "3"){document.write(": EIRIAU");}
            if (line == "4"){document.write("(Welsh)");}
            return
	 }
       if (language == "ltt") {
            if (line == "0"){document.write(blink+"Latin"+blinke);}
            if (line == "1"){document.write("Viva amicus.");}
		if (line == "2"){document.write("Succurro animus & phasmatis.");}
            if (line == "3"){document.write(": Penetro");}
            if (line == "4"){document.write("(Ancient)");}
            return
	 }
     }


// request translation
     function trans(placex) {
       var language = getCookie("language");
	 var place = placex;
       var transub = place;
// uses current page if no page specified
       if (place == null) {place = location.href;}
//     if (language == null) {return}
// if english or real audio pass the address without translation
       if (language == "eng") { 
            transub = "http://" + transub;
            top.location.href = transub;
            return
       }
// transexp is 3 letter language  freetranslation is more
       if (language.length > 3){
              transub = "http://fets3.freetranslation.com/?Sequence=core&Url=";
              transub = transub + place + "&Language=English%2F" + language;
       }
       else {
              transub = "http://www.tranexp.com:2000/InterTran?type=url&url=http%3A%2F%2F";
              transub = transub + place + "&from=eng&to=" + language;
       }
       top.location.href = transub;
     }

	
// Correctly frame based on frame logo in index1.html script
//   escape if language was set or translation
     function outunder(level) {
       var curloc = location.href;
       var newloc;
       if (curloc.indexOf("tranexp")>0){return;}
       var language = getCookie("language");
//     if (language != null) {return}
       if (curloc==top.location.href) {
         offset = curloc.lastIndexOf("/");
         if (offset <=0 ) {
           newloc = curloc + "/index1.html";
         }
         else {
           newloc = curloc.substring(0,offset);
           if (level == "2") {offset = newloc.lastIndexOf("/");}
           newloc = newloc.substring(0,offset) + "/index1.html";
         }
         if (level == "2") {newloc = newloc + "?page=" +
              curloc.substring(offset,curloc.length-5)+".html";}
         top.location.href = newloc;
       }
     }



// variable to show if .js file loaded
var jslib_loaded = true;
