function newWd(page,width,height) 
{
	newwin = window.open(page, 'BigPic', 'screenX=20,screenY=20,x=200,y=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+width+',height='+height); 
	newwin.focus();
}

function checkAll(fld,val)
{
	for (var x=0;x<fld.length;x++)
		fld[x].checked = val;
}

function sure()
{
	return confirm('Are you sure you would like to remove this?');
}

var opt = new Array(
	new Array(new Array('0','None')),	
	new Array(new Array('0','Every Day')),	
	new Array(new Array('0','Sunday'),
			  new Array('1','Monday'),
			  new Array('2','Tuesday'),
			  new Array('3','Wednesday'),
			  new Array('4','Thursday'),
			  new Array('5','Friday'),
			  new Array('6','Saturday')),	
	new Array(31)
);

for (var x=0;x<31;x++)
	opt[3][x] = new Array(x+1,x+1);

opt[3][30][1] += " (will run the last of the month)";

function setOptions(fld,index)
{
	var options = opt[index];
	while (fld.options.length) fld.options[0] = null;
	for (var x=0;x<options.length;x++) {
		fld.options[x] = new Option(options[x][1],options[x][0]);
	}
}

function selectOption(fld,val)
{
	for (var x=0;x<fld.options.length;x++) {
		if (fld.options[x].value == val) {
			fld.options[x].selected = true;
			break;	
		}
	}
}