<h1>Competition Entry Fee Payment</h1>

{include_php file="shared_handle:competition.prepareContribution"}

{select_query assign="userInfo" return="row"}
	firstName, lastName, address1, address2, city, state, country, zip
	FROM _users	
	WHERE id = '{$user->id}'
{/select_query}


<form name="potContribution" method="post" action="index.php" style="margin:0px;">
<input type="hidden" name="pg" value="{$page.name}" />
<input type="hidden" name="no_expire" value="true" />
<input type="hidden" name="return" value="{$smarty.request.return|default:"home"}" />

{if $competition}

<input type="hidden" name="contribution[cid]" value="{$competition.id|default:"newcomp"}" />
<input type="hidden" name="contribution[total]" value="{$competition.total}" />

You are about to pay the entry fee for the following competition. Please make sure this is the correct competition before proceding!<br /><br />

Competition Title: <b>{$competition.title}</b><br />
Competition Type: <b>{$competition.type|niceText}, {$competition.style}</b><br />
Started By: <b>{$competition.firstName} {$competition.lastName} ({$competition.username})</b><br />
Term: <b>{$competition.startDate|date_format2:"M j, Y"} to {$competition.endDate|date_format2:"M j, Y"}</b><br />
<br />
{if $competition.individualPotAmount}
	Individual Pot Contribution Amount: <b>${$competition.individualPotAmount|number_format:"2"}</b> (You are agreeing to pay the winner this amount when the competition is over!)<br />
{else}
	There is no individual contribution required for this competition, as it is funded by third party donations ({$competition.potMethod}).<br />
{/if}
WeightLossWars.com Entry Fee: <b>${$competition.entryFee|number_format:"2"}</b><br />
<h2 class="underline">&nbsp;</h2>
TOTAL: <em>${$competition.total|number_format:"2"}</em><br />
<h2 class="overline">&nbsp;</h2>

<table cellpadding="0" cellspacing="0"><tr><td>

<div class="chunk300">
	<h2 class="withBG">Billing Information</h2>
	First Name:
	<input type="text" name="bill[firstname]" value="{$smarty.request.bill.firstname|default:$userInfo.firstName}" class="textInput" style="width:200px;" /><br />
	Last Name:
	<input type="text" name="bill[lastname]" value="{$smarty.request.bill.lastname|default:$userInfo.lastName}" class="textInput" style="width:200px;" /><br />

	Address:
	<input type="text" name="bill[address1]" value="{$smarty.request.bill.address1|default:$userInfo.address1}" class="textInput" style="width:200px;" /><br />
	Line 2:
	<input type="text" name="bill[address2]" value="{$smarty.request.bill.address2|default:$userInfo.address2}" class="textInput" style="width:200px;" /><br />

	City:
	<input type="text" name="bill[city]" value="{$smarty.request.bill.city|default:$userInfo.city}" class="textInput" style="width:200px;" /><br />

	State, Zip, Country:
	<input type="text" name="bill[state]" value="{$smarty.request.bill.state|default:$userInfo.state}" class="textInput" style="width:30px;" maxlength="2" />
	<input type="text" name="bill[zip]" value="{$smarty.request.bill.zip|default:$userInfo.zip}" class="textInput" style="width:50px;" />
	<input type="text" name="bill[country]" value="{$smarty.request.bill.country|default:$userInfo.country}" class="textInput" style="width:50px;" maxlength="2" /><br />
</div>
<div class="chunk300">
	<h2 class="withBG">Payment Information</h2>
	Payment Method:
	<select name="bill[paymentMethod]" size="1">
		<option value="Visa"{if $smarty.request.bill.paymentMethod eq "Visa"} selected{/if}>Visa</option>
		<option value="Mastercard"{if $smarty.request.bill.paymentMethod eq "Mastercard"} selected{/if}>Mastercard</option>	
	</select><br />

	Card Number:
	<input type="text" name="bill[ccnum]" value="" class="textInput" style="width:200px;" /><br />

	Expiration Date: <small>(MMYY)</small>
	<input type="text" name="bill[ccexp]" value="" class="textInput" maxlength="4" style="width:50px;" /><br />
</div>
</td></tr></table>
<div class="hBox" style="text-align:right;">
	<a href="javascript://" class="button"> Submit Contribution </a>
</div>
<div id="fMatches" class="xFloat" style="padding:3px; background-color:#FFFFFF; border:#666666 1px solid;"></div>

{if $modules.spadeAutoComplete}
	<script language="JavaScript" src="{$modules.x}"></script>
	<script language="JavaScript" src="{$modules.spadeAutoComplete}"></script>
	<script language="JavaScript">
		var states = new Array('AL','AK','AS','AZ','AR','CA','CO','CT','DE','DC','FL','GA','GU',
					'HI','ID','IL','IN','IA','KS','KY','LA','ME','MH','MD','MA',
					'MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC',
					'ND','OH','OK','OR','PW','PA','PR','RI','SC','SD','TN','TX',
					'UT','VT','USVI','VA','WA','WV','WI','WY','AB','BC','LB','MB',
					'NB','NF','NT','NS','ON','PE','PQ','SK','YT');
		initAutoComplete(bill[state]', 'states', true);

		{* var countries = new Array ('United States of America', 'Canada', 'Germany', 'United Kingdom', 'India', '---------------------', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegowina', 'Botswana', 'Bouvet Island', 'Brazil', 'British Ind. Ocean Terr', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Cape Verde', 'Cayman Islands', 'Central African Rep.', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocoa (Keeling) Isl.', 'Colombia', 'Comoros', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote Divoire', 'Hrvatska', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Isl. (Malvinas)', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Terr.', 'Gabon', 'Gambia', 'Georgia', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Heard & McDonald Isl.', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'Indonesia', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Republic of Korea', 'Kuwait', 'Kyrgyzstan', 'Lao Peoples Dem. Rep.', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia: Fed. States of', 'Moldova: Republic of', 'Monaco', 'Mongolia', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Isl.', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'St. Vincent & Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'S. Georgia & S. Sandwich Isl.', 'Spain', 'Sri Lanka', 'St. Helena', 'St. Pierre and Miquelon', 'Suriname', 'Svalbard & Jan Mayen Isl.', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan', 'Tajikistan', 'Tanzania: United Rep. of', 'Thailand', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'US Minor Outlying Isl.', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City (Holy See)', 'Venezuela', 'Vietnam', 'Virgin Islands (British)', 'Wallis and Futuna Islands', 'Western Sahara', 'Yemen', 'Yugoslavia', 'Zaire', 'Zambia', 'Zimbabwe', 'Not Listed'); *}
		var countries = new Array ('USA', 'Canada', 'Germany', 'UK', 'India', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegowina', 'Botswana', 'Bouvet Island', 'Brazil', 'British Ind. Ocean Terr', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Cape Verde', 'Cayman Islands', 'Central African Rep.', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocoa (Keeling) Isl.', 'Colombia', 'Comoros', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote Divoire', 'Hrvatska', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Isl. (Malvinas)', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Terr.', 'Gabon', 'Gambia', 'Georgia', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Heard & McDonald Isl.', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'Indonesia', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Republic of Korea', 'Kuwait', 'Kyrgyzstan', 'Lao Peoples Dem. Rep.', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia: Fed. States of', 'Moldova: Republic of', 'Monaco', 'Mongolia', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Isl.', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'St. Vincent & Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'S. Georgia & S. Sandwich Isl.', 'Spain', 'Sri Lanka', 'St. Helena', 'St. Pierre and Miquelon', 'Suriname', 'Svalbard & Jan Mayen Isl.', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan', 'Tajikistan', 'Tanzania: United Rep. of', 'Thailand', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'US Minor Outlying Isl.', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City (Holy See)', 'Venezuela', 'Vietnam', 'Virgin Islands (British)', 'Wallis and Futuna Islands', 'Western Sahara', 'Yemen', 'Yugoslavia', 'Zaire', 'Zambia', 'Zimbabwe', 'Not Listed');
		
		initAutoComplete('bill[country]', 'countries', true);
	</script>
{/if}

{else}   {* If NOT competition... *}

	Because errors were encountered, we cannont process your contribution at this time. If you continue to have problems, please <a href="?pg=contact">contact us</a>.

{/if}

</form>