for loop doesn't work for image selector : i'm trying to make a picture selector but the loop doesn't work.
It should make the selected div orange, and turn the other divs white

	function ClickPic(id)
	{
		document.getElementById("pic"+id).style.backgroundColor='orange';
		for(var i = 0; i < 310; i++)
		{
			if(!i == id)
			{
				document.getElementById("pic"+i).style.backgroundColor='white';
			}
		}
	}