
function setImages(group)
{
	
	// If the images haven't finished loading, just return
	if (!group.IsComplete()) {
		return;
	} 

	// A set of images has just loaded; so go through the image set
	// and reconnect them with the document

	/*
	for (i = 0; i < group.items.length; i ++)
	{
		var img_name = group.items[i];
		var img_obj = GetImage(img_name);
		
		// Make the image visible, and set its .src attribute
		eval("document.images['" + img_name + "'].style.display = ''");
		eval("document.images['" + img_name + "']").src = img_obj.src;
	}
	*/
	document.location = _g_callback_redir ;
		
}

function loadImages()
{
	if ((is_ie==false) && (is_nav==false) && (is_opera==false)) {
		document.location = _g_callback_redir ;
		return;
	} else {
		if ((is_ie) && ((is_ie5_5up==false) || (is_ie6==false) || (is_ie6up==false))) {
			document.location = _g_callback_redir ;
			return;			
		}
		if ((is_nav) && (is_nav4up==false)) {
			document.location = _g_callback_redir ;
			return;			
		}
		if ((is_opera) && (is_opera5up==false)) {
			document.location = _g_callback_redir ;
			return;			
		}
	}
	
	var group = new ImageGroup();
	var baseDir = "./images/";
	var HTMLCODE ="";
	var offsetImg = document.images.length
	//alert(offsetImg);	
	// Add all the images on the page that have a "name" attribute
    for (var i = 0; i < loadImages.arguments.length; i++) 
	{
			// Add each image to the group, and hide it until it's loaded
			group.AddImage(baseDir + loadImages.arguments[i]);
			//HTMLCODE+="<img src='"+baseDir + loadImages.arguments[i]+"' galleryimg='no' id='temp"+i+"' style='position: absolute; z-index:1; visibility: hidden; display:none'>"
			//document.write(HTMLCODE);
			//document.images[offsetImg + i].style.display = "none";
	}

	// Set the completion handler, and load the group
	group.imageupdate = setImages;	
	LoadGroup(group);
}

