function openWin( url,width,height ) {
	if(opener != null) {
		if(opener.name == "stuff" && arguments.length < 4) {
			top.parent.stuff.close();
			return;
		}
	}
	if(arguments.length < 4)
		tar = "stuff";

	win = window.open(url,tar,"width=" + width + ",height="+ height + ",scrollbars=no,toolbars=no,locationbar=no,resizable=yes");
	//win.resizeTo( width, height );
	win.focus();
}

function checkOpen( tar ) {
  if( tar.closed == true ) {
    return false;
  }
  return true;
}

function openWin2(url,width,height,tar) {
	if(opener != null) {
		if(opener.name == "stuff" && arguments.length < 4) {
			this.close();
			return;
		}
	}
	if(arguments.length < 4)
		tar = "stuff";
	win = window.open(url,tar,"width=" + width + ",height="+ height + ",scrollbars=no,toolbars=no,locationbar=no,resizeable=yes");
	win.resizeTo( width, height );
	win.focus();
}

function delValues(values) {
	var vals = values.length - 2
	for(var i=1;i<vals;i++) {
		switch(values.elements[i].type) {
			case "checkbox":
				values.elements[i].checked = false;
				break;
			case "text":
			case "textarea":
				values.elements[i].value = "";
				break;
			case "select-one":
				values.elements[i].selectedIndex = 0;
				break;
			default: break;
		}
	}
}
