function contatta(recipient) {
	document.write ('<a href="mailto:'+recipient+'@'+'giulianocardella.it">'+recipient+'@'+'giulianocardella.it</a>');
}


function mostraImmagine (nome) {
	sorgenteImmagine = eval(nome+".src");
	document["mostra"].src = sorgenteImmagine;
}


//  ------------------------------------------------------
// IDENTIFICATION OF BROWSER VERSION
// This function returns a code to identify
// which browser is currently used at client side


function browserVersion() {
        var version = 0;
        if (navigator.userAgent.indexOf("MSIE") != -1) version = 1000;
        else if (navigator.userAgent.indexOf("Netscape7") != -1) version = 7; 
        else if (navigator.userAgent.indexOf("Netscape6") != -1) version = 6; 
        else if (navigator.userAgent.indexOf("Mozilla/5") != -1) version = 5; 
        else if (navigator.userAgent.indexOf("Mozilla/4") != -1) version = 4; 
        else if (navigator.userAgent.indexOf("Mozilla/3") != -1) version = 3;
        else if (navigator.userAgent.indexOf("Mozilla/2") != -1) version = 2;
        return version;
}

// AUTOMATIC LAST-UPDATED-ON
// This functions automatically inserts the date of the last
// modification of a page in the format: Month Day, Year
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";

function last_update() {
  dateObj = new Date(document.lastModified);
  lmonth = months[dateObj.getMonth() + 1];
  date = dateObj.getDate();
  fyear = dateObj.getYear();
  if (browserVersion() != 1000) {
     fyear += 1900; }
  document.write(lmonth + " " + date + ", " + fyear);
}

// STANDARD PAGE FOOTER
function pageFooter() {
   document.write("<p><br /><small><i>Page last updated on ");
   last_update();
   document.write("<br />&copy; Germax 2002</i></small></p>");
}


// SWAP HYPER-IMAGES ON MOUSE FOCUS
function imgFocusOn (imgName) {
   document[imgName].src = "./images/sel_"+imgName+".jpg";
   }

function imgFocusOut (imgName) {
   document[imgName].src = "./images/"+imgName+".jpg";
   }


// ------------------------------------------------------
// OPEN AUXILIARY MENU WINDOW (NO SCROLLBARS)
// This function opens an auxiliary browser window, without
// toolbar, menu, status bar and scroll bar.
// Purpose: to display context sensitive help information 
// or additional menu 
// Input parameters: 
//     loc = URL of the file to be loaded in the window
//     ww = width of the window (pixel)
//     wh = height of the window (pixel)

function openWindow(loc,ww,wh) {
    output=window.open(loc,"aux",'alwaysRaised=yes,toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,width='+ww+',height='+wh);
   }


// ------------------------------------------------------
// OPEN AUXILIARY MENU WINDOW (WITH SCROLLBARS)
// This function opens an auxiliary browser window, without
// toolbar, menu, status bar but with scroll bar enabled.
// Purpose: to display auxiliary context sensitive information 
// Input parameters: 
//     loc = URL of the file to be loaded in the window
//     ww = width of the window (pixel)
//     wh = height of the window (pixel)

function openScrollWindow(loc,ww,wh) {
    output=window.open(loc,"aux",'alwaysRaised=yes,toolbar=no,scrollbars=yes,directories=no,status=no,menubar=no,width='+ww+',height='+wh);
   }

// ------------------------------------------------------
// SELECT MOST SUITABLE STYLE SHEETS FOR USER BROWSER
// This funcion selects the most suitable style sheets 
// to grant uniform presentation across different browsers
// function for level-1 relative links

function selectCss() {
if ( (browserVersion() < 5)  &&  (navigator.appVersion.indexOf("Mac") != -1 )) {
   document.write("<link rel=\"stylesheet\" href=\"stylemacns.css\" type=\"text/css\">"); }
else { 
   document.write("<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">"); }
}

// function for level-2 relative links

function selectCss2() {
if ( (browserVersion() < 5)  &&  (navigator.appVersion.indexOf("Mac") != -1 )) {
   document.write("<link rel=\"stylesheet\" href=\"../stylemacns.css\" type=\"text/css\">"); }
else { 
   document.write("<link rel=\"stylesheet\" href=\"../style.css\" type=\"text/css\">"); }
}

// function for level-3 relative links

function selectCss3() {
if ( (browserVersion() < 5)  &&  (navigator.appVersion.indexOf("Mac") != -1 )) {
   document.write("<link rel=\"stylesheet\" href=\"../../stylemacns.css\" type=\"text/css\">"); }
else { 
   document.write("<link rel=\"stylesheet\" href=\"../../style.css\" type=\"text/css\">"); }
}

