function open_clip(name, width, height, movie_width, movie_height)
{
	var options, url;
	options = 'height=' + height + ', width=' + width + ', scrollbars=yes, resizable=yes, nostatus,top=50,left=50, menubar=no';
	url = 'studios_video.asp?name=' + name + '&movie_width=' + movie_width + '&movie_height=' + movie_height;

	window.open(url,name,options);
}

function open_url(url, name, width, height)
{
	var options, url;
	options = 'height=' + height + ', width=' + width + ', menubar=yes, scrollbars=yes, resizable=yes, nostatus,top=50,left=50, location=yes, toolbar=yes';
	window.open(url,name,options);
}


function adjust_days() {
	var themonth = document.theform.themonth.selectedIndex + 1;
	var theyear = document.theform.theyear.options[document.theform.theyear.selectedIndex].value;

	var numdays = 0;
	if (themonth==1 || themonth==3 || themonth==5 || themonth==7 || themonth==8 || themonth==10 || themonth==12)
		numdays = 31;
	else if (themonth==2) {
		if (theyear % 4==0)
			numdays = 29;
		else
			numdays = 28;
	} else
		numdays = 30;

	var seldate = document.theform.thedate.selectedIndex;
	if (seldate==-1) seldate = 0;

	for (i=0; i < previousnumdays; i++)
		document.theform.thedate.options[i] = null;

	for (i=1; i <= numdays; i++) {
		var newoption = new Option(i, i);
		document.theform.thedate.options[i-1] = newoption;
	}

	if (seldate<numdays)
		document.theform.thedate.selectedIndex = seldate;
	else
		document.theform.thedate.selectedIndex = numdays - 1;

	previousnumdays = numdays;
}
