
var F1;

/*  Opening of the window for FOOTNOTES, old code one */

function Fenster(FensterName, Multiplicator)
{
if (F1) F1.close();
	
switch(Multiplicator) 
        {
            case 1: F1 = window.open(FensterName,"Fenster1","width=640,height=150,resizable=yes,scrollbars=yes");break;
            case 2: F1 = window.open(FensterName,"Fenster1","width=640,height=250,resizable=yes,scrollbars=yes");break;
            case 3: F1 = window.open(FensterName,"Fenster1","width=640,height=350,resizable=yes,scrollbars=yes");break;
            case 4: F1 = window.open(FensterName,"Fenster1","width=640,height=450,resizable=yes,scrollbars=yes");break;
        }

	
F1.focus();

}

function closeF()
{

if (F1) F1.close();

}


/* We set the background colour and save it by writing to cookies*/
function setColor(number)
{
                      
        switch(number) 
        {
                
                case 1: document.bgColor = "FFFFFF";
                            document.cookie = "myColor="+escape(1)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 2: document.bgColor = "FFFBF0";
                            document.cookie = "myColor="+escape(2)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 3: document.bgColor = "E5E5E5";
                            document.cookie = "myColor="+escape(3)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 4: document.bgColor = "DEFFD6";
                            document.cookie = "myColor="+escape(4)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 5: document.bgColor = "98FB98";
                            document.cookie = "myColor="+escape(5)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 6: document.bgColor = "D3EFFF";
                            document.cookie = "myColor="+escape(6)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 7: document.bgColor = "FFCC99";
                            document.cookie = "myColor="+escape(7)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;

                case 8: document.bgColor = "B2B2B2";
                            document.cookie = "myColor="+escape(8)+";expires=Friday, 15-Nov-30 23:12:40 GMT";break;
       } 
}


/* This function does nothing, is good for <a href>-tag, which is not a usual link */
function DoNothing()
{

}


/* The same function, but
          1) without writing to cookies, READING ONLY
          2) we don't need to ask the form, we get our number from cookies directly - so we can use this function in the footnote windows
*/
function setColorWithoutWritingCookies()
{
        var choice; 
        choice = unescape(document.cookie.charAt(8));
        switch(choice)
        {
                case 1: document.bgColor = "FFFFFF"; break; 
                case 2: document.bgColor = "FFFBF0"; break; 
                case 3: document.bgColor = "E5E5E5";break;
                case 4: document.bgColor = "DEFFD6"; break; 
                case 5: document.bgColor = "98FB98"; break; 
                case 6: document.bgColor = "D3EFFF"; break; 
                case 7: document.bgColor = "FFCC99"; break; 
                case 8: document.bgColor = "B2B2B2"; break; 
                
        } 
}



/* This function returns hexadecimal number of color saved in cookies */
function returnTheColorHexadecimal()
{
       var YColor;
       var choice; 
       choice = unescape(document.cookie.charAt(8));

       switch(choice)
       {
                case "1": YColor = "#FFFFFF"; break; 
                case "2": YColor = "#FFFBF0"; break; 
                case "3": YColor = "#E5E5E5"; break; 
                case "4": YColor = "#DEFFD6"; break; 
                case "5": YColor = "#98FB98"; break; 
                case "6": YColor = "#D3EFFF"; break; 
                case "7": YColor = "#FFCC99"; break; 
                case "8": YColor = "#B2B2B2"; break; 
        } 
   return YColor;
}

