var sMax; // Isthe maximum number of stars var holder; // Is the holding pattern for clicked state var preSet; // Is the PreSet value onces a selection has been made var rated; var saved_rating; // Rollover for image Stars // function rating(num, one_or_two){ document.getElementById("rateStatus" + one_or_two).style.color = "#333"; sMax = 0; // Isthe maximum number of stars for(n=0; n klicka på en stjärna!"; }  } }else{ rating(preSet, one_or_two); document.getElementById("rateStatus" + one_or_two).innerHTML = saved_rating; } } // When you actually rate something // function rateIt(me, one_or_two){ if ( document.getElementById("post") ) { document.getElementById("post").style.border = "1px solid #777"; } document.getElementById("rateStatus" + one_or_two).innerHTML = me.title; saved_rating = me.title; preSet = me; rated=1; sendRate(me); rating(me, one_or_two); // if (comment_part_2_loaded=="no" && one_or_two=="_1_") // { load_textarea_box(); comment_part_2_loaded="yes"; } } // Send the rating information somewhere using Ajax or something like that. function sendRate(sel){ our_review_grade = sel.title; //alert("Your rating was: "+sel.title); } function thumb_1(thumb_id, thumb_action){ document.getElementById("thumb_alarm_" + thumb_id).style.backgroundColor='#FFF'; document.getElementById("thumb_alarm_" + thumb_id).style.color='#333'; if(thumb_action==3){document.getElementById("thumb_alarm_" + thumb_id).innerHTML = " " + text_follow_it + ". ";} if(thumb_action==2){document.getElementById("thumb_alarm_" + thumb_id).innerHTML = " " + text_thumbs_up + "! ";} if(thumb_action==1){document.getElementById("thumb_alarm_" + thumb_id).innerHTML = " " + text_thumbs_down + ". ";} if(thumb_action==0){document.getElementById("thumb_alarm_" + thumb_id).innerHTML = " " + text_thumbs_flag + ". ";} } function thumb_0(thumb_id){ document.getElementById("thumb_alarm_" + thumb_id).innerHTML = ""; }