function createLightbox(url,caption) {
	//alert(url+" // "+caption);
	var obj = document.createElement('a'); 	
	obj.setAttribute('href',url);
	obj.setAttribute('rel','lightbox');
	obj.setAttribute('title',caption);
	Lightbox.prototype.start(obj);
}

function createLightboxSet(imArray,set) {
	//alert(imArray+" // "+set+" // "+imArray.length);
	for (var i=0; i<imArray.length; i++){
		//alert(imArray[i][0]+" // "+imArray[i][1]+" // "+set);
		var obj = document.getElementById('lb'+i);
		obj.setAttribute('href',imArray[i][0]);
		obj.setAttribute('rel',set);
		obj.setAttribute('title',imArray[i][1]);
		if (i == imArray.length-1) {
			var end = document.getElementById('lb0');
			Lightbox.prototype.start(end);
		}
	}
}
