function popUpTest() {
	

	//alert('Sending :\n\n  order_id : '+order_id+'\n  class_id : '+class_id+'\n  hours : '+hours+'\n  action : '+action+'\n\n');
	new Ajax.Request('/pop-up-test',
  {
    method:'get',
    onSuccess: function(transport){
        var width = 200;
  var height = 200;
  var options = "status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,width=" + width + ",height=" + height;
  var url = "/pop-up-test";
  var thiswindow = window.open(url, "popuptest", options);

  if (thiswindow) {
    // center and focus
    var xpos = (window.screen.width / 2) - (width / 2);
    var ypos = (window.screen.height / 2) - (height / 2) - 40; // fudge factor 40 for status bars
    thiswindow.moveTo(xpos, ypos);
    thiswindow.focus();

    return false;
  }
    },
    onFailure: function(){  }
  });

	
	
	
	
	

}

function showclass(order_id, class_id) {
  var width = 900;
  var height = 660;

  if (Prototype.Browser.Gecko || Prototype.Browser.WebKit) {
    width += 2;
    height += 8;
  }

  var options = "status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,width=" + width + ",height=" + height;

  var url = "/user/index.php?mod=takeaclass&oid=";

  if (!isNull(order_id)) {
    url = url + order_id;
  }

  url = url + "&id=";

  if (!isNull(class_id)) {
    url = url + class_id;
  }

  var thiswindow = window.open(url, "takeaclass", options);

  if (thiswindow) {
    // center and focus
    var xpos = (window.screen.width / 2) - (width / 2);
    var ypos = (window.screen.height / 2) - (height / 2) - 40; // fudge factor 40 for status bars

    thiswindow.moveTo(xpos, ypos);

    thiswindow.focus();

    return false;
  }
}

function classeditpreview(class_id, chapter_id, page_id) {
  var width = 900;
  var height = 660;

  if (Prototype.Browser.Gecko || Prototype.Browser.WebKit) {
    width += 2;
    height += 8;
  }

  var options = "status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,width=" + width + ",height=" + height;

  var url = "http://www.renewalzone.com/user/index.php?mod=takeaclass&oid=";

  url = url + "&id=";

  if (!isNull(class_id)) {
    url = url + class_id;
  }

  url = url + "&chapter_id=";

  if (!isNull(chapter_id)) {
    url = url + chapter_id;
  }

  url = url + "&page_id=";

  if (!isNull(page_id)) {
    url = url + page_id;
  }

  var thiswindow = window.open(url, "takeaclass", options);

  if (thiswindow) {
    // center and focus
    var xpos = (window.screen.width / 2) - (width / 2);
    var ypos = (window.screen.height / 2) - (height / 2) - 40; // fudge factor 40 for status bars

    thiswindow.moveTo(xpos, ypos);

    thiswindow.focus();

    return false;
  }
}

function cookieVal(cookieName) {
  thisCookie = document.cookie.split("; ");

  for (i = 0; i < thisCookie.length; i++) {
    if (cookieName == thisCookie[i].split("=")[0]) {
      return thisCookie[i].split("=")[1];
    }
  }

  return null;
}

function setCookie(cookieName, cookieVal) {
    expireDate = new Date;

    expireDate.setMonth(expireDate.getMonth() + 6);

    document.cookie = cookieName+"=" + cookieVal + ";expires=" + expireDate.toGMTString();
}

function isNull(val) {
  return (val == null);
}

function showSourceOther(source, others) {
  var sourcePos = source.selectedIndex;
  var sourceVal = source.value;
  var sourceOth = others[sourcePos];

  if (sourceVal && sourceOth) {
    document.getElementById("source_other_label").innerHTML = sourceOth;
    document.getElementById("source_other").style.display = '';
  }
  else {
    document.getElementById("source_other").style.display = 'none';
    document.getElementById("source_other_label").innerHTML = '';
  }
}