<!--  dataMiner - data browser / editor -->
<!-- Jason Hines, jason@greenhell.com -->
<!-- $Id: dM.js,v 1.4 2004/08/12 19:26:42 openface Exp $ -->

self.name = 'dM';

// delete confirmation
function getconfirm() {
	if (confirm('Are you sure?')) {
		return true;
	} else {
		return false;
	}
}

// popup window
var notopen=true;
function openwindow(url,width,height) {
	if (notopen || (!notopen && dMwin.closed)) {
		dMwin	= window.open(url,'dMwin','screenX='+width+',screenY='+height+',top=400,left=400,width='+width+',height='+height+',scrollbars=auto,alwaysRaised=yes');
		notopen=false
	} else {
		dMwin.focus()
	}
}

// Add a dropdown item (s) to the dropdown dd, and selected (1,0).
function addItem(dd, s, selected, value) { 
	var i = dd.length;
	if (selected)
		var t = new Option(s, s, 0, 1);
	else
		var t = new Option(s, s, 0, 0);
	if (value != '')
		t.value = value;

	dd.options[i] = t;
}



