1 2function showError( id, message ) 3{ 4 if (window.jQuery) 5 { 6 var $errorObj; 7 8 if (typeof( id ) == 'string') 9 { 10 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 11 } 12 else 13 { 14 $errorObj = jQuery(id); 15 } 16 17 // Remove any dangling messages. 18 jQuery($errorObj).nextAll('.errorText').remove(); 19 20 if ($errorObj) 21 { 22 $errorObj.addClass("error"); 23 24 Shout.hideUIBlock(); 25 26 if (message) 27 { 28 $messageSpan = jQuery("<span></span>"); 29 $messageSpan.html(message); 30 $messageSpan.addClass("errorText"); 31 32 $errorObj.parent().append($messageSpan); 33 } 34 } 35 } 36 else 37 { 38 var errorObj; 39 40 if (typeof( id ) == 'string') 41 { 42 errorObj = document.getElementById( id ); 43 } 44 else 45 { 46 errorObj = id; 47 } 48 49 // Remove any dangling messages. 50 if (window.jQuery) 51 { 52 jQuery(errorObj).nextAll('.errorText').remove(); 53 } 54 55 if (errorObj) 56 { 57 errorObj.className = "error"; 58 59 Shout.hideUIBlock(); 60 61 if (message) 62 { 63 messageSpan = document.createElement("span"); 64 messageSpan.innerHTML = message; 65 messageSpan.className = "errorText"; 66 67 //errorObj.parentNode.insertBefore( messageSpan, errorObj ); 68 errorObj.parentNode.appendChild( messageSpan ); 69 } 70 } 71 } 72} 73 74function showWarning( id, message ) 75{ 76 if (window.jQuery) 77 { 78 if (typeof( id ) == 'string') 79 { 80 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 81 } 82 else 83 { 84 var $errorObj = jQuery(id); 85 } 86 87 if ($errorObj.length) 88 { 89 $errorObj.addClass('warning'); 90 91 if (message) 92 { 93 $messageSpan = jQuery("<span></span>"); 94 $messageSpan.html(message); 95 $messageSpan.addClass("warningText"); 96 97 //errorObj.parentNode.insertBefore( messageSpan, errorObj ); 98 $errorObj.parent().append($messageSpan); 99 } 100 } 101 } 102 else 103 { 104 if( typeof( id ) == 'string' ) 105 { 106 errorObj = document.getElementById( id ); 107 } 108 else 109 { 110 errorObj = id; 111 } 112 113 if( errorObj ) 114 { 115 errorObj.className = "warning"; 116 117 if( message ) 118 { 119 messageSpan = document.createElement("span"); 120 121 messageSpan.innerHTML = message; 122 messageSpan.className = "warningText"; 123 124 //errorObj.parentNode.insertBefore( messageSpan, errorObj ); 125 errorObj.parentNode.appendChild( messageSpan ); 126 } 127 } 128 } 129} 130 131function hideError( id ) 132{ 133 if (window.jQuery) 134 { 135 if (typeof( id ) == 'string') 136 { 137 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 138 } 139 else 140 { 141 var $errorObj = jQuery(id); 142 } 143 144 if ($errorObj.length) 145 { 146 $errorObj.removeClass('error'); 147 $errorObj.nextAll('.errorText').remove(); 148 } 149 } 150 else 151 { 152 if (typeof( id ) == 'string') 153 { 154 errorObj = document.getElementById( id ); 155 } 156 else 157 { 158 errorObj = id; 159 } 160 161 if ( errorObj ) 162 { 163 errorObj.className = ""; 164 } 165 } 166} 167 168function hideWarning( id ) 169{ 170 if (window.jQuery) 171 { 172 if (typeof( id ) == 'string') 173 { 174 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 175 } 176 else 177 { 178 var $errorObj = jQuery(id); 179 } 180 181 if ($errorObj.length) 182 { 183 $errorObj.removeClass('warning'); 184 $errorObj.nextAll('.warningText').remove(); 185 } 186 } 187 else 188 { 189 if (typeof( id ) == 'string') 190 { 191 errorObj = document.getElementById( id ); 192 } 193 else 194 { 195 errorObj = id; 196 } 197 198 if ( errorObj ) 199 { 200 errorObj.className = ""; 201 } 202 } 203} 204 205function hasError( id ) 206{ 207 if (window.jQuery) 208 { 209 if (typeof( id ) == 'string') 210 { 211 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 212 } 213 else 214 { 215 var $errorObj = jQuery(id); 216 } 217 218 if ($errorObj.length 219 && $errorObj.hasClass('error')) 220 { 221 return true; 222 } 223 224 return false;
225 } 226 else 227 { 228 if( typeof( id ) == 'string' ) 229 { 230 errorObj = document.getElementById( id ); 231 } 232 else 233 { 234 errorObj = id; 235 } 236 237 return errorObj && errorObj.className == "error"; 238 } 239} 240 241function hasWarning( id ) 242{ 243 if (window.jQuery) 244 { 245 if (typeof( id ) == 'string') 246 { 247 $errorObj = jQuery('#' + id.replace(/\[/g, '\\[').replace(/\]/g, '\\]')); 248 } 249 else 250 { 251 var $errorObj = jQuery(id); 252 } 253 254 if ($errorObj.length 255 && $errorObj.hasClass('warning')) 256 { 257 return true; 258 } 259 260 return false; 261 } 262 else 263 { 264 if( typeof( id ) == 'string' ) 265 { 266 errorObj = document.getElementById( id ); 267 } 268 else 269 { 270 errorObj = id; 271 } 272 273 return errorObj && errorObj.className == "warning"; 274 } 275} 276 277function toggleDiv( id ) 278{ 279 var element = jQuery('#'+id); 280 281 element.css('display', ((element.css('display') == 'none') ? 'block' : 'none')); 282} 283 284
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.