function notEmpty(b,c){var a=b.value.length>0;if(!a){b.focus();alert("Please specify a value for"+c)}return a}function validateLogin(b){if(typeof(racecard)!="undefined"&&racecard!=null){if(typeof(racecard.selectionString)!="undefined"){racecard.zeroPlaceBet();racecard.zeroWinBet();b.action=addParamToUrl(b.action,"bet",racecard.selectionString());b.action=addParamToUrl(b.action,"meetingId",document.getElementById("meetings").value)}if(document.getElementById("legSelect1")!=null){for(var a=1;a<5;++a){b.action=addParamToUrl(b.action,"legSelect"+a,document.getElementById("legSelect"+a).value.split(",")[0])}}}else{if(typeof(betString)=="function"){b.action=addParamToUrl(b.action,"selections",betString(_selections))}else{if(typeof(multibet)!="undefined"&&multibet!=null){b.action=addParamToUrl(b.action,"competitionId",multibet.selectedCompetitionId());b.action=addParamToUrl(b.action,"selections",multibet.selectionString());b.action=addParamToUrl(b.action,"amount",String(multibet.toWin()))}}}return(notEmpty(b.account,"account")&¬Empty(b.PIN,"PIN")&¬Empty(b.surname,"surname"))};