// JavaScript Document
var dj_tutbase = function(){
  var pub = {};
  //var that = this;

  //private stuff
    var popwindow;
    var newwindow;

    var isMSIE = /*@cc_on!@*/false;
    
    pub.popInstr = function(url) {
      var xpos = screen.width - 420;
      var ypos = 60;
      var options = 'height=360,width=400,';
      options += 'left=' + xpos + ',top=' + ypos + ',';
      options += 'resizable=1,scrollbars=1';
      
    	popwindow=window.open(url,'instr',options);
    	//if (window.focus) {newwindow.focus()}
    	return false;
    };
    pub.popInstr_pos = function(url, x, y) {
      var xpos = x;
      var ypos = y;
      var options = 'height=360,width=400,';
      options += 'left=' + xpos + ',top=' + ypos + ',';
      options += 'resizable=1,scrollbars=1';
      
    	popwindow=window.open(url,'instr',options);
    	return false;
    }       
    pub.popsup = function(url, sname, x, y) {
      var xpos = x;
      var ypos = y;
      var options = 'height=300,width=380,';
      options += 'left=' + xpos + ',top=' + ypos + ',';
      options += 'resizable=1,scrollbars=1';
      
    	newwindow=window.open(url,sname,options);
    	return false;
    }
    
    pub.popclose = function() {
      if (popwindow.location && !popwindow.closed) {
        //if (popwindow)
        popwindow.close();
      }
      return false;
    };
    pub.closing = function() {
      //if (popwindow && popwindow.location && !popwindow.closed) {
      if (popwindow) {
        popwindow.close();
      }
      if (newwindow) {
        newwindow.close();
      }      
    };
          
  
  return pub;
}();

//dj_tutbase.publicFunction();
