//<![CDATA[
		   
function preloadImages (img_list){
 	if (document.images) {
		obj_list = new Array();
		for (var x=0; x<img_list.length; x++) {
			i = new Image();
			i.src = img_list[x][0];
			if (img_list[x][1].length<2)
				i.img_link = "";
			else
				i.img_link = img_list[x][1];
			obj_list.push(i);
		}
		return (obj_list);
	}
	return null;
}
			
function onImageClick () {
	if (onImageClick.img_link)
		newWindow2(onImageClick.img_link,50,50,80);
}

function rotateSlides (img_obj_list, img_name) {
	rotateImages (img_obj_list, img_name,"slide_showx");
}

function rotateImages (img_obj_list, img_name, img_div) {
	if (!rotateImages.last_ndx)
		rotateImages.last_ndx = -1;
	var img_el = document.getElementById(img_div);
	var max = img_obj_list.length;
	var n = Math.round(Math.random()*10);
	while (n >= max || n == rotateImages.last_ndx) {
		n = Math.round(Math.random()*10);
	}
	
	rotateImages.last_ndx = n;
	var img_link = img_obj_list[n].img_link;
	
	if (n>=0 && n < max && document.images[img_name]) {
		document.images[img_name].src = img_obj_list[n].src;
		if (img_el && document.images[img_name].src=="") {
			//img_el.style.cursor="normal";
			img_el.style.visibility="hidden";
			onImageClick.img_link=null;
		}
		else if (img_el) {
			img_el.style.visiblity="visible";
			if (img_link && img_link.length>1) {
				onImageClick.img_link=img_link;
				img_el.style.cursor="pointer";
				img_el.onclick=onImageClick;
			}
			else {
				//img_el.style.cursor="arrow";
				img_el.onclick="";
			}
		}
	}
}

			
function slideImage () {
	//alert (this.ptr);
	if (this.ptr < 0) {
		var x=0;
		do {
			this.el_id.style.top=(this.ptr)+"px";
		}while (x++ < this.increment && this.ptr++ < 0);
	}
	else {
		window.clearInterval(this.kill);
	}
	if (this.ptr < -218) {
		//alert (this.el_id.style.top);	
	}
}


//]]>
