
/* 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> &nbsp;&nbsp;&nbsp;<a class='black_small'>(Photos <a href='howto_detail.html#photoedit' target='new' class='red_small'>must be in JPEG format, at least 300 dpi</a>)</a></a><br><ul><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></ul><br>";

	}
	
	uploadlayer.innerHTML = 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();
}
