1/* 2Author: Addam M. Driver 3Date: 10/31/2006 4*/ 5 6var sMax; // Isthe maximum number of stars 7var holder; // Is the holding pattern for clicked state 8var preSet; // Is the PreSet value onces a selection has been made 9var rated; 10 11// Rollover for image Stars // 12function rating(num){ 13 sMax = 0; // Isthe maximum number of stars 14 for(n=0; n<num.parentNode.childNodes.length; n++){ 15 if(num.parentNode.childNodes[n].nodeName == "A"){ 16 sMax++; 17 } 18 } 19 20 if(!rated){ 21 s = num.id.replace("_", ''); // Get the selected star 22 a = 0; 23 for(i=1; i<=sMax; i++){ 24 if(i<=s){ 25 document.getElementById("_"+i).className = "on"; 26 document.getElementById("rateStatus").innerHTML = num.title; 27 holder = a+1; 28 a++; 29 }else{ 30 document.getElementById("_"+i).className = ""; 31 } 32 } 33 } 34} 35 36// For when you roll out of the the whole thing // 37function off(me){ 38 if(!rated){ 39 if(!preSet){ 40 for(i=1; i<=sMax; i++){ 41 document.getElementById("_"+i).className = ""; 42 document.getElementById("rateStatus").innerHTML = me.parentNode.title; 43 } 44 }else{ 45 rating(preSet); 46 document.getElementById("rateStatus").innerHTML = document.getElementById("ratingSaved").innerHTML; 47 } 48 } 49} 50 51// When you actually rate something // 52function rateIt(me){ 53 if(!rated){ 54 //document.getElementById("rateStatus").innerHTML = document.getElementById("ratingSaved").innerHTML + " :: "+me.title; 55 document.getElementById("rateStatus").value = me.title; 56 preSet = me; 57 //rated=1; 58 //sendRate(me); 59 rating(me); 60 } 61} 62 63// Send the rating information somewhere using Ajax or something like that. 64function sendRate(sel){ 65 //alert("Your rating was: "+sel.title); 66 //alert("Your rating was: "+sel.title); 67} 68
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.