/*
This script is copyright (c) 2006 Elliot Swan under the
Creative Commons Attribution-ShareAlike 2.5 license:
http://creativecommons.org/licenses/by-sa/2.5/

More information on this script can be found at:
http://www.elliotswan.com/2006/06/07/rounded-images/
*/


//function getElementsByCondition(condition,container) 
//{ 
//container = container||document;
//var all = container.all||container.getElementsByTagName('*');
//var arr = [];
//for(var k=0;k<all.length;k++) 
//{ 
//var elm = all[k];
//if(condition(elm,k)) 
//arr[arr.length] = elm;
//} 
//return arr;
//} 



//window.onload = function() { ES.Round.create('imagewrapper'); }

//var ES = new Object();

//ES.Round =	{
//create	:	function(wrapper) {
//			for(var i = 1; 4 >= i;  i++) {
//				var curve			= document.createElement('span');
//					curve.className	= 'curve'+i;
//				var target			= getElementsByCondition(function(el){return el.className.indexOf('imagewrapper')>-1});//document.getElementById(wrapper);
//				target.appendChild(curve);
//				}
//			}
//}



window.onload = function() 
{ 

ES.Round.create('imagewrapper0');
ES.Round.create('imagewrapper1');
ES.Round.create('imagewrapper2');
//ES.Round.create('imagewrapper3');
//ES.Round.create('imagewrapper4');
//ES.Round.create('imagewrapper5');
 }





var ES = new Object();

ES.Round = {
create  :  function(wrapper) {
  for(var i = 1; 4 >= i;  i++) {
  var curve = document.createElement('span');
  curve.className = 'curve'+i;
  var target = document.getElementById(wrapper);
  target.appendChild(curve);
  }
  }
}

