﻿// String Builder
function StringBuilder(value)
{
	this.strings = new Array("");
	this.append(value);
}
StringBuilder.prototype = {
    append: function (value) { if (value) this.strings.push(value); },
    clear: function () { this.strings.length = 1; },
    toString: function () {	return this.strings.join(""); }
}
function OpenModalWindow(url, name, w, h)
{
	var l = (window.screen.availWidth-w)/2; 
	var t = (window.screen.availHeight-h-22)/2; 
	return window.showModalDialog(url,name,'center:yes;resizable:yes;dialogHeight:' + h + 'px; dialogWidth:' + w + 'px;');	
}
function OpenWindow(url, w, h) {
  var wnd;
  wnd = window.open(url, null, "width=" + w + ",height=" + h + ",resizable=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no");
  wnd.focus();
  return false;
}

function $(TagID) { return document.getElementById(TagID); }
function $Value(TagID) { var el = document.getElementById(TagID); return (el != null)?el.value:null; }
function $innerHTML(TagID) { var el = document.getElementById(TagID); return (el != null)?el.innerHTML:null; }

