
	// Please note that 'romup' (see below) does NOT contain the proper transcription characters,
	// but only PLACEHOLDERS for greek letters; especially the following should be recognised:
	// h = eta			transcription of eta   = e with grave accent
	// y = theta, t = tau		transcription of theta = th
	// o = omicron, w = omega	transcription of omega = oo
	// s = sigma, v = final sigma	transcription of both  = s
	// f = phi			transcription of phi   = ph
	// c = chi			transcription of chi   = ch
	// q = psi			transcription of psi   = ps
	// for input to the 'toGreek' method the placeholders should be passed in, NOT a transcription.
	// the 'toGreek' method returns an array with the greek HTML text in element 0 and the transcription in element 1.
	// keep in mind that only the bare text should be passed in, any embedded HTML will also be transcribed.
	// the transcription rules of gamma and upsilon are according to the Dutch booklet:
	// "Vreemde Woorden in de Sterrenkunde" by Prof. Dr. P.H. van Laer, 2nd (revised) edition,
	// published by J.B. Wolters in Groningen (NL) in the year 1964 (yes, it's one of my old goodies...)
	// (It is a small dictionary of astronomical terms, the title is translated as: "Strange Words in Astronomy")
	// I have added one extra transcription rule:
	// if Eta is at the start of a word it is transcribed as HÈ instead of È

	String.prototype.toGreek = function()
	{	var greek = "Alpha/Beta/Gamma/Delta/Epsilon/Zeta/Eta/Theta/Iota/Kappa/Lambda/Mu/Nu/Xi/Omicron/Pi/Rho/Sigma/sigmaf/Tau/Upsilon/Phi/Chi/Psi/Omega".split("/")
		var trscr = "A /B /G /D /E /Z /&Egrave;/Th /I /K /L /M /N /X /O /P /R /S /S /T /U /Ph /Ch /Ps /Oo /Y".replace(/\s+/g,"").split("/")
		var romup = "A  B  G  D  E  Z  H        Y   I  K  L  M  N  X  O  P  R  S  V  T  U  F   C   Q   W    ".replace(/\s+/g,"")
		var romlo = romup.toLowerCase()
		var gresult = ""
		var tresult = ""
		var i,j,k,chr,nxt,prv,up,tr
		for (i = 0, prv = ""; i < this.length; i++)
		{	chr = this.charAt(i)
			nxt = this.charAt(i+1)
			if (chr == "V") chr = "S"
			if (chr == "s" && (nxt == "" || (romlo.indexOf(nxt) < 0 && romup.indexOf(nxt) < 0) ) ) chr = "v"
			j = romup.indexOf(chr)
			up = (j >= 0)
			if (!up) j = romlo.indexOf(chr)
			k = j
			if ("gG".indexOf(chr) >= 0 &&   "gGkKxXcC".indexOf(nxt) >= 0) k = romup.indexOf("N")
			if ("uU".indexOf(chr) >= 0 && "aAeEiIoOuU".indexOf(prv) <  0) k = romup.length
			tr = trscr[k]
			if (tr == "È" && (prv+" ").search(/\s/) == 0) tr = "H" + tr.toLowerCase()
			if (up && (nxt.toUpperCase() == nxt)) tr = tr.toUpperCase()
			if (j < 0)	{gresult += chr					; tresult += chr		}
			else if (up)	{gresult += "&" + greek[j] + ";"		; tresult += tr			}
			else		{gresult += "&" + greek[j].toLowerCase() + ";"	; tresult += tr.toLowerCase()	}
			prv = chr
		}
		return [gresult,tresult]
	}

