function bookingsPeriodEdit(){
    
	var infoBox = {region: 'north', baseCls: '', cls: 'dialogHelpTitle', height: 48, border: 0, html: '<strong style="font-size: 13px; font-weight: bold">Type the Periods in the text area</strong>'};
	
	var subjectBox = {region: 'center', baseCls: '', cls: '', height: 48, border: 0, autoLoad: '/ajax.cfm?frame=true&a=bookings&mode=edit&tab=editTimes&s=' + currentSchoolAlias };

	win = new Ext.Window({
      title: "Subject",
      minWidth: 500,
      width: 370,
	  layout:'fit',
      height: 600,
      layout: 'border',
      modal: true,
      maximizable: false,
      closeAction: 'hide',
      buttons: [],
      items: [infoBox,subjectBox],
      keys: {
        key: 27, // Esc key
        handler: function(){ win.hide(); },
        scope: this
      }
    });
    win.show();
  }
  
  
    var myhash = new Hash({'0': '12:00 AM', '0.0104166666667': '12:15 AM', '0.0208333333333': '12:30 AM', '0.03125': '12:45 AM', '0.0416666666667': '1:00 AM', '0.0520833333333': '1:15 AM', '0.0625': '1:30 AM', '0.0729166666667': '1:45 AM', '0.0833333333333': '2:00 AM', '0.09375': '2:15 AM', '0.104166666667': '2:30 AM', '0.114583333333': '2:45 AM', '0.125': '3:00 AM', '0.135416666667': '3:15 AM', '0.145833333333': '3:30 AM', '0.15625': '3:45 AM', '0.166666666667': '4:00 AM', '0.177083333333': '4:15 AM', '0.1875': '4:30 AM', '0.197916666667': '4:45 AM', '0.208333333333': '5:00 AM', '0.21875': '5:15 AM', '0.229166666667': '5:30 AM', '0.239583333333': '5:45 AM', '0.25': '6:00 AM', '0.260416666667': '6:15 AM', '0.270833333333': '6:30 AM', '0.28125': '6:45 AM', '0.291666666667': '7:00 AM', '0.302083333333': '7:15 AM', '0.3125': '7:30 AM', '0.322916666667': '7:45 AM', '0.333333333333': '8:00 AM', '0.34375': '8:15 AM', '0.354166666667': '8:30 AM', '0.364583333333': '8:45 AM', '0.375': '9:00 AM', '0.385416666667': '9:15 AM', '0.395833333333': '9:30 AM', '0.40625': '9:45 AM', '0.416666666667': '10:00 AM', '0.427083333333': '10:15 AM', '0.4375': '10:30 AM', '0.447916666667': '10:45 AM', '0.458333333333': '11:00 AM', '0.46875': '11:15 AM', '0.479166666667': '11:30 AM', '0.489583333333': '11:45 AM', '0.5': '12:00 PM', '0.510416666667': '12:15 PM', '0.520833333333': '12:30 PM', '0.53125': '12:45 PM', '0.541666666667': '1:00 PM', '0.552083333333': '1:15 PM', '0.5625': '1:30 PM', '0.572916666667': '1:45 PM', '0.583333333333': '2:00 PM', '0.59375': '2:15 PM', '0.604166666667': '2:30 PM', '0.614583333333': '2:45 PM', '0.625': '3:00 PM', '0.635416666667': '3:15 PM', '0.645833333333': '3:30 PM', '0.65625': '3:45 PM', '0.666666666667': '4:00 PM', '0.677083333333': '4:15 PM', '0.6875': '4:30 PM', '0.697916666667': '4:45 PM', '0.708333333333': '5:00 PM', '0.71875': '5:15 PM', '0.729166666667': '5:30 PM', '0.739583333333': '5:45 PM', '0.75': '6:00 PM', '0.760416666667': '6:15 PM', '0.770833333333': '6:30 PM', '0.78125': '6:45 PM', '0.791666666667': '7:00 PM', '0.802083333333': '7:15 PM', '0.8125': '7:30 PM', '0.822916666667': '7:45 PM', '0.833333333333': '8:00 PM', '0.84375': '8:15 PM', '0.854166666667': '8:30 PM', '0.864583333333': '8:45 PM', '0.875': '9:00 PM', '0.885416666667': '9:15 PM', '0.895833333333': '9:30 PM', '0.90625': '9:45 PM', '0.916666666667': '10:00 PM', '0.927083333333': '10:15 PM', '0.9375': '10:30 PM', '0.947916666667': '10:45 PM', '0.958333333333': '11:00 PM', '0.96875': '11:15 PM', '0.979166666667': '11:30 PM', '0.989583333333': '11:45 PM'});

    function checkSelect(theSelect){
   
    if (($(theSelect).up().previous('div.timeField') == undefined) || 
    ($(theSelect).up().previous('div.timeField').down(1) != undefined 
    && $(theSelect).value > $(theSelect).up().previous('div.timeField').down(1).value)){
      if ($(theSelect).up().next('div.timeField') != undefined &&  
      $(theSelect).value >= $(theSelect).up().next('div.timeField').down(1).value){
       val = $(theSelect).up().next('div.timeField').down(1).value;
       valID = $(theSelect).up().next('div.timeField').down(1).identify();
       valCurrent = $(theSelect).value;
        $(theSelect).up().next('div.timeField').down(1).update('');
        myhash.each(function(pair) {
          if (pair.key > valCurrent){
          elementObj = new Element('option', { 'value': pair.key }).update(pair.value);
            $(valID).appendChild(elementObj);
          } /*else {
          elementObj = new Element('option', { 'value': pair.key }).update(pair.value);
          $(valID).remove(elementObj);
          changed = true;
          }*/
        });
        checkSelect(valID);
        }
      } else {
      alert('Your Previous time is Confilcting');
      }
    }
