function toggleRatingSummary(element,userID,rating,type){if(document.getElementById('rs-d-'+rating+'|'+type)){if(document.getElementById('rs-d-'+rating+'|'+type).innerHTML==""){element.innerHTML="<img src='/images/collapse.gif' border='0' height='10' width='10' />";loadRatingSummary(userID,rating,type);}else{element.innerHTML="<img src='/images/expand.gif' border='0' height='10' width='10' />";document.getElementById('rs-d-'+rating+'|'+type).innerHTML=""}}}loadRatingSummaryID=0;function loadRatingSummary(userID,rating,type){if(loadRatingSummaryID==0){loadRatingSummaryID=rating+'|'+type;var params=null;ratingsummary_loading();loadXMLDoc("GET","/ws/UserRatingSummary.smile?uid="+userID+"&rating="+rating+"&type="+type,params,ratingsummary_load_done);return false}else{alert('Please wait. We are still processing your previous request.');}}function ratingsummary_loading(){window.status="loading...";document.getElementById('rs-d-'+loadRatingSummaryID).innerHTML="loading..."}function ratingsummary_load_done(){if(req.readyState==4){window.status="";if(req.status==200&&req.responseText.indexOf('FAILED')!=0){if(loadRatingSummaryID.indexOf('|1')>-1){buildUserCompactHTML(document.getElementById('rs-d-'+loadRatingSummaryID),req.responseText,8);}else document.getElementById('rs-d-'+loadRatingSummaryID).innerHTML=req.responseText;loadRatingSummaryID=0}else{alert('We\'re sorry, an unknown error has occurred while processing your request.');loadRatingSummaryID=0}}}