function alternate_table(table)
{
	var rows = table.getElementsByTagName("tr");
	for(i = 0; i < rows.length; i++)
	{
		if((i % 2) == 0)
		{
			rows[i].className = "even";		
		}
		else
		{
			rows[i].className = "odd";
		}
	}
}

window.onload = function ()
{
	var sideBarTopSettings = {
     tl: { radius: 10 },
	 tr: { radius: 10 },
	 bl: false,
	 br: false,
	 antiAlias: true,
	 autoPad: true,
	 validTags: ["div"]
	};

	var sideBarBottomSettings = {
     tl: false,
	 tr: false,
	 bl: { radius: 10 },
	 br: { radius: 10 },
	 antiAlias: true,
	 autoPad: true,
	 validTags: ["div"]
	};

	var topSettings = {
     tl: { radius: 10 },
	 tr: { radius: 10 },
	 bl: false,
	 br: false,
	 antiAlias: true,
	 autoPad: true,
	 validTags: ["div"]
	};

	var bottomSettings = {
	 tl: false,
	 tr: false,
     bl: { radius: 10 },
	 br: { radius: 10 },
	 antiAlias: true,
	 autoPad: true,
	 validTags: ["div"]
	};

	var sideBarHeader = new curvyCorners(sideBarTopSettings, "side-bar-header");
	var sideBar = new curvyCorners(sideBarBottomSettings, "side-bar");

    var topBar = document.getElementById("bar1");
    var topCorners = new curvyCorners(topSettings, topBar);

    var bottomBar = document.getElementById("ft");
    var bottomCorners = new curvyCorners(bottomSettings, bottomBar);

	sideBarHeader.applyCornersToAll();
	sideBar.applyCornersToAll();
	topCorners.applyCornersToAll();
    bottomCorners.applyCornersToAll();

   var elementCorners = new curvyCorners( { tl: { radius: 10 }, tr: { radius: 10 }, bl: { radius: 10 }, br: { radius: 10 }, antiAlias: true, autoPad: true, validTags: ["div"] }, "element");
	elementCorners.applyCornersToAll();


	var tablesToAlternate = YAHOO.util.Dom.getElementsByClassName('alternate', 'table');
	for(i = 0; i < tablesToAlternate.length; i++)
	{
		alternate_table(tablesToAlternate[i]);
	}
};

/*YAHOO.util.Event.onDOMReady(initCorners);*/
