// -------------------------------------------------------------
// File     : globals.js
// Author   : M. Comandini, F. Nembrini
// Company  : (C) Quarcom Teleinformatics
// Date     : February 6, 2002
// Aim      : Manage window launch
// -------------------------------------------------------------

function ChangePwd()
{
  var winMap = window.open("../registration/php/chgPwd.php","ChangePassword","width=250,height=250,scrollbars=0,resizable=0,menubar=0,location=0,alwaysRaised=0");
} // End ChangePwd()

function launchForum(form)
{
  if(form.f_group.options[form.f_group.options.selectedIndex].value == 0)
  {
    alert('Please choose a group');
  }
  else
  {
    id = form.f_group.options[form.f_group.options.selectedIndex].value;
    var winFor = window.open("../../forum/forum.php?id=" + id + "","Forum","width=790,height=500,scrollbars=1,resizable=0,menubar=0,location=0,alwaysRaised=0,status=1,toolbar=0");
  }
} // End launchForum()

function launchForumManagement(form)
{
  if(form.f_group.options[form.f_group.options.selectedIndex].value == 0)
  {
    alert('Please choose a group');
  }
  else
  {
    id = form.f_group.options[form.f_group.options.selectedIndex].value;
    var winFor = window.open("forumManager.php?group=" + id + "","FM","width=790,height=500,scrollbars=1,resizable=0,menubar=0,location=0,alwaysRaised=0,status=1,toolbar=0");
  }  
} // End launchForumManagement()

function deleteMsg(form, id, mst, page, keyword)
{
  form.action = "tforumManager.php?del=" + id + "&mst=" + mst + "&page=" + page + "&keyword=" + keyword + "";
  form.method = "POST";
  form.submit();
} // End deleteMsg()

function showMsg(id, group)
{
  var winShowMsg = window.open("show_msg.php?id=" + id + "&group=" + group + "","ShowMsg","width=450,height=400,scrollbars=1,resizable=0,menubar=0,location=0,alwaysRaised=0,status=1,toolbar=0");
} // end newMsg()

function changeStatusMsg(form, id, st, mst, page, keyword)
{
  form.action = "tforumManager.php?id=" + id + "&st=" + st + "&mst=" + mst + "&page=" + page + "&keyword=" + keyword + "";
  form.method = "POST";
  form.submit();
} // End changeStatusMsg()

function searchMsg(form)
{
  // Check fields ....
  form.action = "tforumManager.php";
  form.target = "c_fm";
  form.method = "POST";
  form.submit();
} // end postMsg()

function evalSkills(form)
{
  form.method = "post";
  form.action = "skills_eval.cfm";
  form.submit();
} // end evalSkills()

function showInfoProfile(id)
{
  var winShowMsg = window.open("skills_ip.cfm?id=" + id + "","SIP","width=450,height=400,scrollbars=1,resizable=1,menubar=0,location=0,alwaysRaised=0,status=1,toolbar=0");
} // end showInfoProfile()

function showInfoRole(id)
{
  var winShowMsg = window.open("skills_ir.cfm?id=" + id + "","SIR","width=450,height=400,scrollbars=1,resizable=1,menubar=0,location=0,alwaysRaised=0,status=1,toolbar=0");
} // end showInfoRole()

