window.onload = function()
{
  var coll = document.getElementsByTagName("input");
  for(var i=0; i<coll.length; i++)
  {
     if(coll[i].type == "button" || coll[i].type == "submit" || coll[i].type == "reset")
     {
        coll[i].className = "buttonsClass";
     }
  }
}

function tabclick(id)
{
	for (i=1; i<=3; i++) {
		cur_id = 'li_'+i
		cur_popup = 'popup_'+i
		if (i != id) {
			document.getElementById(cur_id).className=''
			document.getElementById(cur_popup).style.display='none'
		} else {
			document.getElementById(cur_id).className='here'
			document.getElementById(cur_popup).style.display='inline'
		}
	}
  return false;
}



function stripe(id)
{
	color1 = arguments[1] ? arguments[1] : 'fff'
	color2 = arguments[2] ? arguments[2] : 'fafafa'
	even = false
	prnt = document.getElementById(id)
	if (prnt) 
	{
		divs = prnt.getElementsByTagName('div')
		for(i = 0; i < divs.length; i++)
		{
			mydiv = divs[i]
			if (mydiv.getAttributeNode('class').value == 'striped')
			{
				//mydiv.style.backgroundColor = even ? color1 : color2
				mydiv.addEventListener("mouseover", setColor1(event,color2), true)
				mydiv.addEventListener("mouseout", setColor2, true)
				//mydiv.attachEvent("onclick", setColor)
				
				even = !even
			}
		}
	}
}
function setColor1(e)
{
	color = arguments[1]
	alert(color)
	e.currentTarget.style.backgroundColor = color
}
function setColor2(e)
{
	color = arguments[1]
	e.currentTarget.style.backgroundColor = 'fff'
}
