// ************************************************************************************
// This file includes the javascript function for webex online meeting integration
//
// Copyright &copy; 2006 Xerox Corporation. All Rights Reserved.
// @author Ji Wang
// ************************************************************************************

// restore the window's focus
function restoreFocus()
{
	window.focus();
}

// open the window to create webex online meeting
function openWebExMeetingInfoWindow(location_base)
  {

   var location = location_base + 'dsweb/webex/webExMeetingLogin.jsp';
   var attributes = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,width=800,height=600";
   var win = window.open( location, "myonlinemeetingswindow", attributes);
   win.onClose = restoreFocus;
   win.focus();
}

// open the window to create webex online meeting in the collection whose handle is object_handle
function openWebExMeetingInfoWindowWithHandle(location_base, object_handle)
  {
   var location = location_base + 'dsweb/webex/webExMeetingLogin.jsp?handle='+object_handle;
   var attributes = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,width=800,height=600";
   var win = window.open( location, "myonlinemeetingswindow", attributes);
   win.onClose = restoreFocus;
   win.focus();
}

// open the window for webex login page
function openWebExMeetingLoginWindow(location_base)
  {
   var location = location_base + 'dsweb/webex/webExMeeingListLogin.jsp';
   var attributes = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,width=800,height=500";
   var win = window.open( location, "myonlinemeetingswindow", attributes);
   win.onClose = restoreFocus;
   win.focus();
}

// open the window to delete webex meeting
function deleteWebExMeeting(location_base, meetingKey)
{
    var location = location_base + 'dsweb/webex/deleteWebExMeetingCheck.jsp?meetingKey=' + meetingKey;
    var attributes = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,width=800,height=300";
    var win = window.open( location, "deleteonlinemeetingswindow", attributes);
	win.onClose = restoreFocus;
	win.focus();
}
