function WinOpen(url,winName)
{
	features = "toolbar=0,location=0,menubar=0,directories=0,resizable=1,status=0,scrollbars=1,width=750,height=550";
	window.open(url,winName,features);
}

// function PhotoGalleryOpen(url,winName)
// {
// 	features = "toolbar=0,location=0,menubar=0,directories=0,resizable=0,status=0,scrollbars=1,width=640,height=640";
// 	window.open(url,winName,features);
// }


function  EW_checkMyForm(EW_this) {
	if  (!EW_hasValue(EW_this.x_firstname, "TEXT" )) {
		if  (!EW_onError(EW_this, EW_this.x_firstname, "TEXT", "Please enter required field - First Name"))
			return false;
	}
	if  (!EW_hasValue(EW_this.x_lastname, "TEXT" )) {
		if  (!EW_onError(EW_this, EW_this.x_lastname, "TEXT", "Please enter required field - Last Name"))
			return false;
	}
	
	// For zip, can be blank but verify it if user added something.
	if  (EW_hasValue(EW_this.x_zip, "TEXT" )) {
		
		if (!EW_checkzip(EW_this.x_zip.value)) {
			if  (!EW_onError(EW_this, EW_this.x_zip, "TEXT", "Enter valid zipcode or leave blank"))
				return false;
		}
	}
	if  (EW_hasValue(EW_this.x_email, "TEXT" )) {
		
		if (!EW_checkemail(EW_this.x_email.value)) {
			if  (!EW_onError(EW_this, EW_this.x_zip, "TEXT", "Enter valid email or leave blank"))
				return false;
		}
	}

	if  (!EW_hasValue(EW_this.x_phone, "TEXT" ) || !EW_checkphone(EW_this.x_phone.value)) {
		if  (!EW_onError(EW_this, EW_this.x_zip, "TEXT", "Phone number is required. (xxx.xxx.xxxx)"))
			return false;
	}
	if  (EW_hasValue(EW_this.x_alt_phone, "TEXT" )) {
			
		if (!EW_checkphone(EW_this.x_alt_phone.value)) {
			if  (!EW_onError(EW_this, EW_this.x_alt_phone, "TEXT", "Enter valid phone number or leave blank."))
				return false;
		}
	}
	if  (EW_hasValue(EW_this.x_fax_phone, "TEXT" )) {
			
		if (!EW_checkphone(EW_this.x_fax_phone.value)) {
			if  (!EW_onError(EW_this, EW_this.x_fax_phone, "TEXT", "Enter valid fax number or leave blank."))
				return false;
		}
	}


	return true;
}

