
/********************************************/
/* locate(x) target page for buttons        */
/* in menu                                  */                                         
/********************************************/
function locate(x)
{
    if (x == 0)
    location="default.htm";
    if (x == 1)
    location="card.htm";
    if (x == 2)
    location="why.htm";
    if (x == 3)
    location="how.htm";
    if (x == 4)
    location="history.htm";
    if (x == 5)
    location="news.htm";
    if (x == 6)
    location="links.htm";
    if (x == 7)
    location="faqs.htm";
    if (x == 8)
    location="contact.htm";
}
/********************************************/
/* pageLoad() Down state button in Menu     */  
/********************************************/
function pageLoad()
{
var sPath = window.location.pathname;
    var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
    switch (sPage)
    {
    case "":
    window.document.getElementById("about").className="over";
    break
    case "card.htm":
    window.document.getElementById("card").className="over"; 
    break
    case "why.htm":
    window.document.getElementById("why").className="over";
    break
    case "how.htm":
    window.document.getElementById("how").className="over";
    break
    case "history.htm":
    window.document.getElementById("history").className="over";
    break
    case "news.htm":
    window.document.getElementById("news").className="over";
    break
    case "links.htm":
    window.document.getElementById("links").className="over";
    break
    case "faqs.htm":
    window.document.getElementById("faqs").className="over";
    break
    case "contact.htm":
    window.document.getElementById("contact").className="over";
    break
    case "default.htm":
    window.document.getElementById("about").className="over";
    break
    }
}

/********************************************/
/* fixPNG()                                 */
/* correctly handle PNG transparency in Win */
/* IE 5.5 or higher.                        */  
/********************************************/

function fixPNG(myImage) // 
   {
    if (window.ie55up)
	 {
	 var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	 var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	 var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
	 var imgStyle = "display:inline-block;" + myImage.style.cssText 
	 var strNewHTML = "<span " + imgID + imgClass + imgTitle
	 strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
	 strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	 strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>" 
	 myImage.outerHTML = strNewHTML
	 }
   }
   
/********************************************/
/* pageLoad()                               */
/* change state of buttons in Menu          */  
/********************************************/
   
function checkMenu(x)
{
    var sPath = window.location.pathname;
    var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
    switch (x)
    {
    case "":
    window.document.getElementById("about").className="over";
    break;
    case "card.htm":
    if (sPage == "card.htm")
    window.document.getElementById("card").className="over";
    else window.document.getElementById("card").className="Menu";
    break
    case "why.htm":
    if (sPage == "why.htm")
    window.document.getElementById("why").className="over";
    else window.document.getElementById("why").className="Menu";
    break
    case "how.htm":
    if (sPage == "how.htm")
    window.document.getElementById("how").className="over";
    else window.document.getElementById("how").className="Menu";
    break
    case "history.htm":
    if (sPage == "history.htm")
    window.document.getElementById("history").className="over";
    else window.document.getElementById("history").className="Menu";
    break
    case "news.htm":
    if (sPage == "news.htm")
    window.document.getElementById("news").className="over";
    else window.document.getElementById("news").className="Menu";
    break
    case "links.htm":
    if (sPage == "links.htm")
    window.document.getElementById("link").className="over";
    else window.document.getElementById("links").className="Menu";
    break
    case "faqs.htm":
    if (sPage == "faqs.htm")
    window.document.getElementById("faqs").className="over";
    else window.document.getElementById("faqs").className="Menu";
    break
    case "contact.htm":
    if (sPage == "contact.htm")
    window.document.getElementById("contact").className="over";
    else window.document.getElementById("contact").className="Menu";
    break
    case "default.htm":
    if (sPage == "" || sPage == "default.htm")
    window.document.getElementById("about").className="over";
    else window.document.getElementById("about").className="Menu";
    break
    }
}