// constructor for class InfoWindow
function InfoWindow(url, winattr, width, height) {
	this.url = url;
	dim = "width=" + width + ",height=" + height;
	if (winattr != "") {
		this.attr = winattr + "," + dim;
	} else {
		this.attr = dim;
	}
	rand = Math.round(Math.random() * 10000);
	this.name = "infowin" + rand;
	this.window = null;
}

// (re)displays the InfowWindow
function InfoWindow_show() {
	if (this.window == null || this.window.closed) {
		this.window = window.open(this.url, this.name, this.attr);
	} else {
		this.window.location = this.url;
	}
	this.window.focus();
}

// create InfoWindow.prototype
new InfoWindow('','',0,0);

// link instance method 
InfoWindow.prototype.show = InfoWindow_show;