
seek4.prop = function(_obj){
      var hWnd = window.open();
      var doc = hWnd.document;
      doc.write("<h1>"+typeof(_obj)+"</h1>");
      doc.write("<h2>"+_obj+"</h2>");
      doc.write("<table border=1>");
      for (i in _obj){
        doc.write("<tr>");
        doc.write("<th>"+i+"</th>")
        doc.write("<td>"+_obj[i]+"</td>")
        doc.write("<td>"+typeof(_obj[i])+"</td>")
        doc.write("</tr>");
      }
      doc.write("</table>");
}

seek4.TimeHelper = function(_name){
    this.name = _name;
}

seek4.TimeHelper.prototype = {
   startTime : null,
   endTime:null,
   elapsed : null,
   name : "",
   
   begin : function(){
    this.startTime = new Date();
   },
   
   end : function(){
    this.endTime = new Date();
    this.elapsed = this.endTime.getTime() - this.startTime.getTime();
   },
   
   endAndDisplay : function(){
    this.End();
    var mesg = this.name?"Time elapsed for "+this.name:"Time elapsed ";
    alert(mesg+this.elapsed);
   }
}

seek4.con = {
	container: null,
	LineNumber: 0,
	Create: function() {
		var doc = window.document;
		if (window.parent != null) {
			doc = window.parent.document;
		}
		this.container = doc.createElement("DIV");
		this.container.style.background = "black";
		this.container.style.color = "green";
		this.container.style.fontSize = "12px";
		this.container.style.textAlign = "left";
		this.container.style.width = "80%";
		this.container.style.height = "150px";
		this.container.style.overflow = "auto";
		this.container.style.position = "absolute";
		//this.container.style.paddingLeft = "5px";
		this.container.style.zIndex = "1000000000";
		//this.container.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
		this.container.style.left = "0px";
		this.container.style.top = "6px";
		this.container.style.borderTop = "2px outset gray";
		this.ClearButton = doc.createElement("input");
		this.ClearButton.type = "button";
		this.ClearButton.style.width = "6px";
		this.ClearButton.style.height = "6px";
		this.ClearButton.value = "C";
		this.ClearButton.onclick = function() { seek4.con.Clear() };
		this.HideButton = doc.createElement("input");
		this.HideButton.type = "button";
		this.HideButton.style.width = "6px";
		this.HideButton.style.height = "6px";
		this.HideButton.value = "X";
		this.HideButton.onclick = function() { seek4.con.ShowHide() };
		this.BtnClose = doc.createElement("input");
		this.BtnClose.type = "button";
		this.BtnClose.style.width = "6px";
		this.BtnClose.style.height = "6px";
		this.BtnClose.style.background = "red";
		this.BtnClose.onclick = function() { seek4.con.Close() };
		this.d = doc.createElement("DIV");
		this.d.style.width = "80%";
		this.d.style.height = "6px";
		this.d.style.background = "white";
		this.d.style.textAlign = "right";
		this.d.style.padding = "0px";
		this.d.style.position = "absolute";
		this.d.style.left = "0px";
		this.d.style.top = "0px";
		this.d.style.zIndex = "100001"
		this.d.appendChild(this.ClearButton);
		this.d.appendChild(this.HideButton);
		this.d.appendChild(this.BtnClose);

		doc.body.insertBefore(this.container, doc.body.firstChild);
		doc.body.insertBefore(this.d, doc.body.firstChild);
	},
	Clear: function() {
		this.container.innerHTML = "";
		this.LineNumber = 0;
	},
	Close: function() {
		this.container.style.display = "none";
		this.d.style.display = "none";
	},

	ShowAll: function() {
		this.container.style.display = "";
		this.d.style.display = "";
	},
	ShowHide: function() {
		if (this.HideButton.value == "X") this.Hide();
		else { this.Show(); }
	},

	Hide: function() {
		this.HideButton.value = "V";
		this.container.style.display = "none";
	},
	Show: function() {
		this.HideButton.value = "X";
		this.container.style.display = "";
	},
	write: function(_text) {
		if (this.container == null) this.Create();
		this.ShowAll();
		this.container.innerText += _text;
		this.container.scrollTop = this.container.scrollHeight;
	},
	w: function(_text) {
		this.writeLn(_text)
	},
	writeLn: function(_text) {
		this.LineNumber++;
		if (this.container == null) this.Create();
		this.ShowAll();
		this.container.innerHTML += "<br>" + this.LineNumber + ": " + _text;
		this.container.scrollTop = this.container.scrollHeight;
	}, Write: function() {
		var _text = "";
		for (var i = 0; i < arguments.length; i++) {
			_text += arguments[i] + ",";
		}
		this.writeLn(_text);
	}
}