




/*
     FILE ARCHIVED ON 16:38:17 feb 18, 2007 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 18:19:18 ott 23, 2011.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
function wopen(wfile, vwidth, vheight) {
 window.open(wfile,'','scrollbars=yes,resizable=yes,width=' + (vwidth + 15) + ',height=' + (vheight + 60) + ',status=no,location=no,toolbar=no,left=10,top=10,screenX=10,screenY=10');
}

function valid_email(text) {
        // The Field Shouldn't be Empty
        if (text == "") {
                // Please Enter Your Email Address To Check
                return false;
        }

        // Check For Bad Chars
        badchar = " ()<>\/[]{}+-*|;,'"
        for (i=0;i<text.length;i++) {
                for (j=0;j<badchar.length;j++) {
                        if (text.charAt(i) == badchar.charAt(j)) {
                                // Your Email Address May Has Some Bad Character or there is some space between letters
                                return false;
                        }
                }
        }

        // There Should Be a dot (.) Symbol
        if (text.indexOf(".") == -1) {
                // Your Email Address Doesnot have any dot(.) symbol
                return false;
        }

        // There Should Be an @ Symbol
        if (text.indexOf("@") == -1) {
                // Your Email Address Doesnot have any @ symbol
                return false;
        } else {

        // Only one @ symbol should be found
                symbolfound = 0
                for (i=0;i<text.length;i++) {
                        if (text.charAt(i) == "@") {
                                symbolfound++;
                        }
                        else {
                                continue;
                        }
                }
                if (symbolfound != 1) {
                        // Ooops  Your Email Address Has More Than One @ Symbol
                        return false;
                }
        }

        // Check For Syntax Errors Such as .@  or   @.  or  ..
        if (text.indexOf("@.") != -1 || text.indexOf(".@") != -1 || text.indexOf("..") != -1) {
                // Sorry Your Email Address has two symbol side by side and it is wrong
                return false;
        }

        // The first character shouldn't be @ or .
        if (text.charAt(0) == "@" || text.charAt(0) == ".") {
                // OH your first character seem to be . or @ and it is wrong
                return false;
        }

        // The last character shouldn't be @ or .
        if (text.charAt(text.length-1) == "@" || text.charAt(text.length-1) == ".") {
                // OH your last character seem to be . or @ and it is wrong
                return false;
        }

        // Valid Email Address
        return true;
}

function encodemail(utente, dominio) {
	window.location.href = 'mailto:' + utente + '@' + dominio;
}

// Visualizzo un solo div e nascondo gli altri
function showdiv(pass) {
 var divs = document.getElementsByTagName('div');
 // i va da 0 a 6 perchè ci sono 6 prodotti
 for(i=0;i < 6;i++){
  if(divs[i].id.match(pass)){//if they are 'see' divs
   if (document.getElementById) // DOM3 = IE5, NS6
    divs[i].style.visibility="visible";// show/hide
   else
    if (document.layers) // Netscape 4
     document.layers[divs[i]].display = 'visible';
    else // IE 4
     document.all.divs[i].visibility = 'visible';
   } else {
   if (document.getElementById)
    divs[i].style.visibility="hidden";
   else
   if (document.layers) // Netscape 4
    document.divs[i].visibility = 'hidden';
   else // IE 4
    document.all.divs[i].visibility = 'hidden';
   }
 }
}
