// Find the submit object on the form, make it invisible, then choose a specific graphic
// and make the graphic the submit button instead.
// This script is deployed in http://sourcecodemillions.com/gurusecret/index2b.html.
// (c) 2009,  Think Big Publications. Author: Scott Ingram 

swapSubmit("Submit", "images/instant-access.jpg");

function swapSubmit(buttonId, imgSrc)
{
  formObj = document.getElementById(buttonId);
  formObj.style.display = "none";
  while (formObj = formObj.parentNode)
    if (formObj.tagName == "FORM")
      break;

  imgSrc = imgSrc.substr(imgSrc.lastIndexOf("/")+1);
  objArray = document.getElementsByTagName("IMG");
  for (i=0; i<objArray.length; i++)
  {
    obj = objArray[i];
    attr = obj.getAttribute("src");
    attr = attr.substr(attr.lastIndexOf("/")+1);
    if (attr == imgSrc)
    {
      obj.style.cursor = "pointer";
      obj.onclick = function() { formObj.submit(); }
    }
  }
}

