/* FUNCTION : GENERATE E MAIL ADDRESS 1 CONTACT */
function generate_address() {
    domain = "swemorph.com";
    atsign = "@";
        username = "contact";
    addr = username + atsign + domain;
    document.write("<" + "a" + " " + "href=" + "mail" + "to:" + addr + ">" + addr + "</a>");
    }
/* ---------- END FUNCTION ---------- */

/* FUNCTION : GENERATE E MAIL ADDRESS 2 - RESEARCH */
function generate_address_r() {
    domain = "swemorph.com";
    atsign = "@";
        username = "research";
    addr = username + atsign + domain;
    document.write("<" + "a" + " " + "href=" + "mail" + "to:" + addr + ">" + addr + "</a>");
    }
/* ---------- END FUNCTION RESEARCH ---------- */
        
/* FUNCTION : PUT HOME PICTURE */
function puthome()
        {
        document.write("<div class='NormalText'>");
        document.write("<a href='index.html' target='_top'><IMG SRC='graphics/home.jpg' border='0' align='left' alt='Home to Frames'></a>");
        document.write("</div>");
        }
/* ---------- END FUNCTION ---------- */

/* FUNCTION : X_PUT LOGO */
function putlogo()
        {
        }
/* ---------- END FUNCTION ---------- */

/* FUNCTION : X_PUT LOGO */
function x_putlogo()
        {
        document.write("<TABLE cellSpacing=0 cellPadding=0 align='left' width='102%' height='44' border=0><TR><TD  background='graphics/malogo2.gif'</TD></TR></TABLE><br><br>");
        }
/* ---------- END FUNCTION PUTLOGO ---------- */


/* FUNCTION: SET BACKGROUND COLOR */
function setbgcolor()
        {
        document.write("<body bgcolor='yellow'>");
        }
/* ---------- END FUNCTION ---------- */

/* FUNCTION : writeday - RIGHT OUT THE DAY OF THE WEEK */
function writeday()
        {
         var dayName=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
         var y=new Date();
         document.write("<center><b>" +dayName[y.getDay()]+ "</b>");
         // document.write(dayName[y.getDay()]);
        }
/* ---------- END FUNCTION --------- */

/* FUNCTION : writedate() - RIGHT OUT DATE */
function writedate()
        {
         datum=new Date();
         day=datum.getDate();
         if(day<10) day="0"+day;
         manad=datum.getMonth()+1;
         if(manad<10) manad="0"+manad;
         document.write("<center><b>" +datum.getFullYear()+'-'+manad+'-'+day+ "</b>");
        }
/* ---------- END FUNCTION --------- */

/* FUNCTION : WRITE COPYRIGHT DATES */
function WriteCopy()
        {
         document.write("<i>&copy; 2003-2010, Swedish Morphological Society<br>");
        }
/* ---------- END FUNCTION WRITE COPYRIGHT---------- */

/* FUNCTION :  */

/* FUNCTION : WRITE FOOT: WRITE A FOOTER WITH COPYRIGHT, NAME, E-MAIL AND LAST MODIFIED */
function WriteFoot()
        {
		 document.write("<i>&copy; 2003-2010, Swedish Morphological Society</i><br>");
		 document.write("Organisation no. 802452-3162<br>");
         document.write("<img src='kuvert.jpg' alt='e-mail'>&nbsp;")
         generate_address();
              }
/* ---------- END FUNCTION ---------- */
/* -- document.write("<br><img src='graphics/tel_icon2.jpg' alt='telephone icon'> Cell: +46 708 276330");--*/    

/* FUNCTION : WRITE LAST MODIFIED */
function WriteLastModified()
        {
        document.write("<font size='1'>Last revised: " +document.lastModified+ ".</font>");
        }
/* ---------- END FUNCTION ---------- */

/* FUNCTION : barmenu - WRITE OUT BARMENU  NOTE: THIS IS OLD::NOT BEING USED !!! */
function WriteBarMenu()
        {
        document.write("<div class='BarText'>");
        document.write("|&nbsp;<a href='main.html'>Home Page</a>&nbsp;");
        document.write("|&nbsp;<a href='zwicky.html'>About Zwicky </a>&nbsp;");
        document.write("|&nbsp;<a href='ma.html'>Morphological Analysis</a>&nbsp;");
        document.write("|&nbsp;<a href='refrences.html'>Reference List</a>&nbsp;");
        document.write("|&nbsp;<a href='projects.html'>Projects List</a>&nbsp;");
        document.write("|&nbsp;<a href='oath.html'>Morphologist's Oath</a>&nbsp;");
        document.write("|&nbsp;<a href='tutorial.html'>Tutorial</a>&nbsp;");
        document.write("|&nbsp;<a href='contact.html'>Contact</a>&nbsp;");
        document.write("|&nbsp;<a href='legal.html'>Legal Stuff</a>&nbsp;|");
        document.write("</div>");
        }
/* ---------- END FUNCTION --------- */

/* FUNCTION: BAR MENU AND FOOTER ----*/
function BarAndFoot()
        { 
        WriteBarMenu();
        WriteFoot();
        }
/* ---------- END FUNCTION --------- */


/* FUNCTION: MAKE MENUS -- VERTICAL OR HOROZONTAL */
function makemenu(aspect)
{
NumberOfItems=10
i=0
var menuitem=new Array(12)
var menuaddress=new Array(12)
menuitem[0]="Home";                                     menuaddress[0]="main.html";
menuitem[1]="About Zwicky";                             menuaddress[1]="zwicky.html";
menuitem[2]="Morphological Analysis";   				menuaddress[2]="ma.html";
menuitem[3]="Project List";                             menuaddress[3]="projects.html";
menuitem[4]="Reference List";                  			menuaddress[4]="references.html";
menuitem[5]="Tutorial";                                 menuaddress[5]="tutorial.html";
menuitem[6]="Download List";                   			menuaddress[6]="downloads.html";
menuitem[7]="Contact";                                  menuaddress[7]="contact.html";
menuitem[8]="Credits & Links";                  		menuaddress[8]="credits.html";
menuitem[9]="Legal Stuff";                              menuaddress[9]="legal.html";
menuitem[10]="";                                        menuaddress[10]="";
menuitem[11]="";                                        menuaddress[11]="";

// THREE ITEMS LEFT BLANK FOR FUTURE EXPANSION OF MENU
if(aspect=="horozontal")
        {document.write("<div class='BarText'>");
         document.write("|&nbsp; <a href='index.html' target='_top'>Home</a> &nbsp;");
                 for (i=1; i<=NumberOfItems-1; i=i+1) 
                {
                document.write("|&nbsp; <a href=" +menuaddress[i]+ ">" +menuitem[i]+ "</a> &nbsp;")
                }
         document.write("|");
         document.write("</div>");
        }
else if(aspect=="vertical")
        {document.write("<div class='MenuText'>");
         document.write("<a href='index.html' target='_top'>Home</a><br>");
         for (i=1; i<=NumberOfItems-1; i=i+1) 
                {
                document.write("<a href=" +menuaddress[i]+ ">" +menuitem[i]+ "</a><br>")
                }
         document.write("</div>");
        }
else {document.write("ERROR: Menu must be designated either Vertical or Horozontal")}
}
/* END OF FUNCTION */

