
function showPhotoWin(photosrc, mgx, mgy)
{  //open a new window with the photo

  var content;
  var Imgx, Imgy;
  var winx, winy;
  var winattrs;
  var win;
  
  Imgx = mgx + 50;
  Imgy = mgy + 70;
  
  winx = "width = " + Imgx;
  winy = "height = " + Imgy;
  winattrs = "location=0, menbar=0, toolbar=0, resizable=1, scrollbars=1, " + winx + ", " + winy;
   
  win = window.open ("", "PhotoWin", winattrs);
  win.document.open();
  
  
  posx = (screen.width/2) - (Imgx/2);
  posy = (screen.height/2) - (Imgy/2);
  
  win.resizeTo (Imgx, Imgy);
  win.moveTo (posx, posy);
  
  content = 
	  '<HTML>' +
	   '<head>' +
	    '<title>Photos</title>' +
	   '</head>' +
	   '<body>' +
	     '<img src=' + photosrc + '>' +
	   '</body>' +
	  '</HTML>';
  
  
  win.document.write (content);
}


function flash(which){
	if (curborder[which]==1){
		flashobject[which].borderLeftColor=flashcolor
		flashobject[which].borderBottomColor=flashobject[which].borderRightColor
	}
	else if (curborder[which]==2){
		flashobject[which].borderTopColor=flashcolor
		flashobject[which].borderLeftColor=flashobject[which].borderBottomColor
	}
	else if (curborder[which]==3){
		flashobject[which].borderRightColor=flashcolor
		flashobject[which].borderTopColor=flashobject[which].borderLeftColor
	}
	else if (curborder[which]==4){
		flashobject[which].borderBottomColor=flashcolor
		flashobject[which].borderRightColor=flashobject[which].borderTopColor
	}

	if (curborder[which]<=3)
		curborder[which]++
	else
		curborder[which]=1

	if (document.all||document.getElementById)
	{
		for (z=0;z<flashobject.length;z++)
		{
			var temp='setInterval("flash('+z+')",'+speed+')'
			eval(temp)
		}
	}
}


//specify color of flash
var flashcolor="yellow"
////specify speed (less is faster ie: 50)
var speed=150
var curborder=new Array()
var increment=0
var flashobject=new Array()

if (document.all||document.getElementById){
while (document.getElementById("flash"+increment)!=null){
flashobject[increment]=document.getElementById? document.getElementById("flash"+increment).style : eval("document.all.flash"+increment+".style")
curborder[increment]=0
increment++
}
}


