// ********************** Menu related functions **************************
// *                                                                      *
// *  For these functions to work properly, image ID and url must be same *
// *                                                                      *
// ************************************************************************

function link(menuid, targeturl, alttext)
{
document.write("<a href=\"" + targeturl + "\"><img src=\"img/menu_" + menuid + "1.gif\" class=\"menu_item\" alt=\"" + alttext + "\" border=\"0\" id=\"" + menuid + "\" onmouseover=\"toggleImg(\'" + menuid + "\', \'img/menu_" + menuid + "2.gif\')\" onmouseout=\"toggleImg(\'" + menuid + "\', \'img/menu_" + menuid + "1.gif\')\" /></a><br/>");
}

function nolink(menuid, targeturl, alttext)
{
document.write("<a href=\"" + targeturl + "\"><img src=\"img/menu_" + menuid + "3.gif\" class=\"menu_item\" alt=\"" + alttext + "\" border=\"0\" /></a><br/>");
}

function mainMenu(pagenum)
{
document.write("<img src=\"img/blank.gif\" width=\"1\" height=\"20\" /><br/>");
var separator = "<img src=\"img/menu_separator.gif\" class=\"menu_separator\" /><br/>";

// Menu item array. Add more here.
var arrMenuid = new Array();
arrMenuid[0] = "home";
arrMenuid[1] = "products";
arrMenuid[2] = "nioneffects";
arrMenuid[3] = "contactus";
var arrTargeturl = new Array();
arrTargeturl[0] = "index.html";
arrTargeturl[1] = "products.html";
arrTargeturl[2] = "nioneffects.html";
arrTargeturl[3] = "contactus.html";
var arrArttext = new Array();
arrArttext[0] = "Home";
arrArttext[1] = "Products";
arrArttext[2] = "Negative Ion Effects";
arrArttext[3] = "Contact Us";

for (var i = 0; i < 4; i++)
{
document.write(separator);
if (i == pagenum)
{
nolink(arrMenuid[i], arrTargeturl[i], arrArttext[i]);
}
else
{
link(arrMenuid[i], arrTargeturl[i], arrArttext[i]);
}
}

document.write(separator);

document.write("<br/><form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">");
document.write("<input type=\"hidden\" name=\"cmd\" value=\"_cart\">");
document.write("<input type=\"hidden\" name=\"business\" value=\"eeandss@gmail.com\">");
document.write("<input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_viewcart_SM.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it\'s fast, free and secure!\">");
document.write("<input type=\"hidden\" name=\"display\" value=\"1\">");
document.write("</form>");
document.write("<br/><br/>");
document.write("<a href=\"products.html\"><img src=\"img/menu_ionizer.jpg\" border=\"0\" alt=\"Portable Ionizer\" /></a><br/>");
document.write("<br/><a href=\"products.html\">Negative Ionizers</a>");
document.write("<br/><br/><br/>");
document.write("<a href=\"redirect.html\"><img src=\"img/menu_shrimp.jpg\" border=\"0\" alt=\"Fairy Shrimp products\" /></a><br/>");
document.write("<br/><b><a href=\"redirect.html\">Visit</a><br/><a href=\"redirect.html\"><br.>Desert shrimps!</b></a>");
document.write("<br/>");

}


// ******************************** Copyright **************************************

function copyright()
{
document.write("<hr/>The information and products on this Website are not approved or evaluated by the US Food and Drug Administration, and are not intended to treat, cure, or prevent any disease or replace any medical treatment.<br/><br/>");
document.write("Copyright \&copy; 2006 - 2008 by Ee \& Sons Co, Sierra Vista, Arizona. All rights reserved.<br/>");
document.write("<a href=\"terms.html\">Terms and Conditions</a> | <a href=\"privacy.html\">Privacy Policy</a>");
}

// ************************* Main title and company logo ***************************

function mainTitle()
{
document.write("<a href=\"index.html\"><img src=\"img/main_title.png\" width=\"765\" height=\"70\" border=\"0\" alt=\"Ee \& Sons Co\" /></a>");
}


// *********************************************************************************

// Mouse over/out image toggle function

function toggleImg(imgid, imgurl)
{
document.getElementById(imgid).src = imgurl;
}

