// Cross-browser implementation of element.addEventListener()
function addListener(element, type, expression, bubbling)
{
    bubbling = bubbling || false;
 
    if(window.addEventListener)    { // Standard
        element.addEventListener(type, expression, bubbling);
        return true;
    } else if(window.attachEvent) { // IE
        element.attachEvent('on' + type, expression);
        return true;
    } else return false;
}
function historyBack(parentId)
{        
     var pHref=new RegExp("account\.php$");   
    if(typeof document.getElementById(parentId) !=undefined)
    {
                   
   
          
               childElement= document.getElementsByClassName('button');
            for(c=0,ccount=childElement.length;c<ccount;c++)   
            {                str=childElement[c].href;
                          
                  if(typeof childElement[c].href !="undefined" && pHref.test(str))
                  {
                     childElement[c].href="javascript:history.back();return false"; 
                     addListener(childElement[c],'click',function(){return bindEvent(childElement[c])},false);  
                     //return false;  
                  }
            }
       } 
        
   
}
function bindEvent(childID)
{
       history.back();
    //alert(childID);
    return false
}
addListener(window,'load',function(){historyBack('account_password')},false); 
addListener(window,'load',function(){historyBack('address_book')},false); 
addListener(window,'load',function(){historyBack('account_history')},false); 
addListener(window,'load',function(){historyBack('account_edit')},false); 