function OpenCentered (psUrl, psName, piWidth, piHeight, psFlags) {
	var iX=(screen.width-piWidth-20)/2;
	var iY=(screen.height-piHeight-30)/2;
	open(psUrl, psName, 'width=' + piWidth + ',height=' + piHeight + ',scrollbars=0,left=' + iX + ',top=' + iY +  ',screenX=' + iX + ',screenY=' + iY + psFlags);
}

function switchImage(imgName, imgSrc) 

{

  if (document.images)

  {

    if (imgSrc != "none")

    {

      document.images[imgName].src = imgSrc;

    }

  }

}

function PopupPic(sPicURL)
{ 
	window.open('popup.html?' + sPicURL, '', 'resizable=1,HEIGHT=200,WIDTH=200');
}