<!--

document.getElementsByAttribute = function(attribute, parentElement) {
  var children = ($(parentElement) || document.body).getElementsByTagName('*');
  return $A(children).inject([], function(elements, child) {
    if (child.getAttribute(attribute))
      elements.push(Element.extend(child));
    return elements;
  });
}


Object.extend(Enumerable, {
  pluck: function(property) {
    var results = [];
    this.each(function(value, index) {
      results.push(value.getAttribute ? value.getAttribute(property) || value[property] : value[property]);
    });
    return results;
  }
});

Object.extend(Array.prototype, Enumerable);


function $P(property) {
  return document.getElementsByAttribute(property).pluck(property);
}


function hideElement(name)
{

 el=$(name);

if (el) el.style.display="none";

}

function showElement(name)
{

 el=$(name);

if (el) el.style.display="block";

}


function pageLoad()
{
var fieldset=$$('fieldset');


if (fieldset && fieldset.size() >0)
{


 var div1=new Element('div', { id: 'errorContainer' } );
 var subdiv1=new Element('div', { id: 'errorContainerContent' } );

 div1.update('&nbsp;&nbsp;Error submitting data');

 div1.onclick=function(){ $('errorContainer').style.display='none' }

 div1.appendChild(subdiv1);
 
 

 fieldset[0].appendChild(div1);

}


var elem=document.getElementsByAttribute('tip')

if (elem && elem.size()>0)
{

for (i=0; i<elem.size(); i++)
{

var txt=elem[i].getAttribute('tip')


new Tip(elem[i], txt  , { title:'.', hook:{target: 'bottomLeft', tip: 'topLeft'},offset:{x:7,y:0} ,effect: 'appear'});

}

}




xajax.loadingFunction = function(){xajax.$('loadingImg').style.display='block';setTimeout( "xajax.$('loadingImg').style.display='none'",5000);};
xajax.doneLoadingFunction = function(){xajax.$('loadingImg').style.display='none';};


}


