var pricing=new Array();pricing[0]=new Array(9,"5GB",3);pricing[1]=new Array(19,"20GB",6);pricing[2]=new Array(35,"40GB",10);pricing[3]=new Array(79,"150GB",20);pricing[4]=new Array(135,"300GB",40);var selectedprice=2,usesslselected=false,selectedstorage=0,item_name,price;function getSubscribe(){if($("priceselect")){selectedprice=$("priceselect").value}var p=pricing[selectedprice][0];if($("usessl")){usesslselected=$("usessl").checked}if(usesslselected){p+=9}if($("storageselect")){selectedstorage=eval($("storageselect").value)}p+=selectedstorage*pricing[selectedprice][2];price=p+".00";item_name="Uploadthingy subscription for "+currdomain+": "+pricing[selectedprice][1]+"/month transfers";if(usesslselected){item_name+=" with SSL encryption"}item_name+=", files are stored for "+(selectedstorage+1)+" month"+(selectedstorage>0?"s":"");showSubscribe()}function showSubscribe(){var B;var C=false;try{if(!purchasedate||purchasedate=="no"){B="Subscribe to uploadthingy by selecting from the options and then clicking the Paypal Subscribe button below."}else{B="Your subscription started on "+purchasedate+" and is currently active. You can unsubscribe through your Paypal account. Please contact us if you have any questions.<br><br><a href=# onclick='authdownload();'>Return to download area</a>";B+="<br><br>You can change your uploadthingy subscription by selecting the options and then clicking the Paypal Subscribe button below.";C=true}}catch(A){B="Subscribe to uploadthingy by selecting from the options and then clicking the Paypal Subscribe button below."}B+=" Contact us if you prefer receiving invoices, if you're interested in a discounted yearly subscription or higher transfer amounts! <br><br>";B+='<select id=priceselect onchange="getSubscribe();">';B+="<option value='0'"+(selectedprice==0?" selected":"")+">Small @ $9/month: 5GB transfers per month.";B+="<option value='1'"+(selectedprice==1?" selected":"")+">Medium @ $19/month: 20GB transfers per month.";B+="<option value='2'"+(selectedprice==2?" selected":"")+">Large @ $35/month: 40GB transfers per month.";B+="<option value='3'"+(selectedprice==3?" selected":"")+">X-Large @ $79/month: 150GB transfers per month.";B+="<option value='4'"+(selectedprice==4?" selected":"")+">XX-Large @ $135/month: 300GB transfers per month.";B+="</select>";B+='<br><br><input type=checkbox id=usessl onchange="getSubscribe();" '+(usesslselected?" checked":"")+"> Add secure SSL encryption for uploads & downloads for $9 per month";B+='<br><br>Keep uploaded files for <select id=storageselect onchange="getSubscribe();">';B+="<option value='0'"+(selectedstorage==0?" selected":"")+">1 month (free)";for(i=1;i<12;i++){B+="<option value='"+i+"'"+(selectedstorage==i?" selected":"")+">"+(i+1)+" months (add $"+(i*pricing[selectedprice][2])+".00 per month)"}B+="</select>";B+="<br><br><form action='https://www.paypal.com/cgi-bin/webscr' method='post'>";B+="<table><tr valign=top><td><input type='image' src='https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online!'>";B+="<img alt='' border='0' src='https://www.paypal.com/en_US/i/scr/pixel.gif' width='1' height='1'>";B+="<input type='hidden' name='cmd' value='_xclick-subscriptions'>";B+="<input type='hidden' name='business' value='paypal@49pm.com'>";B+="<input type='hidden' id='item_name' name='item_name' value='"+item_name+"'>";B+="<input type='hidden' name='item_number' value='uploadwidget-"+sitecode+"'>";B+="<input type='hidden' name='page_style' value='Primary'>";B+="<input type='hidden' name='no_shipping' value='1'>";B+="<input type='hidden' name='return' value='http://www.uploadthingy.com'>";B+="<input type='hidden' name='cancel_return' value='http://www.uploadthingy.com'>";B+="<input type='hidden' name='no_note' value='1'>";B+="<input type='hidden' name='currency_code' value='USD'>";B+="<input type='hidden' name='lc' value='US'>";B+="<input type='hidden' name='bn' value='PP-SubscriptionsBF'>";B+="<input id='price' type='hidden' name='a3' value='"+price+"'>";B+="<input type='hidden' name='p3' value='1'>";B+="<input type='hidden' name='t3' value='M'>";B+="<input type='hidden' name='src' value='1'>";B+="<input type='hidden' name='sra' value='1'>";B+="<input type='hidden' name='notify_url' value='http://www.uploadthingy.com'>";if(C){B+="<input type='hidden' name='modify' value='2'>"}B+="</td><td> &nbsp;  &nbsp; </td><td><input type=button value='Cancel' onclick='authdownload();'></td></tr></table></form><br>Your subscription will be enabled immediately after you complete your subscription signup through Paypal. You will be able to unsubscribe at any time through your Paypal account.";setHTML("downloadarea",B)};
