function checkEditForm(bCheckPassword){
	if (document.editagent.agent.value == ""){
		alert('You must enter a Username');
		return false;
	}
	if (bCheckPassword){
		if (document.editagent.agentpass.value != document.editagent.confirmpass.value){
			alert('Passwords do not match');
			return false
		}
	}
	
	return true;
}

function checkAddForm(){
	if (document.addagent.agent.value == ""){
		alert('You must enter a Username');
		return false;
	}
	if (document.addagent.agentpass.value == ""){
		alert('You must enter a Password');
		return false;
	}
	if (document.addagent.agentpass.value != document.addagent.confirmpass.value){
		alert('Passwords do not match');
		return false;
	}
	if (document.addagent.agentemail.value == ""){
		alert('You must enter an Email Address');
		return false;
	}
	
	return true;
}


function checkForm(){
	if (document.image_upload.image_filename.value == ""){
		alert('You must enter a file to upload');
		return false;
	}
	return true;
}

function showImageWindow(url, image_width, image_height){
	var width = image_width + 25;
	var height = image_height + 25;
	win_left = (screen.width - width) / 2;
	win_top = (screen.height - height) / 2;
	window.open(url, 'IMAGE', 'top='+win_top+',left='+win_left+',width='+width+',height='+height+',scrollbars=no');
}


function showIPIXWindow(url){
	var width = 525;
	var height = 425;
	win_left = (screen.width - width) / 2;
	win_top = (screen.height - height) / 2;
	window.open(url, 'IPIX', 'top='+win_top+',left='+win_left+',width='+width+',height='+height+',scrollbars=no');
}

function realty_check_request_form(){
	if (document.request.person_name.value == ""){
		alert('Please enter your name');
		return false;
	}
	
	if (document.request.email_address.value == ""){
		alert('Please enter an Email Address');
		return false;
	}
	
	if (document.request.phone_number.value == ""){
		alert('Please enter a Contact Phone Number');
		return false;
	}
	
	return true;
}