var s3FlashUploadOrderFormFile = null;
function flashUploadOrderFormFileReposition() {
	s3FlashUploadOrderFormFile.reposition();
};
function submitOrderForm() {
	if(canSubmitOrderForm()) {
if(s3FlashUploadOrderFormFile) {
	s3FlashUploadOrderFormFile.submit();
}

	}
};
function canSubmitOrderForm() {
	return isNotEmpty('order-email', 'Please specify a valid email address.') && isEmail('order-email', 'Please specify a valid email address.');
};
window.addEvent('domready', function() {
	var formOrderForm = $('orderForm');
	if(formOrderForm) {
		formOrderForm.addEvent('submit', function() {
			submitOrderForm();
			return false;
		});
	}
});
window.addEvent('load', function() {
	s3FlashUploadOrderFormFile = new S3FlashUpload({
		form: 'orderForm',
		progress: 'orderForm-file-progress',
		file: 'orderForm-file',
		fakeFile: 'orderForm-file-fake-file',
		browse: 'orderForm-file-browse',
		s3BucketUri: 'http://pth-storage.s3.amazonaws.com/',
		s3Form: 'orderForm-file-s3-form',
		s3ContentType: 'orderForm-file-content-type',
		s3FilePrefix: '2d6c2c16053c91634ab37e09197ce350',
		name: 'nameOrderFormFile',
		fieldName: 'file',
		maxUploadSize: 67108864,
		path: 'https://72.32.51.34/swf/swiff.uploader.swf'
	});

});
