1// JavaScript Document 2 3function trim(str){ 4 var str = str.replace(/^\s\s*/,''), 5 ws = /\s/, 6 i = str.length; 7 while (ws.test(str.charAt(--i))); 8 return str.slice(0, i + 1); 9} 10 11function get_ne_regions() 12{ 13 output = "" ; 14 if( rcount = document.getElementById('regioncount') ) { 15 for (var i =0; i < (rcount ? rcount.value : 0 ); i++) { 16 if(document.getElementById('ne_regions'+i).checked==true) { 17 //alert(i); 18 if( output == "" ) 19 output += document.getElementById('ne_regions'+i).value ; 20 else 21 output += ','+document.getElementById('ne_regions'+i).value ; 22 } 23 } 24 } 25 if( ne_r = document.getElementById('ne_regions') ) { 26 ne_r.value = output ; 27 } 28} 29var do_check_one_job = true ; 30function check_one_job() { 31 var positions = document.getElementById('positions').value.split('/'); 32 document.getElementById('position1').value = ( positions[0]?positions[0]:''); 33 document.getElementById('position2').value = ( positions[1]?positions[1]:''); 34 document.getElementById('position3').value = ( positions[2]?positions[2]:''); 35 var position1=document.getElementById('position1').value; 36 var position2=document.getElementById('position2').value; 37 var position3=document.getElementById('position3').value; 38 if ( do_check_one_job && position1 && position2 && position3 ) { 39 do_check_one_job = false ; 40 alert( 'You have filled in THREE different positions.' 41 + ' The more positions you fill in, the fewer matching players there will be.' 42 + ' Maybe you are looking for more than ONE player?' 43 + ' In that case you need to publish separate jobs for each individual player that you are looking for.' 44 ) ; 45 } 46} 47var form_submitted = false ; // remember that submit has been given 48function validationform() 49{ 50 if( form_submitted ) { 51 //alert('Please wait, your request is being processed'); 52 return false ; 53 } 54 form_submitted = true ; 55 if( do_validationform() == false ) { 56 form_submitted = false ; 57 return false ; 58 } 59} 60function do_validationform() 61{ 62 get_ne_regions(); 63 var country=document.getElementById('country'); 64 var league = document.getElementById('league'); 65 var league_other = document.getElementById('league_other' ); 66 var club_season=document.getElementById('club_season') ; 67 var club_other = document.getElementById('club_other') ; 68 69 var is_anonymous=document.getElementById('is_anonymous').checked; 70 var position1=document.getElementById('position1').value; 71 var position2=document.getElementById('position2').value; 72 var position3=document.getElementById('position3').value; 73 var currency=document.getElementById('currency').value; 74 var salary=trim(document.getElementById('salary').value); 75 var description=trim(document.getElementById('description').value); 76 var status=document.getElementById('status').value; 77 78 var ne_domestic=valButton(document.getElementsByName('ne_domestic')); 79 var ne_others=valButton(document.getElementsByName('ne_others')); 80 var ne_regions=document.getElementById('ne_regions').value; 81 82 var reg = /^[0-9]+$/; 83 if(country.value == '' || country.value == 0) 84 { 85 alert('Please select country'); 86 country.focus(); 87 return false; 88 } 89 else if ( ! ( league.value > 0 || ( league.value < 0 && trim( league_other.value ) > '' ) ) ) 90 { 91 alert('Please select a league'); 92 league.focus(); 93 return false; 94 } 95 else if ( ! ( club_season.value > 0 || ( ( club_season.value < 0 || league.value < 0 )&& trim(club_other.value) > '' ) ) ) 96 { 97 alert("Please enter the name of the club\n(you can use the checkbox below to hide the name from the website)" ); 98 club_season.focus(); 99 return false; 100 } 101 else if( ! ( ne_domestic || ne_others || ne_regions ) ) 102 { 103 alert('Please select at least one elegibility region'); 104 return false; 105 } 106 else if(position1 == '' && position2 == '' && position3 == '' ) 107 { 108 alert('Please select at least one position'); 109 return false; 110 } 111 else if(position1==position2 && position1!="" && position2!="" ) 112 { 113 alert("You have selected the same position more then once, please modify.\n(only one position is required)"); 114 document.getElementById('position1').focus(); 115 return false; 116 } 117 else if(position2==position3 && position2!="" && position3!="") 118 { 119 alert("You have selected the same position more then once, please modify.\n(only one position is required)"); 120 document.getElementById('position1').focus(); 121 return false;
122 } 123 else if(position1==position3 && position1!="" && position3!="") 124 { 125 alert("You have selected the same position more then once, please modify.\n(only one position is required)"); 126 document.getElementById('position1').focus(); 127 return false; 128 } 129 else if(currency ==0 || currency == '') 130 { 131 alert('Please select currency'); 132 document.getElementById('currency').focus(); 133 return false; 134 } 135 else if(salary == '') 136 { 137 alert('Please enter salary'); 138 document.getElementById('salary').focus(); 139 return false; 140 } 141 else if(!reg.test(salary)) 142 { 143 alert("Please enter a valid number as a salary indication\n\n" + 144 "Do not use dots or comma's or letter characters.\n\n" + 145 "For example, one thousand should be written as 1000"); 146 document.getElementById('salary').focus(); 147 document.getElementById('salary').value=''; 148 return false; 149 } 150 else if(description == '') 151 { 152 alert('Please enter description'); 153 document.getElementById('description').focus(); 154 return false; 155 } 156 else if ( description.indexOf( '@' ) >= 0 ) { 157 alert( "It is not allowed to place email adresses in the description.\nWe have a message system to communicate with players."); 158 document.getElementById('description').focus(); 159 return false; 160 } 161 else if(status == '' || status == 0) 162 { 163 alert('Please select status'); 164 document.getElementById('status').focus(); 165 return false; 166 } 167 168} 169function valButton(btn) { 170 var cnt = -1; 171 for (var i=btn.length-1; i > -1; i--) { 172 if (btn[i].checked) {cnt = i; i = -1;} 173 } 174 if (cnt > -1) return btn[cnt].value; 175 else return null; 176} 177function allEligibility() 178{ 179 //alert("Select All"); 180 checked= document.getElementById('selectall').checked; 181 if (checked == false) 182 { 183 checked = false ; 184 } 185 else 186 { 187 checked = true; 188 } 189 for (var i =0; i < document.getElementById('regioncount').value; i++) 190 { 191 document.getElementById('ne_regions'+i).checked = checked; 192 } 193}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.