function upload_validate() {
	with ( window.document.PhotoUpload ) {
		if ( Filedata.value.length == 0 ) {
			alert("You must choose a photo to upload.");
           		return false;
		}

		var splitup = Filedata.value.split('\\');
		var arraylength = splitup.length;
		
		TargetURL.value += splitup[arraylength-1];
		Filename.value += splitup[arraylength-1];
	}
	return true;
}

function community_validate() {
	with ( window.document.Community ) {
		if ( txtTitle.value.length == 0 || txtURL.value.length == 0 ) {
			alert("You must enter a title and URL.");
			return false;
		}
	}
	return true;
}

function agent_validate() {
	with ( window.document.AgentData ) {
		if ( FirstName.value.length == 0 || LastName.value.length == 0 ) {
			alert("You must enter a first and last name.");
			return false;
		}
		if ( Password.value.length == 0 ) {
			alert("You must enter a password.");
			return false;
		}
	}
	return true;
}

function property_validate() {
	with ( window.document.PropDescription ) {
		if ( Title.value.length == 0 ) {
			alert("You must enter a title for this property.");
			return false;
		}
	}
	return true;
}

function category_validate() {
	with ( window.document.Category ) {
		if ( txtCategory.value.length == 0 ) {
			alert("You must enter a category name.");
			return false;
		}
	}
	return true;
}

function caption_validate() {
	with ( window.document.SaveCaption ) {
		if ( Caption.value.length == 0 ) {
			alert("You must enter a caption.");
			return false;
		}
	}
	return true;
}

function general_validate() {
	with ( window.document.GeneralData ) {
		if ( Password.value.length == 0 ) {
			alert("You must enter a password.");
			return false;
		}
	}
	return true;
}

function contactinfo_validate() {
	with ( window.document.ContactData ) {
		if ( AgencyName.value.length == 0 ) {
			alert("You must enter the Agency's name.");
			return false;
		}
	}
	return true;
}

function help( url ) {

	var win = window.open( "helpfiles/" + url + ".htm", "Help", "toolbar=no,width=300,height=400,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
	return false;
}