<!-- MENU --!>
var timeOn = null
numMenus = 7;
document.onmouseover = hideAllMenus;

function getStyleObject(objectId) {
  // cross-browser function to get an object's style object given its id
  if(document.getElementById && document.getElementById(objectId)) {
    // W3C DOM
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    // MSIE 4 DOM
    return document.all(objectId).style;
  } else if (document.layers && document.layers[objectId]) {
    // NN 4 DOM.. note: this won't find nested layers
    return document.layers[objectId];
  } else {
    return false;
  }
} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
  // get a reference to the cross-browser style object and make sure the object exists
  var styleObject = getStyleObject(objectId);
  if(styleObject) {
    styleObject.visibility = newVisibility;
    return true;
  } else {
    //we couldn't find the object, so we can't change its visibility
    return false;
  }
} // changeObjectVisibility

function showMenu(menuNumber, eventObj, labelID) {
  hideAllMenus();
  if(document.layers) {
    img = getImage("myImg" + menuNumber);
 	  x = getImagePageLeft(img);
 	  y = getImagePageTop(img);
 	  menuTop = y + 10; // LAYER TOP POSITION
    eval('document.layers["myMenu'+menuNumber+'"].top="'+menuTop+'"');
 	  eval('document.layers["myMenu'+menuNumber+'"].left="'+x+'"');
  }
  eventObj.cancelBubble = true;
  var menuId = 'myMenu' + menuNumber;
  if(changeObjectVisibility(menuId, 'visible')) {
    return true;
  } else {
    return false;
  }
}

function hideAllMenus() {
  for(counter = 1; counter <= numMenus; counter++) {
    changeObjectVisibility('myMenu' + counter, 'hidden');
  }
}

function menuOver() {
  clearTimeout(timeOn)
}

function menuOut() {
  if(document.layers) {
    timeOn = setTimeout("hideAllMenus()", 400)
  }
}
<!-- ********************************************** !-->

<!-- SIMPLE WINDOW !-->
function openWin(sImg, iWidth, iHeight) {
  window.open(sImg, 'the_window', "width=" + iWidth + ",height=" + iHeight + ",resizable=yes,scrollbars=no");
}

<!-- ********************************************** !-->

function start() {
}

<!-- SCROLL TEXT !-->
/*
//slider's width
var swidth=120

//slider's height
var sheight=200

//slider's speed
var sspeed=3

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>
var singletext=new Array()
singletext[0]='<div align="center"><font face=Verdana size=-2 color="white"><b>GameDev Links</b><br>Flipcode<br>GameDev<br>Gamasutra<br>GameTutorials<br>NeHe (opengl)</div></FONT>'
singletext[1]='<div align="center"><font face=Verdana size=-2 color="white">This is just a test!<br>I just want to test to see if this works the way i want</font></div>'
if (singletext.length>1)
  i=1
else
  i=0

function start() {
  if (document.all) {
    //ieslider1.style.top=sheight
    //iemarquee(ieslider1)
  } else if (document.layers) {
    document.ns4slider.document.ns4slider1.top=sheight
    document.ns4slider.document.ns4slider1.visibility='show'
    ns4marquee(document.ns4slider.document.ns4slider1)
  } else if (document.getElementById&&!document.all) {
    document.getElementById('ns6slider1').style.top=sheight
    ns6marquee(document.getElementById('ns6slider1'))
  }
}


function iemarquee(whichdiv) {
  iediv=eval(whichdiv)
  if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed) {
    iediv.style.pixelTop=0
    setTimeout("iemarquee(iediv)",100)
  }
  if (iediv.style.pixelTop>=sheight*-1) {
    iediv.style.pixelTop-=sspeed
    setTimeout("iemarquee(iediv)",100)
  } else {
    iediv.style.pixelTop=sheight
    iediv.innerHTML=singletext[i]
    if (i==singletext.length-1)
      i=0
    else
      i++
  }
}

function ns4marquee(whichlayer) {
  ns4layer=eval(whichlayer)
  if (ns4layer.top>0&&ns4layer.top<=sspeed) {
    ns4layer.top=0
    setTimeout("ns4marquee(ns4layer)",100)
  }
  if (ns4layer.top>=sheight*-1) {
    ns4layer.top-=sspeed
    setTimeout("ns4marquee(ns4layer)",100)
  } else {
    ns4layer.top=sheight
    ns4layer.document.write(singletext[i])
    ns4layer.document.close()
    if (i==singletext.length-1)
      i=0
    else
      i++
  }
}

function ns6marquee(whichdiv) {
  ns6div=eval(whichdiv)
  if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed) {
    ns6div.style.top=0
    setTimeout("ns6marquee(ns6div)",100)
  }
  if (parseInt(ns6div.style.top)>=sheight*-1){
    ns6div.style.top=parseInt(ns6div.style.top)-sspeed
    setTimeout("ns6marquee(ns6div)",100)
  } else {
    ns6div.style.top=sheight
    ns6div.innerHTML=singletext[i]
    if (i==singletext.length-1)
      i=0
    else
      i++
  }
}
*/

<!-- ********************************************** !-->


<!-- FORM VALIDATION !-->

function emailValidation(entered, alertbox) {
/*
  with (entered) {
    aPos = value.indexOf("@"); 
    dotPos = value.lastIndexOf(".");
    lastPos = value.length-1;
    if (aPos < 1 || dotPos-aPos < 2 || lastPos-dotPos > 3 || lastPos-dotPos < 2) {
      if (alertbox) {
        alert(alertbox);
      }
      focus();
      return false;
    } else {
      return true;
    }
  }
*/
  var emailPattern = /^[a-zA-Z0-9._-]+([\+a-zA-Z0-9._-])*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/
  return regExpValidation(false, emailPattern, entered.value, "E-mail Inválido", "email_inf");
}

function emptyValidation(entered, alertbox) {
  with (entered) {
    if (value == null || value == "" || value == 0) {
      if (alertbox != "") {
        alert(alertbox);
      }
      focus();
      return false;
    } else {
      return true;
    }
  }
}

function regExpValidation(neg, regExpStr, str, msg, msgField) {
  var re = new RegExp(regExpStr);
  var elem = document.getElementById(msgField);

  if(neg)
  {
    if(str.search(re) != -1)
    {
      if(elem != null)
        elem.firstChild.nodeValue = msg;
      return false;
    }
    else {
      if(elem != null)
        elem.firstChild.nodeValue = "";
    }
  }
  else
  {
    if(str.search(re) == -1)
    {
      if(elem != null)
        elem.firstChild.nodeValue = msg;
      return false;
    }
    else {
      if(elem != null)
        elem.firstChild.nodeValue = "";
    }
  }
  return true;
}


function checkguestbookFields(formName, pt) {
  var thisform = document.getElementById(formName);

  if(thisform == null)
    return false;

  var nameMsg = "Invalid name.";
  var emailMsg = "Invalid E-mail.";
  var impressionMsg = "Invalid impression.";
  var commentsMsg = "Invalid comment.";
  var codeMsg = "Invalid code.";
  if(pt)
  {
    nameMsg = "Nome inválido.";
    emailMsg = "E-mail inválido.";
    impressionMsg = "Impressão inválida.";
    commentsMsg = "Comentário inválido.";
    codeMsg = "Código inválido.";
  }

  var res = true;
  with(thisform) {
    var namePattern = /([0-9]|[~!#$%~&\*\(\)_=\+{}?]|\[|\])+/;
    if(regExpValidation(true, namePattern, name.value, nameMsg, "name_inf") == false) {
      res = false;
    }
    if(name.value == null || name.value == "") {
      var elem = document.getElementById("name_inf");
      if(elem != null)
        elem.firstChild.nodeValue = nameMsg;      
    }

    //var emailPattern = /^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$/;
    var emailPattern = /^[a-zA-Z0-9._-]+([\+a-zA-Z0-9._-])*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/
    if(regExpValidation(false, emailPattern, email.value, emailMsg, "email_inf") == false) {
      res = false;
    }

    var elem = document.getElementById("impression_inf");
    if(impression.value == null || impression.value == "" || impression.value == 0) {
      if(elem != null)
        elem.firstChild.nodeValue = impressionMsg;

      res = false;
    }
    else {
      if(elem != null)
        elem.firstChild.nodeValue = "";
    }

    var elem = document.getElementById("comments_inf");
    if(comments.value == null || comments.value == "") {
      if(elem != null)
        elem.firstChild.nodeValue = commentsMsg;

      res = false;
    }
    else {
      if(elem != null)
        elem.firstChild.nodeValue = "";
    }

    var elem = document.getElementById("code_inf");
    if(verify_word.value == null || verify_word.value == "" || verify_word.value != code) {
      if(elem != null)
        elem.firstChild.nodeValue = codeMsg;

      res = false;
    }
    else {
      if(elem != null)
        elem.firstChild.nodeValue = "";
    }
  }
  return res;
}


function guestbookFormValidation(thisform, pt) {
  var nameMsg = "Invalid name.";
  var emailMsg = "Invalid E-mail.";
  var impressionMsg = "You have to chose your site's impression.";
  var commentsMsg = "Please insert a comment.";
  if(pt)
  {
    nameMsg = "Nome inválido.";
    emailMsg = "E-mail inválido.";
    impressionMsg = "Escolha uma impressão sobre o site.";
    commentsMsg = "Por favor escreva um comentário.";
  }
  with (thisform) {
    if (emptyValidation(name, nameMsg) == false) {
      name.focus();
      return false;
    }
    if (emailValidation(email, emailMsg) == false) {
      email.focus();
      return false;
    }
    if (emptyValidation(impression, impressionMsg) == false) {
      impression.focus();
      return false;
    }
    if (emptyValidation(comments, commentMsg) == false) {
      comments.focus();
      return false;
    }
  }

  return true;
}

<!-- ********************************************** !-->

function sendMail() {
  var name = "&#108;&#048;&#107;&#117;&#115;";
  var domain = "&#104;&#111;&#116;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;";
  var linkText = "N0N4M3";
  document.write("<a href=\"" + "m&#097;il" + "t&#111;:" + name + "&#064;" + domain + "\">" + linkText + "</a>");
}

function w3cButton(css, link, title, standard) {
  document.write("<div class=\""+ css +"\">");

  document.write("<a class=\"w3c\" href=\"http://www.w3.org/\">"+ title +"</a> <a class=\"spec\" href=\""+link+"\">"+standard+"</a>");

  document.write("</div>");
}


function showHideObj(id) {
  objStyle = getStyleObject(id);
  if(objStyle && objStyle.display == "none")
  {
    objStyle.display = "block";
  }
  else if(objStyle && objStyle.display == "block")
  {
    objStyle.display = "none";
  }
}


