<!--
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Travis Beckham :: http://www.squidfingers.com | http://www.podlob.com */

/* Coded by Travis Beckham
   http://www.squidfingers.com | http://www.podlob.com
   version date: 06/02/03
   If want to use this code, feel free to do so, but please leave this message intact. */

// Node Functions

if(!window.Node){
  var Node = {ELEMENT_NODE : 1, TEXT_NODE : 3};
}

function checkNode(node, filter){
  return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
}

function getChildren(node, filter){
  var result = new Array();
  var children = node.childNodes;
  for(var i = 0; i < children.length; i++){
    if(checkNode(children[i], filter)) result[result.length] = children[i];
  }
  return result;
}

function getChildrenByElement(node){
  return getChildren(node, "ELEMENT_NODE");
}

function getFirstChild(node, filter){
  var child;
  var children = node.childNodes;
  for(var i = 0; i < children.length; i++){
    child = children[i];
    if(checkNode(child, filter)) return child;
  }
  return null;
}

function getFirstChildByText(node){
  return getFirstChild(node, "TEXT_NODE");
}

function getNextSibling(node, filter){
  for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
    if(checkNode(sibling, filter)) return sibling;
  }
  return null;
}
function getNextSiblingByElement(node){
        return getNextSibling(node, "ELEMENT_NODE");
}

// Menu Functions & Properties

var activeMenu = null;

function showMenu() {
  if(activeMenu){
    activeMenu.className = "";
    getNextSiblingByElement(activeMenu).style.display = "none";
  }
  if(this == activeMenu){
    activeMenu = null;
  } else {
    this.className = "active";
    getNextSiblingByElement(this).style.display = "block";
    activeMenu = this;
  }
  return false;
}

function initMenu(){
  var menus, menu, text, a, i;
  menus = getChildrenByElement(document.getElementById("menu"));
  for(i = 0; i < menus.length; i++){
    menu = menus[i];
    text = getFirstChildByText(menu);
    a = document.createElement("a");
    menu.replaceChild(a, text);
    a.appendChild(text);
    a.href = "#";
    a.onclick = showMenu;
    a.onfocus = function(){this.blur()};
  }
}

if(document.createElement) window.onload = initMenu;
//-->

var photos=new Array()
photos[0]="images/atomix_over_02.gif"
photos[1]="images/atomix_over_03.gif"
photos[2]="images/atomix_over_04.gif"
photos[3]="images/atomix_over_05.gif"
photos[4]="images/atomix_over_06.gif"
photos[5]="images/atomix_over_07.gif"
photos[6]="images/atomix_over_08.gif"
photos[7]="images/btn_av_bw.gif"
photos[8]="images/btn_co_bw.gif"
photos[9]="images/btn_mr_bw.gif"


photos[10]="images/atomix_02.gif"
photos[11]="images/atomix_03.gif"
photos[12]="images/atomix_04.gif"
photos[13]="images/atomix_05.gif"
photos[14]="images/atomix_06.gif"
photos[15]="images/atomix_07.gif"
photos[16]="images/atomix_08.gif"
photos[17]="images/btn_av.gif"
photos[18]="images/btn_co.gif"
photos[19]="images/btn_mr.gif"

function texto_i(){
	document.images.img1.src=photos[0];
}
function texto_q(){
	document.images.img2.src=photos[1];
}
function texto_p(){
	document.images.img3.src=photos[2];
}
function texto_s(){
	document.images.img4.src=photos[3];
}
function texto_u(){
	document.images.img5.src=photos[4];
}
function texto_c(){
	document.images.img6.src=photos[5];
}
function texto_a(){
	document.images.img7.src=photos[6];
}
function texto_av(){
	document.images.av.src=photos[7];
}
function texto_co(){
	document.images.co.src=photos[8];
}
function texto_mr(){
	document.images.mr.src=photos[9];
}



function texto_i_over(){
document.images.img1.src=photos[10];
}
function texto_q_over(){
document.images.img2.src=photos[11];
}
function texto_p_over(){
document.images.img3.src=photos[12];
}
function texto_s_over(){
document.images.img4.src=photos[13];
}
function texto_u_over(){
document.images.img5.src=photos[14];
}
function texto_c_over(){
document.images.img6.src=photos[15];
}
function texto_a_over(){
document.images.img7.src=photos[16];
}
function texto_av_over(){
document.images.av.src=photos[17];
}
function texto_co_over(){
document.images.co.src=photos[18];
}
function texto_mr_over(){
document.images.mr.src=photos[19];
}

<!--
var usa = new Array (
"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"District of Columbia",
"Florida",
"Georgia",
"Hawaii",
"Idaho",
"Illinois",
"Indiana",
"Iowa",
"Kansas",
"Kentucky",
"Louisiana",
"Maine",
"Maryland",
"Massachusetts",
"Michigan",
"Minnesota",
"Mississippi",
"Missouri",
"Montana",
"Nebraska",
"Nevada",
"New Hampshire",
"New Jersey",
"New Mexico",
"New York",
"North Carolina",
"North Dakota",
"Ohio",
"Oklahoma",
"Oregon",
"Pennsylvania",
"Puerto Rico",
"Rhode Island",
"South Carolina",
"South Dakota",
"Tennessee",
"Texas",
"Utah",
"Vermont",
"Virginia",
"Washington",
"West Virginia",
"Wisconsin",
"Wyoming"
);
var mex = new Array (
"Aguascalientes",
"Baja California Norte",
"Baja California Sur",
"Chiapas",
"Chihuahua",
"Coahuila",
"Colima",
"Durango",
"Estado de Mexico",
"Guanajuato",
"Guerrero",
"Hidalgo",
"Jalisco",
"Mexico city (DF)",
"Michoacan",
"Morelos",
"Nayarit",
"Nuevo Leon",
"Oaxaca",
"Puebla",
"Queretaro",
"Quintana Roo",
"San Luis Potosi",
"Sinaloa",
"Sonora",
"Tabasco",
"Tamaulipas",
"Tlaxcala",
"Veracruz",
"Yucatan",
"Zacatecas"
);
var other = new Array (  
  "Otro Estado"
);

function Mod1 (obj) {  // write new data inbto select
var i,pos;
  obj.form.os0.options.length = 0;  // clear the old values
  pos = obj.selectedIndex;          // item selected

  if (pos == 3) {  // stuff in the christmas scents
    for (i=0; i<usa.length; i++) {
      var opt = new Option (usa[i], usa[i]);
      obj.form.os0.options[i] = opt;
    }
  }
  if (pos == 2) {  // stuff in the TG scents...
    for (i=0; i<mex.length; i++) {
      var opt = new Option (mex[i], mex[i]);
      obj.form.os0.options[i] = opt;
    }
  }else{
    for (i=0; i<other.length; i++) {
      var opt = new Option (other[i], other[i]);
      obj.form.os0.options[i] = opt;
    }
  }

}

function validar() {
  // Array con todos los elementos del formulario
    if (document.contact.name.value == ''){
     alert("The field \"NAME\" is mandatory");
     return false;
    }
	if (document.contact.mail.value == ''){
     alert("The field \"E-MAIL\" is mandatory");
     return false;
    }
}
