
/* this function is for the photo form, it will dynamically ad the appropriate fields based on the number of photos they wish to upload */
function addUploadFields(num_fields) {

	var uploadlayer = document.getElementById('upload_fields_layer');

	num_fields2 = parseInt(num_fields);
	data = "";
	
	for (i=1;i<=num_fields2;i++) 
	{
		
	   data = data + "<b>Photo #"+ i +"</b><table width='100%' border='0' cellpadding='0' cellspacing='2'><tr class='black_normal'><td>File:</td><td><input type='file' name='upload_field" + i + "' value=''></td></tr><tr class='black_normal'><td>Caption:</td><td><input type='text' name='cap" + i + "' value='' size='30'></td></tr></table><br>";

	}
	
	uploadlayer.innerHTML = "<div style='margin: 7px 0px; font-size: 12px;'>(JPEG photos only)</div>"+data;

}



 function openPhotoPopup(content,target,w,h) {
     window.open(content, "photos","menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,resizable=1,width=" + w + ",height=" + h);
 }
 
  function openPopup(content,target,w,h) {
     window.open(content, "popupwin","menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,resizable=1,width=" + w + ",height=" + h);
 }
  

function openPopup2(content,w,h) {
     window.open(content, "contestWindow","menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,resizable=1,width=" + w + ",height=" + h);
 }

function reloadpop() {
	window.location.reload();
	window.focus();
}

function print_todays_date(){

	// Array of day names
	var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday",
					"Thursday","Friday","Saturday");
	
	// Array of month Names
	var monthNames = new Array(
	"January","February","March","April","May","June","July",
	"August","September","October","November","December");
	
	var now = new Date();
	document.write(dayNames[now.getDay()] + ", " + 
	monthNames[now.getMonth()] + " " + 
	now.getDate() + ", " + now.getFullYear());
	
}

