function _submit()
{
	 var inputs = document.getElementsByTagName("input");
	 for (var i=0; i<inputs.length; i++)  {
		  if (inputs[i].className == "button-submit")  {
			   inputs[i].onmouseover = function()
			   {
				  this.src = this.src.replace(".gif", "-hover.gif");
			   }
			   inputs[i].onmouseout = function()
			   {
					this.src = this.src.replace("-hover.gif", ".gif");
			   }
		  }
	 }
}
function initAjaxTabActiveState(){
     var _divs = document.getElementsByTagName('div');
     for (var i=0; i<_divs.length; i++){
          if (_divs[i].className.indexOf('sub-menu')!=-1){
               var _uls = _divs[i].getElementsByTagName('ul');
               if (_uls.length){
                    return _uls[0];
               }                    
          }
     }
     return 0;
}
function setActiveElement(_this){
     var _ul = initAjaxTabActiveState();
     if (_ul){
          var _lis = _ul.getElementsByTagName('li');
          for (var i=0; i<_lis.length; i++){
               if (i == _this._index){
                    _lis[i].className += ' active';
               }
               else {
                    _lis[i].className = _lis[i].className.replace('active', '');
               }
          }
     }
}
	function display(id)
	{
	var zDD=document.getElementById('show').getElementsByTagName('div');
	var ZON=document.getElementById('name_'+id);
	for(var i=0;i<zDD.length;i++){
	    zDD[i].className='hide';	  
    }
	ZON.className='show';
	
	var d1=document.getElementById('topTab');
	dArr=d1.getElementsByTagName('a');
	
	for(var i=0;i<dArr.length; i++)
		{
			if(id==(i+1))
				{ 
				str=dArr[i].className;
				dArr[i].className=str.replace('_on','')+'_on';
				
				}
					else{ 
					str=dArr[i].className;
					dArr[i].className=str.replace('_on','');  }
			}
	}
	
	
	function ShowTab(T)
	{
		i = 0;
		while(document.getElementById("tab" + i) != null){
			document.getElementById("div" + i).style.display = "none";
			document.getElementById("tab" + i).className = "";
			document.getElementById("paging" + i).style.display = "none";
			i++;
		}
		document.getElementById("paging" +  T).style.display = "";
		document.getElementById("div" + T).style.display = "";
		document.getElementById("tab" + T).className = "active";
	}
	
if (window.addEventListener)
     window.addEventListener("load", _submit, false);
else if (window.attachEvent)
     window.attachEvent("onload", _submit)