function callpopup(popupname, formname, fieldname) {
  var newWindow;

  switch(popupname) {
    case 'date':
      newWindow = open('/view_date.html?fldname='+fieldname+'&frmname='+formname+'&time_check=0', 'view_date', 'width=190,height=170,resizable=yes,status=yes,menubar=yes,scrollbars=yes');
      newWindow.creator = self;
      newWindow.focus();
      break;
    case 'cm_analysis_board':
      newWindow = open('/chessmentor/analysis.html?id='+fieldname, 'cm_game_analysis', 'width=430,height=515,resizable=no,status=no,menubar=no,scrollbars=no');
      newWindow.creator = self;
      newWindow.focus();
      break;
    case 'tactics_analysis_board':
      newWindow = open('/tactics/analysis.html?id='+fieldname, 'tactics_game_analysis', 'width=430,height=515,resizable=no,status=no,menubar=no,scrollbars=no');
      newWindow.creator = self;
      newWindow.focus();
      break;
  }
}

function viewContact(contact_id) {
  refine_popup = window.open('view_contact_info.html?contact_id=' + contact_id, 'Show_Contact', 'location=0,menubar=0,resizable=1,height=233,width=300,innerHeight=233,innerWidth=300,scrollbars=0,toolbar=0,titlebar=0');
  refine_popup.creator = self;
  refine_popup.focus();
}
