// // private functions // var win = new Array() ; function openPopup( name, url, size, title) { // open a new window win[name] = window.open( url, name, size ) ; // give the new window focus if ( ( win[name] != null ) && ( win[name].closed == false ) ) { win[name].focus() ; } else { return false ; } } function closePopup( window_name ) { if ( win[window_name] != null && ! win[window_name].closed ) { win[window_name].close(); } return ; } // // public functions // function startHorizon( channel, useplugin, user, password, nickname, paramstring ) { var windowname = "horizonWin"; var horizonurl = "http://ubc.wimba.com/check_wizard.pl"; // set the channel ( default to lobby ) if ( channel != null) { horizonurl += "?channel=" + channel; } else { horizonurl += "?channel=lobby"; } if ( useplugin != null ) { horizonurl += "&useplugin=" + useplugin; } if ( user != null ) { horizonurl += "&AuthName=Horizon&credential_0=" + user; } if ( password != null ) { horizonurl += "&credential_1=" + password; } if ( nickname != null ) { horizonurl += "&credential_2=" + nickname; } if ( paramstring != null ) { horizonurl += "&" + paramstring; } // open a window with the horizon ui var properties = "scrollbars=no,resizable=yes,width=900,height=648" ; openPopup( windowname, horizonurl, properties, "Wimba Classroom"); return; } function startHorizonTeach( channel, useplugin, user, password, nickname, paramstring ) { // additional params for the presenter ui var p = "hzlgasknick=0"; p += "&hzlgaskpass=1"; p += "&" + paramstring; startHorizon( channel, useplugin, user, password, nickname, p ); return; } function startWizard( config ) { var url = "http://ubc.wimba.com/wizard/wizard.html"; if ( config == null ) { url += "?wc=" + "wizard.conf"; } else { url += "?wc=" + config; } // open a window with the horizon ui var properties = "scrollbars=no,resizable=no,width=900,height=648" ; openPopup( "wizard", url, properties, "Wimba Classroom Wizard" ); return; }