Ext.onReady(function(){
Ext.namespace("SwitchGames","SwitchGames.Account");
if(SwitchGames.Account.accountSetupDialog==null){
SwitchGames.Account.accountSetupDialog=SwitchGames.Dialogs.createDialog("","account-creation-dlg","",941,null,"sg-window",true);
SwitchGames.Account.accountSetupDialog.on("hide",function(e,t){
window.location.href="index.php";
});
}
var _3=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"title-dialog-ltGrey-lg\">account info","</div>","<div id=\"panel1error\" class=\"title-dialog-validation-error-msg\">","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-green\"></div>","<div class=\"dot-grey\"></div>","<div class=\"dot-grey\"></div>","</div>","<div class=\"ac-dialog-content\">","<div class=\"ac-dialog-content-inner-left\">","<table id=\"TF-1\" class=\"table-form\">","<tr>","<td width=\"130\" class=\"label-rt\" style=\"padding-bottom:4px;\">","<label class=\"label-caps\">age","</label>","</td>","<td style=\"vertical-align: middle;\" id=\"age-selection\">","<input style=\"vertical-align: middle; height: 19px;\" id=\"age13\" type=\"checkbox\" name=\"age\"/>","<label style=\"vertical-align: middle; height: 19px; padding-top: 0px;\" >&nbsp;&nbsp;I am 13 years or older</label>","</td>","<td id=\"age-selection-validation\"></td>","</tr>","<tr style=\"padding-top: 15px;\">","<td class=\"label-rt\">","<label class=\"label-caps\">screen name","</label>","</td>","<td>","<input id=\"screenname\" type=\"text\" size=\"32\" class=\"input-text input-text-border\"/>","</td>","<td id=\"screenname-validation\"></td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">email","</label>","</td>","<td>","<input id=\"email1\" type=\"text\" size=\"32\" class=\"input-text input-text-border\"/>","</td>","<td id=\"email1-validation\">","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">email confirm","</label>","</td>","<td>","<input id=\"email2\" type=\"text\" size=\"32\" class=\"input-text input-text-border\"/>","</td>","<td id=\"email2-validation\">","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">password","</label>","</td>","<td>","<input id=\"password1\" type=\"password\" size=\"32\" class=\"input-text input-text-border\"/>","</td>","<td id=\"password1-validation\">","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">password confirm","</label>","</td>","<td>","<input id=\"password2\" type=\"password\" size=\"32\" class=\"input-text input-text-border\"/>","</td>","<td id=\"password2-validation\">","</td>","</tr>","</table>","</div>","<div class=\"ac-dialog-content-inner-right\">","<div class=\"ac-scroll-box\">","<strong>TERMS AND CONDITIONS</strong><br/>","<div id=\"terms-and-conditions\"></div>","</div>","<br/>","<label id=\"i-have-read-validation\" style=\"padding-top: 2px; margin:10px 0px 0px 10px!important;\" class=\"input-text-border\">","<input id=\"i-have-read\" class=\"input-checkbox\" type=\"checkbox\" />I have read and agree to the Terms and Conditions","</label>","</div>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _4=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"title-dialog-ltGrey-lg\">shipping info","</div>","<div id=\"panel2error\" class=\"title-dialog-validation-error-msg\">","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-grey\"></div>","<div class=\"dot-green\"></div>","<div class=\"dot-grey\"></div>","</div>","<div class=\"ac-dialog-content\">","<table id=\"TF-2\" class=\"table-form\">","<tr>","<td class=\"label-rt\" width=\"180\">","<label class=\"label-caps\">first name","</label>","</td>","<td>","<input id=\"firstname\" type=\"text\" size=\"25\" class=\"input-text input-text-border\"/>&nbsp;&nbsp;&nbsp;","<label class=\"label-caps\">last name","</label>&nbsp;&nbsp;","<input id=\"lastname\" type=\"text\" size=\"20\" class=\"input-text input-text-border\"/>","</td>","<td></td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">address","</label>","</td>","<td>","<input id=\"address1\" type=\"text\" size=\"70\" class=\"input-text input-text-border\"/>","</td>","<td>","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">suite/apartment","</label>","</td>","<td>","<input id=\"address2\" type=\"text\" size=\"25\" class=\"input-text input-text-border\"/>","</td>","<td>","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">city","</label>","</td>","<td>","<input id=\"city\" type=\"text\" size=\"20\" class=\"input-text input-text-border\"/>&nbsp;&nbsp;","<label class=\"label-caps\">state","</label>&nbsp;&nbsp;","<select id=\"state\" class=\"input-text-border\">","<option selected></option>","<option value=\"AK\">AK</option>","<option value=\"AL\">AL</option>","<option value=\"AR\">AR</option>","<option value=\"AZ\">AZ</option>","<option value=\"CA\">CA</option>","<option value=\"CO\">CO</option>","<option value=\"CT\">CT</option>","<option value=\"DC\">DC</option>","<option value=\"DE\">DE</option>","<option value=\"FL\">FL</option>","<option value=\"FM\">FM</option>","<option value=\"GA\">GA</option>","<option value=\"GU\">GU</option>","<option value=\"HI\">HI</option>","<option value=\"IA\">IA</option>","<option value=\"ID\">ID</option>","<option value=\"IL\">IL</option>","<option value=\"IN\">IN</option>","<option value=\"KS\">KS</option>","<option value=\"KY\">KY</option>","<option value=\"LA\">LA</option>","<option value=\"MA\">MA</option>","<option value=\"MD\">MD</option>","<option value=\"ME\">ME</option>","<option value=\"MH\">MH</option>","<option value=\"MI\">MI</option>","<option value=\"MN\">MN</option>","<option value=\"MO\">MO</option>","<option value=\"MP\">MP</option>","<option value=\"MS\">MS</option>","<option value=\"MT\">MT</option>","<option value=\"NC\">NC</option>","<option value=\"ND\">ND</option>","<option value=\"NE\">NE</option>","<option value=\"NH\">NH</option>","<option value=\"NJ\">NJ</option>","<option value=\"NM\">NM</option>","<option value=\"NV\">NV</option>","<option value=\"NY\">NY</option>","<option value=\"OH\">OH</option>","<option value=\"OK\">OK</option>","<option value=\"OR\">OR</option>","<option value=\"PA\">PA</option>","<option value=\"PR\">PR</option>","<option value=\"PW\">PW</option>","<option value=\"RI\">RI</option>","<option value=\"SC\">SC</option>","<option value=\"SD\">SD</option>","<option value=\"TN\">TN</option>","<option value=\"TX\">TX</option>","<option value=\"UT\">UT</option>","<option value=\"VA\">VA</option>","<option value=\"VI\">VI</option>","<option value=\"VT\">VT</option>","<option value=\"WA\">WA</option>","<option value=\"WI\">WI</option>","<option value=\"WV\">WV</option>","<option value=\"WY\">WY</option>","</select>&nbsp;&nbsp;","<label class=\"label-caps\">zip","</label>&nbsp;&nbsp;","<input id=\"zip\" type=\"text\" size=\"12\" class=\"input-text input-text-border\"/>&nbsp;","</td>","<td>","</td>","</tr>","<tr>","<td class=\"label-rt\">","<label class=\"label-caps\">country","</label>","</td>","<td>","<select id=\"country\">","<option value=\"USA\">USA</option>","</select>","</td>","<td>","</td>","</tr>","<tr style=\"margin-top: 20px;\">","<td></td>","<td><img src=\""+SwitchGames.imageUrl+"account_creation/ac-step2-note.gif\" width=\"386\" height=\"49\" alt=\"Note: This information is NOT shared with any other member unless you complete a transaction with them.\"/></td>","</tr>","</table>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _5=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"title-dialog-ltGrey-lg\">your gamer profile","</div>","<div id=\"panel3error\" class=\"title-dialog-validation-error-msg\">","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-grey\"></div>","<div class=\"dot-grey\"></div>","<div class=\"dot-green\"></div>","</div>","<div class=\"ac-dialog-content\">","<div class=\"ac-dialog-content-inner-3col-left\" style=\"position: relative;\">","<table id=\"TF-3\" class=\"table-form\" style=\"position: relative;\">","<tr>","<td>","<label class=\"label-above\">Best game of all time is:</label>","<input id=\"bestgame\" type=\"text\" size=\"25\" class=\"input-text input-text-border\" />","<input id=\"bestgameid\" type=\"hidden\"/>","</td>","</tr>","<tr>","<td>","<label class=\"label-above\">I am currently playing a lot of:</label>","<div style=\"overflow: hidden;\">","<input id=\"playingalot\" type=\"text\" size=\"25\" class=\"input-text input-text-border\"/>","</div>","<input id=\"playingalotid\" type=\"hidden\"/>","</td>","</tr>","<tr>","<td>","<label class=\"label-above\">What I like:</label><br/>","<select id=\"genre1\" class=\"select-lg input-text-border\">","<option>#1 favorite game genre</option>","</select>","</td>","</tr>","<tr>","<td>","<select id=\"genre2\" class=\"select-lg input-text-border\">","<option>#2 favorite game genre</option>","</select>","</td>","</tr>","<tr>","<td>","<select id=\"genre3\" class=\"select-lg input-text-border\">","<option>#3 favorite game genre</option>","</select>","</td>","</tr>","</table>","</div>","<div class=\"ac-dialog-content-inner-3col-middle\">Systems I own:","<div id=\"systems-validation\" class=\"rb-box-wh input-text-border\">","<div class=\"rb-box-wh-top\">","<div>","</div>","</div>","<div class=\"rb-box-wh-content\" style=\"overflow-y:auto; height:227px;\">","<table id=\"systems\" class=\"table-system\">","</table>","</div>","<div class=\"rb-box-wh-bottom\">","<div>","</div>","</div>","</div>","</div>","<div class=\"ac-dialog-content-inner-3col-right\" style=\"position: relative;\">","<div style=\"float:left;width:32px;\">","<img src=\"images/community_gamer_profile/avatar-number1.gif\" style=\"float:left;\"/>","<img src=\"images/community_gamer_profile/avatar-number2.gif\" style=\"float:left;margin-top:32px;\"/>","</div>","<div style=\"position: relative;float:left; height: 100%;\">","<div style=\"color: #ffffff;\">Choose avatar: <span class=\"ac-image-helpText\"> (256k size limit)</span></div>","<form style=\"height: 0px;\" id=\"ac-file-upload-form\" method=\"post\" enctype=\"multipart/form-data\" action=\"data/account/avatar_upload.php\">","<input name=\"MAX_FILE_SIZE\" type=\"hidden\" value=\"256000\" />","<input id=\"ac-avatar-browse\" name=\"avatar_file\" type=\"file\" style=\"filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); cursor: pointer; position: absolute; top: 20px; left: 30px; padding:3px; opacity: 0; z-index: 2;\"/>","<input id=\"ac-last-avatar-file\" name=\"ac_last_avatar_file\" type=\"hidden\" value=\"\"/>","</form>","<input id=\"ac-avatar-filename\" type=\"text\" size=\"20\" class=\"input-text\" style=\"position: absolute; top: 19px; left: 0px; height: 18px; width: 150px; padding:3px; z-index: 2;\"/>","<span id=\"ac-fake-browse-button\" class=\"ac-btn-browse\" style=\"position: absolute; top: 19px; left:155px; height: 18px; width: 70px; padding:3px; \"></span>","<div id=\"ac-avatar-upload-btn\" name=\"avatar-upload-btn\" style=\"margin-top: 40px; cursor: pointer;\" class=\"ac-btn-upload\"></div>","<iframe id=\"ac-upload-target\" name=\"ac-upload-target\" src=\"\" style=\"display: none;width:0;height:0;border:0px solid #fff;\"></iframe>","<div class=\"com-avatar-container\">","<div id=\"ac-image-panel\" style=\"width: 110px; height: 110px;\" class=\"ac-image-container\">","</div>\t","<div style=\"color: #ffffff;\" class=\"ac-image-controls\">ZOOM","<span style=\"cursor: pointer;\" id=\"ac-zoom-in\" name=\"ac-zoom-in\" class=\"ac-btn-zoom-in\"></span>","<span style=\"cursor: pointer;\" id=\"ac-zoom-out\" name=\"ac-zoom-out\" class=\"ac-btn-zoom-out\"></span>","</div>","<div class=\"ac-image-helpText\">(click & drag image to move)</div>","</div>","</div>","</div>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _6=["<div style=\"height:320px;\">","<div id=\"congratulations\" class=\"ac-success-line1\"></div>","<div class=\"ac-success-line2\">Welcome to SwitchGames: The Gamers Marketplace<sup style=\"font-size:9px;\">SM</sup></div>","<img id=\"lets-get-started-btn\" style=\"cursor: pointer;\" src=\""+SwitchGames.imageUrl+"common/buttons/btn-get-started-signup-panel.png\" width=\"283\" height=\"32\" alt=\"get started\" class=\"ac-btn-get-started\">","<div style=\"text-align: center; font: normal normal normal 16px Arial, Verdana, Helvetica, Geneva, sans-serif; padding-top: 20px;\">","<span onclick=\"window.location.href='index.php';\" onmouseover=\"this.style.color = '#5eaa3c';\" onmouseout=\"this.style.color = '#ffffff';\" style=\"cursor: pointer; color: #ffffff; padding-top: 15px;\">","<u>No thanks, take me to the homepage</u>","</span>","</div>","</div>"];
var _7=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"ms-title-dialog-ltGrey-lg dialog-title-getstarted \">add an item you <span class=\"text-white\">own</span>","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-green\"></div>","<div class=\"dot-grey\"></div>","<div class=\"dot-grey\"></div>","</div>","<div class=\"sub-title-dialog-white clear\">&nbsp;","</div>","<div class=\"ac-dialog-content\" style=\"width: 765px; height: 260px;\">","<div style=\"width: 765px; height: 260px;\">","<div id=\"sg-ms-choseImageContainer\" class=\"new-signup-ms-panel-image-container\">","<img id=\"sg-ms-choseImage\" class=\"ms-panel-image\" src=\""+SwitchGames.imageUrl+"common/buttons/setup-wizard-search-instructions.png\" />","</div>","<div class=\"ms-panel-game-info\">","Item Type: ","<select style=\"width: 160px\" id=\"ms-item-type\">","<option value=\"all\" selected=\"selected\">All</option>","<option value=\"game\">Game</option>","<option value=\"platform\">Console</option>","<option value=\"accessory\">Accessory</option>","</select>","<div class=\"ms-panel-blank-line-5\"></div>","<input type=\"hidden\" name=\"item_type\" id=\"sg-ms-search-item_type\" />","<input type=\"hidden\" name=\"item_id\" id=\"sg-ms-search-item_id\" />","<div class=\"sg-ie-field-fix\" style=\"position: static; zoom: 1; clear: both;\">","<input type=\"text\" name=\"sg-ms-query\" id=\"sg-ms-search-query-id\" />","</div>","<div id=\"sg-ms-choseTextRegion-id\" class=\"hide\" >","<div class=\"ms-panel-blank-line-5\"></div>","<div id=\"sg-ms-chose-title\" class=\"ms-panel-game-title\"></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div id=\"sg-ms-chose-platform\" class=\"ms-panel-game-platform\"></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-ms-chose-publisher\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-ms-chose-esbr\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-ms-chose-released\"></div>","</div>","</div>","</div>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _8=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"ms-title-dialog-ltGrey-lg dialog-title-getstarted \">add an item you <span class=\"text-white\">own</span>","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-grey\"></div>","<div class=\"dot-green\"></div>","<div class=\"dot-grey\"></div>","</div>","<div class=\"ac-dialog-content\">","<div>","<div id=\"sg-ms-choseImageContainer2\" class=\"new-signup-ms-panel-image-container hide\">","<img id=\"sg-ms-choseImage2\" class=\"ms-panel-image\" />","</div>","<div class=\"ms-panel-fields\" id=\"ms-panel-fields\">","<div>","<div style=\"float: left; font-size: 16px; width: 270px;\">","<div><input id=\"sg-ms-ListItemForTrade-id\" name=\"sg-ms-ListItemForTrade-id\" type=\"checkbox\" /><b>&nbsp;List this item for <span class=\"ms-panel-text-trade\">TRADE</span></b></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div id=\"safeTradeDiv\" style=\"font-size: 12px; display: none;\"><input id=\"sg-ms-RequireSafeTrade-id\" type=\"checkbox\" />&nbsp;Require <img src=\""+SwitchGames.imageUrl+"trade_tools/safetrade_logo_mystuff.png\" ext:qtip=\"SafeTrade guarantees full coverage in the event your game is lost or stolen in a trade.  $5.95 fee (only paid if your offer is accepted) includes a pre-paid USPS shipping label with free online package tracking.\" /> guarantee<br/><span style=\"font-size: 10px; margin-left: 16px;\">Both members pay <b>$5.95</b> fee (includes all postage)</span></div>","</div>","<div style=\"float: left; font-size: 16px;\">","<div id=\"forSaleDiv\" style=\"color: #777777;\"><input id=\"sg-ms-ListItemForSale-id\" name=\"sg-ms-ListItemForSale-id\" type=\"checkbox\" DISABLED /><b>&nbsp;List this item for <span class=\"ms-panel-text-trade\">SALE</span></b></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div id=\"sg-ms-SafeSale\" style=\"font-size: 12px;\">(You can list this game for sale after signup)</div>","</div>","</div>","<div class=\"ms-panel-controls\" id=\"ms-panel-controls\" style=\"margin-top: 65px;\">","<div class=\"ms-rb-lt-grey-wrapper\">","<div class=\"ms-rb-lt-grey-top\"><div></div></div>","<div class=\"ms-rb-lt-grey-body\">","<span class=\"ms-panel-field-label\">Overall Condition:</span>&nbsp;&nbsp;","<input id=\"sg-ms-condition-perfect\" type=\"radio\" name=\"condition\" value=\"1\"><span class=\"ms-panel-field-label\">Perfect</span>","<input id=\"sg-ms-condition-verygood\" type=\"radio\" name=\"condition\" value=\"2\"><span class=\"ms-panel-field-label\">Very Good</span>","<input id=\"sg-ms-condition-good\" type=\"radio\" name=\"condition\" value=\"3\"><span class=\"ms-panel-field-label\">Good</span>","<input id=\"sg-ms-condition-bad\" type=\"radio\" name=\"condition\" value=\"4\"><span class=\"ms-panel-field-label\">Bad</span>","<div class=\"ms-panel-blank-line-15\"></div>","<input id=\"sg-ms-opened\" type=\"checkbox\"><span class=\"ms-panel-field-label\">Opened</span>","<input id=\"sg-ms-original-packaging\" type=\"checkbox\"><span class=\"ms-panel-field-label\">Original Packaging (including manual)</span>","<input id=\"sg-ms-has-scratches\" type=\"checkbox\"><span class=\"ms-panel-field-label\">Scratches Present</span>","<div class=\"ms-panel-blank-line-15\"></div>","<span class=\"ms-panel-field-label\" style=\"padding-bottom: 0px;\">Comments (max 130 characters)</span>","<textarea wrap=\"virtual\" id=\"ms-item-comment\" maxlength=\"130\" onkeydown='return SwitchGames.Utility.limitTextFieldLength(event);' class=\"ms-item-comment\"></textarea>","</div>","<div class=\"ms-rb-lt-grey-btm\"><div></div></div>","</div>","</div>","</div>","</div>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _9=["<div class=\"rb-box-dg\">","<div class=\"rb-box-dg-top\">","<div>","</div>","</div>","<div class=\"rb-box-dg-content\" style=\"height:320px;\">","<div class=\"wl-title-dialog-ltGrey-lg dialog-title-getstarted \">list an item you <span class=\"text-white\">want</span>","</div>","<div class=\"ac-dialog-stepMarker\">","<div class=\"dot-grey\"></div>","<div class=\"dot-grey\"></div>","<div class=\"dot-green\"></div>","</div>","<div class=\"ac-dialog-content\">","<div id=\"sg-wl-choseImageContainer\" style=\"padding-left: 30px; padding-top: 30px;\" class=\"new-signup-ms-panel-image-container\">","<img id=\"sg-wl-choseImage\" class=\"ms-panel-image\" src=\""+SwitchGames.imageUrl+"common/buttons/setup-wizard-search-instructions.png\" />","</div>","<div class=\"ms-panel-fields\">","<div style=\"width: 400px; padding-top: 30px; padding-left: 20px; float: left;\">","Item Type: ","<select style=\"width: 160px\" id=\"wl-item-type\">","<option value=\"all\" selected=\"selected\">All</option>","<option value=\"game\">Game</option>","<option value=\"platform\">Console</option>","<option value=\"accessory\">Accessory</option>","</select>","<div class=\"ms-panel-blank-line-5\"></div>","<input type=\"hidden\" name=\"item_type\" id=\"sg-wl-search-item_type\" />","<input type=\"hidden\" name=\"item_id\" id=\"sg-wl-search-item_id\" />","<div class=\"sg-ie-field-fix\" style=\"position: static; zoom: 1; clear: both;\">","<input type=\"text\" name=\"sg-ms-query\" id=\"sg-wl-search-query-id\" />","</div>","<div id=\"sg-wl-choseTextRegion-id\" class=\"ms-panel-text-fields hide\" >","<div class=\"ms-panel-blank-line-5\"></div>","<div class=\"ms-panel-game-title\" id=\"sg-wl-chose-title\"></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div class=\"ms-panel-game-platform\" id=\"sg-wl-chose-platform\"></div>","<div class=\"ms-panel-blank-line-5\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-wl-chose-publisher\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-wl-chose-esbr\"></div>","<div class=\"ms-panel-game-other\" id=\"sg-wl-chose-released\"></div>","</div>","</div>","</div>","</div>","</div>","<div class=\"rb-box-dg-bottom\">","<div>","</div>","</div>","</div>"];
var _a=["<div style=\"height:320px;\">","<div class=\"ac-success-line1\">You have now listed an item you <span class=\"text-white\">want</span><br/>and an item you <span class=\"text-white\">own</span>!</div>","<img onclick=\"window.location.href = 'trade_tools.php';\" src=\""+SwitchGames.imageUrl+"common/buttons/btn-get-trading-big.png\" width=\"300\" height=\"47\" alt=\"Go to trade tools\" class=\"ac-btn-goto-switch-center\">","</div>"];
var _b="NEXT";
var _c=["<div name=\"panel-scroller-root\" class=\"ac-dialog-body\" style=\"position: relative; height: 357px;\">","<div class=\"ac-dialog-body-left-col\" style=\"\">","<div id=\"left-scroller-container\" name=\"panel-scroller-left-arrow\" style=\"position: relative; top: 130px; left: 0px;\">","<div id=\"left-scroller-btn\" class=\"left-scroller-btn-enable\"></div><span style=\"position: relative; top: 5px; left: 10px;\">PREV</span>","</div>","</div>","<div class=\"ac-dialog-body-center-col\" style=\" \">","<div name=\"panel-scroller-content-root\" totalpanels=\"8\" currentpanel=\"0\" class=\"panelcontrol\">","<div name=\"panel-scroller-content\">"+_3.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_4.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_5.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_6.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_7.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_8.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_9.join("")+"</div>","<div name=\"panel-scroller-content\" style=\"display:none\">"+_a.join("")+"</div>","</div>","</div>","<div  class=\"ac-dialog-body-right-col\" style=\"\">","<div id=\"right-scroller-container\" name=\"panel-scroller-right-arrow\" style=\"position: relative; top: 130px; left: 15px;\">","<div id=\"right-scroller-btn\" class=\"right-scroller-btn-disable\"></div><span style=\"position: relative; top: 5px; left: 10px;\">"+_b+"</span>","</div>","</div>","</div>"];
SwitchGames.Account.screenNameTimer=null;
SwitchGames.Account.email1Timer=null;
SwitchGames.Account.email2Timer=null;
SwitchGames.Account.password1Timer=null;
SwitchGames.Account.password2Timer=null;
SwitchGames.Account.firstNameTimer=null;
SwitchGames.Account.lastNameTimer=null;
SwitchGames.Account.address1Timer=null;
SwitchGames.Account.cityTimer=null;
SwitchGames.Account.zipTimer=null;
SwitchGames.Account.screenNameTransactionId=null;
SwitchGames.Account.email1TransactionId=null;
SwitchGames.Account.systemList=[];
SwitchGames.Account.screen1EntryAttempt={screenName:false,email1:false,email2:false,password1:false,password2:false,age:true,terms:false};
SwitchGames.Account.screen2EntryAttempt={firstName:false,lastName:false,address1:false,city:false,state:false,zip:false};
SwitchGames.Account.screen3EntryAttempt={genre1:false,genre2:false,genre3:false,bestgame:false,playingalot:false,systems:false};
SwitchGames.Account.screen1ValidationMessages={screenName:"Screen name is required",email1:"Email is required",email2:"Email confirmation is required",password1:"Password is required",password2:"Password confirmation is required",age:"You must select your age",terms:"You must acknowledge the terms and conditions"};
SwitchGames.Account.screen2ValidationMessages={firstName:"First name is required",lastName:"Last name is required",address1:"Address line 1 is required",city:"City is required",state:"State is required",zip:"Zip code is required"};
SwitchGames.Account.screen3ValidationMessages={genre1:"You must select favorite genres",genre2:"You must select favorite genres",genre3:"You must select favorite genres",bestgame:"You must select the best game of all time",playingalot:"You must select the game you have been playing a lot of",systems:"You must select at least 1 system you own"};
SwitchGames.Account.screen1ValidationParams={screenName:false,email1:false,email2:false,password1:false,password2:false,age:false,terms:false};
SwitchGames.Account.screen2ValidationParams={firstName:false,lastName:false,address1:false,city:false,state:false,zip:false};
SwitchGames.Account.screen3ValidationParams={genre1:false,genre2:false,genre3:false,bestgame:false,playingalot:false,systems:false};
SwitchGames.Account.addValidationInfo=function(el,_e,_f){
var _10=Ext.get(el);
_10.dom.setAttribute("ext:qtip",_f);
_10.addClass(_e);
};
SwitchGames.Account.removeValidationInfo=function(el,_12){
var _13=Ext.get(el);
_13.dom.setAttribute("ext:qtip","");
_13.removeClass(_12);
};
SwitchGames.Account.validatePanel1=function(){
var sp=SwitchGames.Account.screen1ValidationParams;
var ea=SwitchGames.Account.screen1EntryAttempt;
var _16=Ext.get("panel1error");
_16.removeClass("validation-failure-icon");
_16.dom.innerHTML="";
if(sp.screenName){
Ext.fly("screenname").removeClass("validation-failure");
}
if(sp.email1){
Ext.fly("email1").removeClass("validation-failure");
}
if(sp.email2){
Ext.fly("email2").removeClass("validation-failure");
}
if(sp.password1){
Ext.fly("password1").removeClass("validation-failure");
}
if(sp.password2){
Ext.fly("password2").removeClass("validation-failure");
}
if(sp.age){
Ext.fly("age-selection").removeClass("validation-failure");
}
if(sp.terms){
Ext.fly("i-have-read-validation").removeClass("validation-failure");
}
if(sp.screenName&&sp.email1&&sp.email2&&sp.password1&&sp.password2&&sp.age&&sp.terms){
_16.removeClass("validation-failure-icon");
_16.dom.innerHTML="";
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-disable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-enable");
}else{
if(!sp.screenName&&ea.screenName){
_16.addClass("validation-failure-icon");
Ext.fly("screenname").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.screenName;
}else{
if(!sp.email1&&ea.email1){
_16.addClass("validation-failure-icon");
Ext.fly("email1").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.email1;
}else{
if(!sp.email2&&ea.email2){
_16.addClass("validation-failure-icon");
Ext.fly("email2").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.email2;
}else{
if(!sp.password1&&ea.password1){
_16.addClass("validation-failure-icon");
Ext.fly("password1").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.password1;
}else{
if(!sp.password2&&ea.password2){
_16.addClass("validation-failure-icon");
Ext.fly("password2").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.password2;
}else{
if(!sp.age&&ea.age){
_16.addClass("validation-failure-icon");
Ext.fly("age-selection").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.age;
}else{
if(!sp.terms&&ea.terms){
_16.addClass("validation-failure-icon");
Ext.fly("i-have-read-validation").addClass("validation-failure");
_16.dom.innerHTML=SwitchGames.Account.screen1ValidationMessages.terms;
}
}
}
}
}
}
}
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
}
};
SwitchGames.Account.validatePanel2=function(){
var sp=SwitchGames.Account.screen2ValidationParams;
var ea=SwitchGames.Account.screen2EntryAttempt;
var _19=Ext.get("panel2error");
_19.removeClass("validation-failure-icon");
_19.dom.innerHTML="";
if(sp.firstName){
Ext.fly("firstname").removeClass("validation-failure");
}
if(sp.lastName){
Ext.fly("lastname").removeClass("validation-failure");
}
if(sp.address1){
Ext.fly("address1").removeClass("validation-failure");
}
if(sp.city){
Ext.fly("city").removeClass("validation-failure");
}
if(sp.state){
Ext.fly("state").removeClass("validation-failure");
}
if(sp.zip){
Ext.fly("zip").removeClass("validation-failure");
}
if(sp.firstName&&sp.lastName&&sp.address1&&sp.city&&sp.state&&sp.zip){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-disable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-enable");
}else{
if(!sp.firstName&&ea.firstName){
_19.addClass("validation-failure-icon");
Ext.fly("firstname").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.firstName;
}else{
if(!sp.lastName&&ea.lastName){
_19.addClass("validation-failure-icon");
Ext.fly("lastname").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.lastName;
}else{
if(!sp.address1&&ea.address1){
_19.addClass("validation-failure-icon");
Ext.fly("address1").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.address1;
}else{
if(!sp.city&&ea.city){
_19.addClass("validation-failure-icon");
Ext.fly("city").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.city;
}else{
if(!sp.state&&ea.state){
_19.addClass("validation-failure-icon");
Ext.fly("state").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.state;
}else{
if(!sp.zip&&ea.zip){
_19.addClass("validation-failure-icon");
Ext.fly("zip").addClass("validation-failure");
_19.dom.innerHTML=SwitchGames.Account.screen2ValidationMessages.zip;
}
}
}
}
}
}
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
}
};
SwitchGames.Account.validatePanel3=function(){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-disable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-enable");
};
SwitchGames.Account.accountSetupDialog.body.dom.innerHTML=_c.join("");
SwitchGames.Account.accountSetupDialog.show();
var i=document.createElement("img");
i.src=Ext.BLANK_IMAGE_URL;
SwitchGames.Account.imagePanel=new Ext.ux.PanPanel({frame:false,renderTo:"ac-image-panel",border:false,client:i,height:110,width:110,style:{padding:"0px"},bodyStyle:{padding:"0px"},shadow:false});
SwitchGames.Account.imagePanel.show();
SwitchGames.Account.termsValidation=function(e,t){
SwitchGames.Account.screen1ValidationParams.terms=t.checked;
SwitchGames.Account.screen1EntryAttempt.terms=true;
if(t.checked){
SwitchGames.Account.screen1ValidationMessages.terms="";
}else{
SwitchGames.Account.screen1ValidationMessages.terms="You must agree with the SwitchGames terms and conditions";
}
SwitchGames.Account.validatePanel1();
};
SwitchGames.Account.ageCheckboxValidation=function(e,t){
SwitchGames.Account.screen1EntryAttempt.age=true;
SwitchGames.Account.screen1ValidationParams.age=t.checked;
SwitchGames.Account.screen1ValidationMessages.age="";
SwitchGames.Account.validatePanel1();
};
SwitchGames.Account.email2Validation=function(){
SwitchGames.Account.screen1EntryAttempt.email2=true;
var _1f=Ext.get("email1");
var _20=_1f.getValue();
var _21=Ext.get("email2");
var _22=_21.getValue();
if(_22.length==0){
SwitchGames.Account.screen1ValidationParams.email2=false;
SwitchGames.Account.screen1ValidationMessages.email2="Confirmation email address is required";
}else{
if(_20!=_22){
SwitchGames.Account.screen1ValidationParams.email2=false;
SwitchGames.Account.screen1ValidationMessages.email2="Confirmation email address does not match primary email address";
}else{
SwitchGames.Account.screen1ValidationParams.email2=true;
SwitchGames.Account.screen1ValidationMessages.email2="";
}
}
SwitchGames.Account.validatePanel1();
};
SwitchGames.Account.password1Validation=function(){
var _23=Ext.get("password1");
var _24=_23.getValue();
if(_24.length<8){
SwitchGames.Account.screen1ValidationParams.password1=false;
SwitchGames.Account.screen1ValidationMessages.password1="Password minimum length is 8 characters";
}else{
SwitchGames.Account.screen1ValidationParams.password1=true;
SwitchGames.Account.screen1ValidationMessages.password1="";
}
SwitchGames.Account.validatePanel1();
};
SwitchGames.Account.password2Validation=function(){
SwitchGames.Account.screen1EntryAttempt.password2=true;
var _25=Ext.get("password1");
var _26=_25.getValue();
var _27=Ext.get("password2");
var _28=_27.getValue();
if(_28.length<8){
SwitchGames.Account.screen1ValidationParams.password2=false;
SwitchGames.Account.screen1ValidationMessages.password2="Passwords do not match";
}else{
if(_26!=_28){
SwitchGames.Account.screen1ValidationParams.password2=false;
SwitchGames.Account.screen1ValidationMessages.password2="Passwords do not match";
}else{
SwitchGames.Account.screen1ValidationParams.password2=true;
SwitchGames.Account.screen1ValidationMessages.password2="";
}
}
SwitchGames.Account.validatePanel1();
};
SwitchGames.Account.simpleFieldValidation=function(t,_2a,_2b){
var _2c=Ext.fly(t);
var _2d=_2c.getValue();
var _2e="screen"+_2a+"ValidationParams";
var _2f="screen"+_2a+"ValidationMessages";
var _30="screen"+_2a+"EntryAttempt";
if(_2d.length==0){
SwitchGames.Account[_30][_2b]=true;
SwitchGames.Account[_2e][_2b]=false;
}else{
SwitchGames.Account[_30][_2b]=true;
SwitchGames.Account[_2e][_2b]=true;
}
SwitchGames.Account["validatePanel"+_2a]();
};
SwitchGames.Account.selectFieldValidation=function(t,_32,_33){
var _34="screen"+_32+"ValidationParams";
var _35="screen"+_32+"ValidationMessages";
var _36="screen"+_32+"EntryAttempt";
var _37=Ext.get(t);
var _38=_37.dom.options[_37.dom.selectedIndex].text;
if(_38.length==0){
SwitchGames.Account[_36][_33]=true;
SwitchGames.Account[_34][_33]=false;
}else{
SwitchGames.Account[_36][_33]=true;
SwitchGames.Account[_34][_33]=true;
}
SwitchGames.Account["validatePanel"+_32]();
};
SwitchGames.Account.screenNameValidation=function(id){
var _3a=Ext.get(id);
var _3b=_3a.getValue();
if(_3b.length<3){
SwitchGames.Account.screen1ValidationParams.screenName=false;
SwitchGames.Account.screen1ValidationMessages.screenName="Minimum screen name is 3 characters";
SwitchGames.Account.validatePanel1();
return;
}else{
if(_3b.length>11){
SwitchGames.Account.screen1ValidationParams.screenName=false;
SwitchGames.Account.screen1ValidationMessages.screenName="Maximum screen name is 11 characters";
SwitchGames.Account.validatePanel1();
return;
}
}
SwitchGames.Account.screenNameTransactionId=Ext.Ajax.request({url:"data/account/accounts_data.php",params:{action:"countByTF",rettype:"json",t:"m",f:"sn",v:_3a.getValue()},success:function(_3c,_3d){
SwitchGames.Account.screenNameTransactionId=null;
var _3e=Ext.util.JSON.decode(_3c.responseText);
if(_3e.error!=undefined){
SwitchGames.Account.screen1ValidationParams.screenName=false;
SwitchGames.Account.screen1ValidationMessages.screenName="Screen name is required";
SwitchGames.Account.validatePanel1();
SwitchGames.Dialogs.showErrorDialog(_3e.error);
}else{
if(_3e.cnt==0){
SwitchGames.Account.screen1ValidationMessages.screenName="";
SwitchGames.Account.screen1ValidationParams.screenName=true;
}else{
SwitchGames.Account.screen1ValidationMessages.screenName="Screen name is taken";
SwitchGames.Account.screen1ValidationParams.screenName=false;
}
SwitchGames.Account.validatePanel1();
}
},failure:function(_3f,_40){
SwitchGames.Account.screenNameTransactionId=null;
SwitchGames.Account.screen1ValidationParams.screenName=false;
SwitchGames.Account.screen1ValidationMessages.screenName="Screen name is required";
SwitchGames.Account.validatePanel1();
SwitchGames.Dialogs.showErrorDialog(_3f);
}});
};
SwitchGames.Account.email1Validation=function(id){
var _42=Ext.get(id);
var _43=_42.getValue();
if(!Ext.form.VTypes.email(_43)){
SwitchGames.Account.screen1ValidationParams.email1=false;
SwitchGames.Account.screen1ValidationMessages.email1="Invalid email address";
SwitchGames.Account.validatePanel1();
return;
}
Ext.Ajax.request({url:"data/account/accounts_data.php",params:{action:"countByTF",rettype:"json",t:"m",f:"em",v:_42.getValue()},success:function(_44,_45){
SwitchGames.Account.email1TransactionId=null;
var _46=Ext.util.JSON.decode(_44.responseText);
if(_46.error!=undefined){
SwitchGames.Account.screen1ValidationParams.email1=false;
SwitchGames.Account.screen1ValidationMessages.email1="Email address was not able to be validated by the server";
SwitchGames.Account.validatePanel1();
SwitchGames.Dialogs.showErrorDialog(_46.error);
}else{
if(_46.cnt==0){
SwitchGames.Account.screen1ValidationMessages.email1="";
SwitchGames.Account.screen1ValidationParams.email1=true;
}else{
SwitchGames.Account.screen1ValidationMessages.email1="Email address already in use";
SwitchGames.Account.screen1ValidationParams.email1=false;
}
SwitchGames.Account.validatePanel1();
}
},failure:function(_47,_48){
SwitchGames.Account.email1TransactionId=null;
SwitchGames.Account.screen1ValidationParams.email1=false;
SwitchGames.Account.screen1ValidationMessages.email1="Email address required";
SwitchGames.Account.validatePanel1();
SwitchGames.Dialogs.showErrorDialog(_47);
}});
};
SwitchGames.Account.genre1Validation=function(){
var _49=Ext.get("genre1");
var _4a=_49.dom.options[_49.dom.selectedIndex].text;
if(_4a.match("#1")){
SwitchGames.Account.screen3ValidationMessages.genre1="You must select a genre";
SwitchGames.Account.screen3ValidationParams.genre1=false;
}else{
SwitchGames.Account.screen3ValidationMessages.genre1="";
SwitchGames.Account.screen3ValidationParams.genre1=true;
}
};
SwitchGames.Account.genre2Validation=function(){
var _4b=Ext.get("genre2");
var _4c=_4b.dom.options[_4b.dom.selectedIndex].text;
if(_4c.match("#2")){
SwitchGames.Account.screen3ValidationMessages.genre2="You must select a genre";
SwitchGames.Account.screen3ValidationParams.genre2=false;
}else{
SwitchGames.Account.screen3ValidationMessages.genre2="";
SwitchGames.Account.screen3ValidationParams.genre2=true;
}
};
SwitchGames.Account.genre3Validation=function(){
var _4d=Ext.get("genre3");
var _4e=_4d.dom.options[_4d.dom.selectedIndex].text;
if(_4e.match("#3")){
SwitchGames.Account.screen3ValidationMessages.genre3="You must select a genre";
SwitchGames.Account.screen3ValidationParams.genre3=false;
}else{
SwitchGames.Account.screen3ValidationMessages.genre3="";
SwitchGames.Account.screen3ValidationParams.genre3=true;
}
};
SwitchGames.Account.genreValidation=function(_4f){
var _50=Ext.get("genre1");
var _51=Ext.get("genre2");
var _52=Ext.get("genre3");
var _53=_50.dom.options[_50.dom.selectedIndex].text;
var _54=_51.dom.options[_51.dom.selectedIndex].text;
var _55=_52.dom.options[_52.dom.selectedIndex].text;
this.genre1Validation();
this.genre2Validation();
this.genre3Validation();
if(_53==_54){
SwitchGames.Account.screen3ValidationMessages.genre1="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre1=false;
SwitchGames.Account.screen3ValidationMessages.genre2="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre2=false;
}
if(_54==_55){
SwitchGames.Account.screen3ValidationMessages.genre2="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre2=false;
SwitchGames.Account.screen3ValidationMessages.genre3="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre3=false;
}
if(_53==_55){
SwitchGames.Account.screen3ValidationMessages.genre1="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre1=false;
SwitchGames.Account.screen3ValidationMessages.genre3="You must select unique genres";
SwitchGames.Account.screen3ValidationParams.genre3=false;
}
SwitchGames.Account.validatePanel3();
};
SwitchGames.Account.avatarUploadComplete=function(){
var ret=frames["ac-upload-target"].document.getElementsByTagName("body")[0].innerHTML;
var _57=Ext.util.JSON.decode(ret);
if(_57.error!=undefined){
SwitchGames.Dialogs.showErrorDialog(_57.error);
}else{
Ext.fly("ac-last-avatar-file").dom.value=_57.file_name;
SwitchGames.Account.imagePanel.setClientSrc(SwitchGames.Utility.getAvatarValue(_57.file_name));
}
};
Ext.fly("age13").on("click",SwitchGames.Account.ageCheckboxValidation);
Ext.fly("i-have-read").on("click",SwitchGames.Account.termsValidation);
Ext.fly("screenname").on("keydown",function(e,t){
if(e.keyCode==59||e.keyCode==186||e.keyCode==187||e.keyCode==188||e.keyCode==191||e.keyCode==192||e.keyCode==219||e.keyCode==220||e.keyCode==221||e.keyCode==222){
e.preventDefault();
e.stopPropagation();
}
});
Ext.fly("screenname").on("keyup",function(e,t){
var t=t;
if(e.keyCode==186||e.keyCode==187||e.keyCode==188||e.keyCode==191||e.keyCode==192||e.keyCode==219||e.keyCode==220||e.keyCode==221||e.keyCode==222){
e.preventDefault();
e.stopPropagation();
}
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190){
SwitchGames.Account.screen1EntryAttempt.screenName=true;
if(SwitchGames.Account.screenNameTimer){
clearTimeout(SwitchGames.Account.screenNameTimer);
}
SwitchGames.Account.screenNameTimer=setTimeout(function(){
if(SwitchGames.Account.screenNameTransactionId){
Ext.Ajax.abort(SwitchGames.Account.screenNameTransactionId);
SwitchGames.Account.screenNameTransactionId=null;
}
SwitchGames.Account.screenNameValidation(t);
},750);
}
});
Ext.fly("screenname").on("blur",function(e,t){
if(SwitchGames.Account.screenNameTimer){
clearTimeout(SwitchGames.Account.screenNameTimer);
}
SwitchGames.Account.screenNameValidation(t);
});
Ext.fly("email1").on("keyup",function(e,t){
var t=t;
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190||e.keycode==50){
SwitchGames.Account.screen1EntryAttempt.email1=true;
SwitchGames.Account.screen1EntryAttempt.email2=false;
if(SwitchGames.Account.email1Timer){
clearTimeout(SwitchGames.Account.email1Timer);
}
if(SwitchGames.Account.screen1EntryAttempt.email2){
SwitchGames.Account.email2Validation();
}
SwitchGames.Account.email1Timer=setTimeout(function(){
if(SwitchGames.Account.email1TransactionId){
Ext.Ajax.abort(SwitchGames.Account.email1TransactionId);
SwitchGames.Account.email1TransactionId=null;
}
SwitchGames.Account.email1Validation(t);
},750);
}
});
Ext.fly("email1").on("blur",function(e,t){
if(SwitchGames.Account.email1Timer){
clearTimeout(SwitchGames.Account.email1Timer);
}
SwitchGames.Account.email1Validation(t);
});
Ext.fly("email2").on("keyup",function(e,t){
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190||e.keycode==50){
SwitchGames.Account.screen1EntryAttempt.email2=true;
}
});
Ext.fly("email2").on("blur",function(e,t){
SwitchGames.Account.email2Validation();
});
Ext.fly("password1").on("keyup",function(e,t){
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190||e.keycode==50){
SwitchGames.Account.screen1EntryAttempt.password1=true;
}
});
Ext.fly("password1").on("blur",function(e,t){
if(SwitchGames.Account.screen1EntryAttempt.password1){
SwitchGames.Account.password1Validation();
}
if(SwitchGames.Account.screen1EntryAttempt.password2){
SwitchGames.Account.password2Validation();
}
});
Ext.fly("password2").on("keyup",function(e,t){
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190||e.keycode==50){
SwitchGames.Account.screen1EntryAttempt.password2=true;
}
});
Ext.fly("password2").on("blur",function(e,t){
if(SwitchGames.Account.screen1EntryAttempt.password2){
SwitchGames.Account.password2Validation();
}
});
Ext.fly("firstname").on("blur",function(e,t){
SwitchGames.Account.simpleFieldValidation(t,2,"firstName");
});
Ext.fly("lastname").on("blur",function(e,t){
SwitchGames.Account.simpleFieldValidation(t,2,"lastName");
});
Ext.fly("address1").on("blur",function(e,t){
SwitchGames.Account.simpleFieldValidation(t,2,"address1");
});
Ext.fly("city").on("blur",function(e,t){
SwitchGames.Account.simpleFieldValidation(t,2,"city");
});
Ext.fly("state").on("blur",function(e,t){
SwitchGames.Account.selectFieldValidation(t,2,"state");
});
Ext.fly("zip").on("blur",function(e,t){
SwitchGames.Account.simpleFieldValidation(t,2,"zip");
});
var _7a=Ext.get("systems");
_7a.on("click",function(e,t){
SwitchGames.Account.screen3EntryAttempt.systems=true;
if(t.checked){
var _7d=false;
var _7e=parseInt(t.getAttribute("platformid"));
for(var i=0,len=SwitchGames.Account.systemList.length;i<len;i++){
if(SwitchGames.Account.systemList[i]==_7e){
_7d=true;
break;
}
}
if(!_7d){
SwitchGames.Account.systemList.push(_7e);
}
}else{
var _81=[];
var _7d=false;
var _7e=t.getAttribute("platformid")*1;
for(var i=0,len=SwitchGames.Account.systemList.length;i<len;i++){
if(SwitchGames.Account.systemList[i]!=_7e){
_81.push(SwitchGames.Account.systemList[i]);
}
}
SwitchGames.Account.systemList=_81;
}
},this,{delegate:"input.system"});
Ext.fly("ac-avatar-browse").on("change",function(e,t){
Ext.fly("ac-avatar-filename").dom.value=t.value;
});
Ext.fly("ac-avatar-upload-btn").on("click",function(e,t){
var _86=Ext.get("ac-file-upload-form");
var _87=Ext.get("ac-upload-target");
_86.dom.target="ac-upload-target";
_86.dom.onload=SwitchGames.Account.avatarUploadComplete;
_86.dom.submit();
});
Ext.fly("ac-zoom-in").on("click",function(e,t){
if(t.getAttribute("disabled")=="true"){
return;
}
var _8a=SwitchGames.Account.imagePanel;
_8a.zoomIn();
});
Ext.fly("ac-zoom-out").on("click",function(e,t){
if(t.getAttribute("disabled")=="true"){
return;
}
var _8d=SwitchGames.Account.imagePanel;
_8d.zoomOut();
});
SwitchGames.Utility.panelLeftButtonCallbackFunction=function(_8e,_8f,_90,_91,_92){
if(_92==4){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-disable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-enable");
SwitchGames.Utility.scrollPanelLeft(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],_91,_92,"slide",true);
Ext.fly("left-scroller-container").setVisible(false);
return (false);
}
if(_91<3){
SwitchGames.Account["validatePanel"+_91]();
}
return (true);
};
SwitchGames.Account.afterScrollCallback=function(_93){
var _94=_93.findParent("[@name=\"panel-scroller-content-root\"]",20,false);
if(_94){
var _95=_94.getAttribute("currentPanel");
if(_95==4){
if(SwitchGames.Account.Searchms.rendered!=true){
SwitchGames.Account.Searchms.applyToMarkup(Ext.get("sg-ms-search-query-id"));
}
}else{
if(_95==6){
if(SwitchGames.Account.Searchwl.rendered!=true){
SwitchGames.Account.Searchwl.applyToMarkup(Ext.get("sg-wl-search-query-id"));
}
}
}
}
};
SwitchGames.Utility.panelRightButtonCallbackFunction=function(_96,_97,_98,_99,_9a){
if(_99<3){
SwitchGames.Account["validatePanel"+(_99+1)]();
}
var _9b=_98.query("div.right-scroller-btn-disable");
if(_9b.length>0){
SwitchGames.Dialogs.showErrorDialog("You must fill in all of the required fields before proceeding");
return (false);
}
if(_99==2){
SwitchGames.Account.saveRecord();
return (false);
}else{
if(_99==3){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
SwitchGames.Utility.scrollPanelRight(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],3,4,"slide",true,SwitchGames.Account.afterScrollCallback);
Ext.fly("left-scroller-container").setVisible(false);
return (false);
}else{
if(_99==5){
SwitchGames.TradeTools.addRemove("add",null,null,"ms",function(_9c){
if(_9c){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
SwitchGames.Utility.scrollPanelRight(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],5,6,"slide",true,SwitchGames.Account.afterScrollCallback);
Ext.fly("left-scroller-container").setVisible(false);
}else{
}
});
return (false);
}else{
if(_99==6){
_98.dom.childNodes[1].innerHTML="FINISH";
SwitchGames.TradeTools.addRemove("add",null,null,"wl",function(_9d){
if(_9d){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
SwitchGames.Utility.scrollPanelRight(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],6,7,"slide",true,SwitchGames.Account.afterScrollCallback);
Ext.fly("left-scroller-container").setVisible(false);
Ext.fly("right-scroller-container").setVisible(false);
}else{
}
});
return (false);
}
}
}
}
return (true);
};
SwitchGames.Utility.setupLeftRightScrolling(Ext.select(".panelcontrol",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],Ext.select("[@name=\"panel-scroller-left-arrow\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],Ext.select("[@name=\"panel-scroller-right-arrow\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],"slide",true,SwitchGames.Utility.panelLeftButtonCallbackFunction,SwitchGames.Utility.panelRightButtonCallbackFunction);
SwitchGames.Account.saveRecord=function(){
if(SwitchGames.Account.savingRecord===true){
return;
}else{
SwitchGames.Account.savingRecord=true;
}
var _9e={action:"save",rettype:"json",screenname:Ext.get("screenname").getValue(),email:Ext.get("email1").getValue(),password:Ext.get("password1").getValue(),firstname:Ext.get("firstname").getValue(),lastname:Ext.get("lastname").getValue(),address1:Ext.get("address1").getValue(),address2:Ext.get("address2").getValue(),state:Ext.get("state").getValue(),city:Ext.get("city").getValue(),zip:Ext.get("zip").getValue(),country:Ext.get("country").getValue(),genre1:Ext.get("genre1").getValue(),genre2:Ext.get("genre2").getValue(),genre3:Ext.get("genre3").getValue(),bestgame:Ext.get("bestgameid").getValue(),playingalot:Ext.get("playingalotid").getValue(),systems:SwitchGames.Account.systemList.join(",")};
var _9f=SwitchGames.Account.imagePanel;
var _a0=_9f.client.getWidth();
var _a1=_9f.client.getHeight();
var _a2=_9f.body.getScroll();
var _a3=Ext.fly("ac-last-avatar-file").dom.value;
if(Ext.get("ac-last-avatar-file").dom.value!=""){
_9e.ac_last_avatar_file=Ext.get("ac-last-avatar-file").dom.value;
_9e.width=_a0;
_9e.height=_a1;
_9e.left=_a2.left;
_9e.top=_a2.top;
}
Ext.Ajax.request({url:"data/account/accounts_data.php",params:_9e,success:function(_a4,_a5){
SwitchGames.Account.savingRecord=false;
var _a6=Ext.util.JSON.decode(_a4.responseText);
myData=_a6;
if(_a6.error!=undefined){
SwitchGames.Dialogs.showErrorDialog(_a6.error);
}else{
Ext.fly("congratulations").dom.innerHTML="CONGRATULATIONS "+_9e.firstname+"!";
SwitchGames.Utility.scrollPanelRight(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],2,3,"slide",true,SwitchGames.Account.afterScrollCallback);
Ext.fly("left-scroller-container").setVisible(false);
Ext.fly("right-scroller-container").setVisible(false);
}
},failure:function(_a7,_a8){
SwitchGames.Account.savingRecord=false;
SwitchGames.Dialogs.showErrorDialog(_a7);
}});
};
SwitchGames.Utility.addSelectOptionsFromArray("genre1",SwitchGames.Utility.genreList,"");
SwitchGames.Utility.addSelectOptionsFromArray("genre2",SwitchGames.Utility.genreList,"");
SwitchGames.Utility.addSelectOptionsFromArray("genre3",SwitchGames.Utility.genreList,"");
SwitchGames.Utility.createSystemCheckboxList("systems",null);
SwitchGames.Account.bestGameComboBox=new Ext.form.ComboBox({applyTo:"bestgame",displayField:"name",emptyText:"Search...",forceSelection:true,hideTrigger:true,itemSelector:"div.search-item",listWidth:600,listAlign:"tl-bl",loadingText:"Searching...",minChars:2,minListWidth:600,pageSize:10,queryDelay:700,queryParam:"query",resizable:true,shadow:"frame",store:SwitchGames.Search.nav_combo_data_store,typeAhead:false,tpl:SwitchGames.Search.nav_combo_data_template,valueField:"name",width:160});
SwitchGames.Account.bestGameComboBox.addListener("select",function(_a9,_aa,_ab){
Ext.fly("bestgame").dom.value=_aa.data.name;
Ext.fly("bestgameid").dom.value=_aa.data.id;
SwitchGames.Account.removeValidationInfo("bestgame","validation-failure");
SwitchGames.Account.screen3ValidationParams.bestgame=true;
SwitchGames.Account.validatePanel3();
});
SwitchGames.Account.playingALotComboBox=new Ext.form.ComboBox({applyTo:"playingalot",displayField:"name",emptyText:"Search...",forceSelection:true,hideTrigger:true,itemSelector:"div.search-item",listWidth:600,listAlign:"tl-bl",loadingText:"Searching...",minChars:2,minListWidth:600,pageSize:10,queryDelay:700,queryParam:"query",resizable:true,shadow:"frame",store:SwitchGames.Search.nav_combo_data_store,typeAhead:false,tpl:SwitchGames.Search.nav_combo_data_template,valueField:"name",width:160});
SwitchGames.Account.playingALotComboBox.addListener("select",function(_ac,_ad,_ae){
Ext.fly("playingalot").dom.value=_ad.data.name;
Ext.fly("playingalotid").dom.value=_ad.data.id;
SwitchGames.Account.removeValidationInfo("playingalot","validation-failure");
SwitchGames.Account.screen3ValidationParams.playingalot=true;
SwitchGames.Account.validatePanel3();
});
SwitchGames.Account.searchFormRender=function(_af){
var _b0="Search"+_af;
var _af=_af;
if(SwitchGames.Account[_b0]==undefined||SwitchGames.Account[_b0]==null){
SwitchGames.Account[_b0]=new Ext.form.ComboBox({allowBlank:false,applyTo:"sg-"+_af+"-search-query-id",blankText:"No item was specified to add.",displayField:"name",emptyText:"Enter item name to find it",enableKeyEvents:true,forceSelection:true,hideTrigger:true,itemSelector:"div.search-item",lazyRender:false,listWidth:700,loadingText:"Searching...",minChars:2,pageSize:20,queryDelay:700,queryParam:"query",selectOnFocus:true,shadow:"frame",store:SwitchGames.Search.nav_combo_data_store,tpl:SwitchGames.Search.nav_combo_data_template,typeAhead:false,valueField:"name",width:250,listeners:{"beforequery":function(_b1){
if(_b1.query.length<_b1.combo.minChars){
return;
}
var _b2=Ext.get(_af+"-item-type").getValue();
if(_b2=="all"){
_b1.combo.store.baseParams.types="game,platform,accessory";
}else{
_b1.combo.store.baseParams.types=_b2;
}
if(_af=="ms"){
_b1.combo.store.baseParams.widget="mystuff";
}else{
_b1.combo.store.baseParams.widget="wishlist";
}
_b1.forceAll=true;
_b1.combo.lastQuery="";
},"keydown":function(e,t){
if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)||e.keyCode==189||e.keyCode==190||e.keycode==50){
SwitchGames.Account[_b0].collapse();
}
}}});
}
SwitchGames.Account[_b0].addListener("select",function(_b5,_b6,_b7){
Ext.fly("sg-"+_af+"-search-item_type").dom.value=_b6.data.type;
Ext.fly("sg-"+_af+"-search-item_id").dom.value=_b6.data.id;
Ext.fly("sg-"+_af+"-choseImage").dom.src=SwitchGames.Utility.getCoverValue(_b6.data.photo_cover);
if(_af=="ms"){
Ext.fly("sg-"+_af+"-choseImage2").dom.src=SwitchGames.Utility.getCoverValue(_b6.data.photo_cover);
}
Ext.fly("sg-"+_af+"-chose-title").dom.innerHTML=_b6.data.name;
Ext.fly("sg-"+_af+"-chose-platform").dom.innerHTML=_b6.data.platform;
Ext.fly("sg-"+_af+"-chose-publisher").dom.innerHTML="Publisher: "+_b6.data.publisher;
Ext.fly("sg-"+_af+"-chose-esbr").dom.innerHTML="ESRB Rating: "+_b6.data.esrb;
Ext.fly("sg-"+_af+"-chose-released").dom.innerHTML="Released on: "+_b6.data.date_released;
Ext.fly("sg-"+_af+"-choseImageContainer").removeClass("hide");
Ext.fly("sg-"+_af+"-choseTextRegion-id").removeClass("hide");
if(_af=="ms"){
Ext.fly("sg-"+_af+"-choseImageContainer2").removeClass("hide");
}
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-disable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-enable");
});
SwitchGames.Account[_b0].addListener("keydown",function(_b8,e){
if((e.keyCode>=48&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=111)){
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
}
});
};
SwitchGames.Account.searchFormRender("ms");
SwitchGames.Account.searchFormRender("wl");
Ext.fly("lets-get-started-btn").on("click",function(e,t){
SwitchGames.Utility.scrollPanelRight(Ext.select("[@name=\"panel-scroller-root\"]",true,SwitchGames.Account.accountSetupDialog.body.dom).elements[0],3,4,"slide",true,SwitchGames.Account.afterScrollCallback);
Ext.fly("right-scroller-btn").removeClass("right-scroller-btn-enable");
Ext.fly("right-scroller-btn").addClass("right-scroller-btn-disable");
Ext.fly("left-scroller-container").setVisible(false);
Ext.fly("right-scroller-container").setVisible(true);
});
Ext.fly("sg-ms-ListItemForTrade-id").on("click",function(e,t){
if(t.checked){
Ext.fly("safeTradeDiv").setStyle("display","block");
}else{
Ext.fly("safeTradeDiv").setStyle("display","none");
}
});
Ext.Ajax.request({url:"terms-and-conditions.html",success:function(_be,_bf){
var _c0=Ext.get("terms-and-conditions");
if(_c0!=null){
Ext.DomHelper.overwrite("terms-and-conditions",_be.responseText);
}
},failure:function(_c1,_c2){
SwitchGames.Dialogs.showErrorDialog("Could not load the terms and conditions");
}});
});

