
  var i;
  items = new Array('about', 'rules', 'procedure', 'search', 'add', 'edit','addphoto');
  img = new Object();

  for (i=0; i<=(items.length); i++) {
   eval('img.b_' + items[i] + ' = new Image()');
   eval('img.b_' + items[i] + '_ = new Image()');
   eval('img.b_' + items[i] + '.src = "images/b_' + items[i] + '.gif"');
   eval('img.b_' + items[i] + '_.src = "images/b_' + items[i] + '_.gif"');
  }
 
  function changeImage(id, action) {
   if (document.images) eval("document.images['" + id + "'].src = img.b_" + id + action + ".src");
  } 

  function openPopup( url, x,y) 
  {

    min_x = 200;
    min_y = 100;

    x = (x> min_x) ? x+1 : min_x;
    y = (y> min_y) ? y+1 : min_y;

	ytop = screen.height/2 - y/2;
	xleft = screen.width/2 - x/2;	

    window.open( url, "", "scrolling=auto,width="+x+",height="+y+", top="+ytop+", left="+xleft);
    return false;
  }
