/*************************************/
//        imgChangeByName()
/*************************************/
function imgChangeByName(imgName, imgSrc)
{ if(document.images)
  { document.images[imgName].src = imgSrc;
  }
}

/*************************************/
//        imgChangeByObj()
/*************************************/
function imgChangeByObj(oImg, imgSrc)
{ if(document.images && oImg)
  { oImg.src = imgSrc;
  }
}

var popupWin;

/***************************************/
//       closePopup()
/***************************************/
function closePopup()
{ if(popupWin)
    popupWin.close();
}

/***************************************/
//       openPopupWindow()
/***************************************/
function openPopupWindow(addr, winwidth, winheight, ststus, leftpos, toppos, scrollbar, tool_bar)
{ closePopup();

	if(ststus != 'yes')
    ststus = 'no';
	if(scrollbar != 'yes')
    scrollbar = 'no';
	if(tool_bar != 'yes')
    tool_bar = 'no';

	if(leftpos=='')
	{ var scrwidth  = screen.availWidth
    leftpos= (scrwidth/2) -(winwidth/2);
  }
  if(toppos=='')
  { var scrheight = screen.availHeight
    toppos = (scrheight/2)-(winheight/2);
  }

  popupWin = window.open(
  addr
  , 'popupWin'
  , config='width='+winwidth
  +',height='+winheight
  +',left='+leftpos
  +',top='+ toppos
  +',modal=yes' 
  +',toolbar='+tool_bar+', menubar=no, '
  +',scrollbars='+scrollbar+', resizable=no, '
  +',location=no, directories=no, status=' + ststus );
  
  popupWin.focus();
}

/***************************************/
//       showLegalInformation()
/***************************************/
function showLegalInformation()
{ openPopupWindow('/includes/legal.html', 600, 400, 'no', '', '', 'yes', 'no');
}