Posted by cric Mon 19th Mar 2007 10:33 - Syntax is JavaScript - 24 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
-
-
Cricket Web's Fantasy Cricket - Modify Team -
-
-
-
-
-
-
-
-
-
-
-
-
You have Javascript disabled. To submit your team please enable Javascript in your browser. -
-
-
-
-
-
-
-
var NumberTimesChanged = 0;
-
var Budget = 0
-
function clearBudget() {
-
Budget = 0
-
}
-
-
-
function lock()
-
-
{
-
-
-
}
-
-
function showstatspsiderpage(playeridauto)
-
{
-
if ((playeridauto == "-------------------------------------------") || (playeridauto == ""))
-
{
-
alert('Please select a player');
-
return false;
-
}
-
-
url="statsspider.php?PlayerIDAuto=" + playeridauto;
-
window.open(url);
-
}
-
-
function changeTextToBlack() {
-
modifyteam.total.style.color = "black";
-
modifyteam.total.style.fontWeight = "normal"
-
}
-
-
function checkscore(playernameindex,fieldname)
-
{
-
-
//NumberTimesChanged = NumberTimesChanged + 1;
-
//if (NumberTimesChanged > 1)
-
//{
-
// this.blur();
-
// alert('You can only change a player once. Your team will be reset to the way it was when the page loaded.');
-
// window.location.reload();
-
//}
-
-
-
PlayerName = modifyteam.elements[fieldname].options[playernameindex].text;
-
ScoreFieldName = "score" + fieldname;
-
PositionOriginalPoint = fieldname + "OriginalPoint";
-
-
var PlayerA = 15;
-
var PlayerB = 13;
-
var PlayerC = 11;
-
var PlayerNo = 0;
-
var PlayerD = 9;
-
var PlayerE = 7;
-
var PlayerF = 5;
-
var PlayerG = 3;
-
-
//get the previous point each position has before changing
-
modifyteam.elements[PositionOriginalPoint].value = modifyteam.elements[ScoreFieldName].value;
-
-
-
if (PlayerName.charAt(0) == "A") {
-
modifyteam.elements[ScoreFieldName].value = PlayerA;
-
}
-
else if (PlayerName.charAt(0) == "B") {
-
modifyteam.elements[ScoreFieldName].value = PlayerB;
-
}
-
else if (PlayerName.charAt(0) == "C") {
-
modifyteam.elements[ScoreFieldName].value = PlayerC;
-
}
-
else if (PlayerName.charAt(0) == "D") {
-
modifyteam.elements[ScoreFieldName].value = PlayerD;
-
}
-
else if (PlayerName.charAt(0) == "E") {
-
modifyteam.elements[ScoreFieldName].value = PlayerE;
-
}
-
else if (PlayerName.charAt(0) == "F") {
-
modifyteam.elements[ScoreFieldName].value = PlayerF;
-
}
-
else if (PlayerName.charAt(0) == "G") {
-
modifyteam.elements[ScoreFieldName].value = PlayerG;
-
}
-
else {
-
modifyteam.elements[ScoreFieldName].value = PlayerNo;
-
}
-
-
modifyteam.total.value = Budget + (parseInt(modifyteam.elements[PositionOriginalPoint].value) - parseInt(modifyteam.elements[ScoreFieldName].value));
-
Budget = parseInt(modifyteam.total.value);
-
-
if (modifyteam.total.value < 0) {
-
modifyteam.total.style.color = "red"
-
modifyteam.total.style.fontWeight = "bold"
-
alert('You have used up all your allocated player points! Please select some other players');
-
}
-
else {
-
changeTextToBlack();
-
-
}
-
}
-
-
-
function validation() {
-
-
if (modifyteam.TeamName.value == "") {
-
alert('Please enter Team Name');
-
modifyteam.TeamName.focus();
-
return false;
-
}
-
-
var badWordReg = /spam|punk|anal|arse|assy|babe|bastard|bitch|bollocks|bondage|booger|booze|breast|butthead|clit|cock|crack|crap|crotch|cunt|daemon|death|diddle|dildo|dink|dong|dork|dyke|fag|fart|felch|flame|foxy|foxxy|fooxy|gangbang|gurl|hacker|hate|honkey|hooker|hostmaster|hottie|hotty|hummer|jerk|jizzum|jugs|junk|kill|kinky|knocker|libido|loser|mariguana|milf|moist|munch|nasty|nibble|nigger|nipple|nookey|nympho|pecker|peep|penis|pedophile|phallic|pimp|piss|poontang|poop|porn|psycho|pubes|pubic|pussy|queef|queer|quim|sassy|schlong|screw|sex|slapper|slut|spam|spank|sperm|spooge|spunk|squirt|stiffy|stooge|strip|subscri|suck|tits|tittie|titty|trash|tramp|transvestite|turd|twap|vagina|virus|viruz|wanker|wasted|weed|whack|whore|willie|willy|woody|wuss|zipper|zomby|fuck|fucking|shit|git|twat|dick/i
-
-
if (badWordReg.test(document.modifyteam.TeamName.value))
-
{
-
alert ("You entered a word that is considered offensive or is not allowed.")
-
document.modifyteam.TeamName.focus()
-
return false;
-
}
-
-
-
p0 = modifyteam.Opener1.selectedIndex;
-
p1 = modifyteam.Opener2.selectedIndex;
-
p2 = modifyteam.Bat1.selectedIndex;
-
p3 = modifyteam.Bat2.selectedIndex;
-
p4 = modifyteam.Bat3.selectedIndex;
-
p5 = modifyteam.WK.selectedIndex;
-
p6 = modifyteam.AR1.selectedIndex;
-
p7 = modifyteam.Bowl1.selectedIndex;
-
p8 = modifyteam.Bowl2.selectedIndex;
-
p9 = modifyteam.Bowl3.selectedIndex;
-
p10 = modifyteam.Bowl4.selectedIndex;
-
-
-
p = new Array();
-
-
p = modifyteam.Opener1.options[p0].text;
-
p = modifyteam.Opener2.options[p1].text;
-
p = modifyteam.Bat1.options[p2].text;
-
p = modifyteam.Bat2.options[p3].text;
-
p = modifyteam.Bat3.options[p4].text;
-
p = modifyteam.WK.options[p5].text;
-
p = modifyteam.AR1.options[p6].text;
-
p = modifyteam.Bowl1.options[p7].text;
-
p = modifyteam.Bowl2.options[p8].text;
-
p = modifyteam.Bowl3.options[p9].text;
-
p[10] = modifyteam.Bowl4.options[p10].text;
-
-
for (i = 0; i<11; i++) {
-
playerevaluated = p[i];
-
for (j = 0; j<11; j++) {
-
playercomparison = p[j];
-
if (playerevaluated == playercomparison && i != j) {
-
alert("You have selected the same player more than once! Please choose 11 unique players!");
-
return false;
-
}
-
}
-
}
-
-
if (modifyteam.total.value < 0) {
-
alert('You have used up all your allocated player points! Please select some other players');
-
return false;
-
}
-
-
if (modifyteam.scoreOpener1.value == "0" || modifyteam.Opener1.value == "-------------------------------------------") {
-
alert('Please enter Bat 1');
-
modifyteam.scoreOpener1.focus();
-
return false;
-
}
-
else if (modifyteam.scoreOpener2.value == "0" || modifyteam.Opener2.value == "-------------------------------------------") {
-
alert('Please enter Bat 2');
-
modifyteam.scoreOpener2.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBat1.value == "0" || modifyteam.Bat1.value == "-------------------------------------------") {
-
alert('Please enter Bat 3');
-
modifyteam.scoreBat1.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBat2.value == "0" || modifyteam.Bat2.value == "-------------------------------------------") {
-
alert('Please enter Bat 4');
-
modifyteam.scoreBat2.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBat3.value == "0" || modifyteam.Bat3.value == "-------------------------------------------") {
-
alert('Please enter Bat 5');
-
modifyteam.scoreBat3.focus();
-
return false;
-
}
-
else if (modifyteam.scoreWK.value == "0" || modifyteam.WK.value == "-------------------------------------------") {
-
alert('Please enter Wicketkeeper');
-
modifyteam.scoreWK.focus();
-
return false;
-
}
-
else if (modifyteam.scoreAR1.value == "0" || modifyteam.AR1.value == "-------------------------------------------") {
-
alert('Please enter Allrounder');
-
modifyteam.scoreAR1.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBowl1.value == "0" || modifyteam.Bowl1.value == "-------------------------------------------") {
-
alert('Please enter Bowler 1');
-
modifyteam.scoreBowl1.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBowl2.value == "0" || modifyteam.Bowl2.value == "-------------------------------------------") {
-
alert('Please enter Bowler 2');
-
modifyteam.scoreBowl2.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBowl3.value == "0" || modifyteam.Bowl3.value == "-------------------------------------------") {
-
alert('Please enter Bowler 3');
-
modifyteam.scoreBowl3.focus();
-
return false;
-
}
-
else if (modifyteam.scoreBowl4.value == "0" || modifyteam.Bowl4.value == "-------------------------------------------") {
-
alert('Please enter Bowler 4');
-
modifyteam.scoreBowl4.focus();
-
return false;
-
}
-
else {
-
return true;
-
}
-
-
}
-
-
-
-
-
-
-
jpg','images/logoff_btn_rollo.jpg','images/register_btn_rollo.jpg')">
-
-
-
-
-
-
google_ad_client = "pub-1837039416635848";google_ad_width = 728;google_ad_height = 15;google_ad_format = "728x15_0ads_al";//2006-12-02: cricketweb.netgoogle_ad_channel = "7466345069";google_color_border = "99AACC";google_color_bg = "99AACC";google_color_link = "000000";google_color_text = "003366";google_color_url = "000099";//-->src="http://pagead2.googlesyndication.com/pagead/show_ads.js">_uacct = "UA-347017-1";urchinTracker();
100%;" cellpadding="0" cellspacing="2">
"width: 100%;" cellpadding="0" cellspacing="2">
class="general_left_column" valign="top"> class="L2_logged_in_manage_your_team">"images/menu_titles/manage_your_team_title.gif" width="96" height="25" alt="Manage Your Teams">
"images/blue_shim.gif">class="L2_logged_in_your_current_team">"images/menu_titles/your_current_teams_title.gif" width="103" height="25" alt="Your Current Teams">
"images/blue_shim.gif">"top"> class="general_page_title">"images/page_titles/modify_team_title.gif" width="400" height="20" alt="Modify Team">class="general_page_content">
Your current team is show below. To modify your team simply decide whom you wish to replace and select a replacement from that position's drop-down menu. There is a link to Stats Spider to assist you on players roles and playing record.
Your remaining competition transfers are shown below along with the value of a captaincy change if you wish to make one.
Your remaining team budget is shown at the bottom of your team that you must still remain within.
You are modifying team Highway Troopers in competition World Cup 2007 and are allowedto make 20 modification(s):
Player - 20 modification
Player replacement (i.e. injuries, etc) - 0 modification
Captaincy - each captaincy change will cost you 4 modifications, e.g. if you have 12 modifications left, a change of captaincy will leave you with 8 modifications.
Comments: 0