function imgScan(){
	var i = document.getElementsByTagName('a');
	var n = 0;
	var txt = "<div style='text-align:center;color: #FFFFFF;'>";
	for (var a=0; a<i.length;a++){
		if (i[a].getAttribute('rel')!=null){
			if (i[a].getAttribute('rel').indexOf("shadowbox")>=0){
				var ii = i[a].getElementsByTagName('img');
				if (ii[0]!=null){
					//alert(i[a].getAttribute('href')+" ("+ii[0].getAttribute('src')+")");
					txt = txt+"<a href='#' onclick='loadImg(\""+i[a].getAttribute('href')+"\"); return false;'><img src='"+ii[0].getAttribute('src')+"'></a>";
					n++;
				}
			}
		}
	}
	if (n==0) txt = txt+"No images found on this page";
	txt = txt+"</div>";
	Shadowbox.open({
        content:    txt,
        player:     "html",
        title:      "Choose an image to use in the Avatar Slicer",
        height:     300,
        width:      450
    });
}

function loadImg(img){
		Shadowbox.open({
        content:    "/src/thumb/?pic="+img+"",
        player:     "iframe",
        title:      "AlphaZone4 Thumbnail Creator",
        height:     510,
        width:      790
    });
}
