// The JavaScript code for Write Your Name in Runes orginally by Mikael Persson at http://izekube.tripod.com/runes.html  Code used/modified by NOVA Online with permission of the author.// Version 1.3// Message to all "cut and paste" programmers: // I have spent quite some time and energy in this code! Please respect that.// - You may NOT PUBLISH a copy of the javascript anywhere WITHOUT MY PERMISSION!// + But you may of course make a PRIVATE copy of it.// - Please do NOT use my javascript to produce ANOTHER "VIKING RUNES TRANSLATOR",// I want this to be unique for my site only...// + But you are always FREE TO MODIFY my javascript slightly TO SOMETHING ELSE.// For example: a chinese, arabic or hebrew "translator".// ! If you use large portions of my javascript code:// Please note the author and link to me. OK? That's pretty fair is it not? function babelfish(rekvesto) {        var LENGTH = rekvesto.length;                                // get length of input        var PHRASE = new Array(LENGTH);                              // define an array of letters        var INT = null;                                              // define variable        var STATUS = null;                                           // define variable        var TEMP = null;                                                   // define variable        var ALTTEXT = null;                                          // define variable        var a = "<img src=\"";                                        // IMG start        var b = "/wgbh/nova/vikings/images/";    	 // define path for graphics      	var c ="runes_";                                             // default start of filename        var d = "?";                                                 // vikingletter        var e = ".gif";                                              // default file-extension        var f = "\" alt=\"";                                           // IMG continued        var g = "\" hspace=\"5\" vspace=\"2\" align=\"middle\">";           // IMG end        // Some layout:        var YourName = window.open("","Result","width=600,height=150,Menubar=1,Status=1,Location=0,Resizable=1");  //Opens a new browser window        YourName.document.open(); //Opens document for adding stuff        YourName.document.write('<HTML><HEAD><title>Your Name in Runes - Result Window\</title>\</HEAD>');        YourName.document.write('<BODY bgcolor=\"#336666\" text=\"#ffffff\" link=\"#CC9900\" vlink=\"#330066\" alink=\"#990066\"><center><br><br>');        // -- Store all letters as lowercase in array "PHRASE": --         for (INT=0; INT<LENGTH; INT++)         {                TEMP = rekvesto.charAt(INT);                TEMP = TEMP.toLowerCase();                PHRASE[INT]=TEMP;        }        // -- Decide what vikingletter to show: --        for (INT=0; INT<LENGTH; INT++)        {                                               d = PHRASE[INT];                if ( d=="a"||d=="b"||d=="d"||d=="f"||d=="g"||                     d=="h"||d=="i"||d=="j"||d=="k"||d=="l"||                     d=="m"||d=="o"||d=="p"||d=="r"||d=="s"||                     d=="u"||d=="w"||d=="z" )                 {                        YourName.document.write(a,b,c,d,e,f,d,g);                }                else                 {                        if ( d==" " || d== "." || d==":" || d=="+" ) // Rune space type 2                        {                                d="sp2";                                ALTTEXT="Spacing";                                STATUS="OK";                        }                        if ( d=="c" ) // Don't know how to translate                        {                                YourName.document.write('\'c\' can not be used!');                                                      STATUS="";                        }                if ( d=="e" ) // Special letter for EI-sound                        {                                ALTtext="#e";                                if ( PHRASE[INT+1]=="i" )                                {                                        d="ei"; INT=INT+1;                                        ALTtext="#ei";                                }                                STATUS="OK";                        }                if ( d=="n" ) // Special letter for NG-sound                        {                                                          ALTTEXT="n";                                if ( PHRASE[INT+1]=="g" )                                {                                        d="ng"; INT=INT+1;                                        ALTTEXT="ng";                                }                                STATUS="OK";                        }                                if ( d=="q" ) // Q is equal to K                        {                                                                                     d="k";                                ALTTEXT="q";                                STATUS="OK";                        }                        if ( d=="t" ) // Special letter for TH-sound              {                                                                                    ALTTEXT="t";                                if ( PHRASE[INT+1]=="h" )                                 {                                        d="th"; INT=INT+1;                                         ALTTEXT="th";                                }                                STATUS="OK";                        }                        if ( d=="v" ) // V is equal to U                        {                                 d="u";                                ALTTEXT="v";                                STATUS="OK";                        }                        if ( d=="x" ) // X is equal to KS                        {                                YourName.document.write(a,b,c,"k",e,f,"k",g);                                YourName.document.write(a,b,c,"s",e,f,"s",g);                                STATUS="";                        }                        if ( d=="y" ) // Y is equal to J                        {                                d="j";                                ALTTEXT="y";                                STATUS="OK";                        }                        if ( STATUS=="OK" )                         {                        		YourName.document.write(a,b,c,d,e,f,ALTTEXT,g);                                STATUS="";                        }                } // End of Else        } // End of For-loop        // -- Some layout: --        YourName.document.write('<br><br><br><font face=\"arial, helvetica, geneva\" size=\"2\"><a href=\"\" onClick=\"window.close()\">Close this window\</a>\</font>\</center>\</body>\</HTML>');        // -- Close document (otherwise it will continue loading!) --        YourName.document.close();		YourName.focus(); }