//QuickRating JS Functions

    var Rating = Array(6);
    function recentDLSkip( thisVersionID )
    { 
//        d = document.getElementById("recentDownlads");
		d = document.getElementsByName(thisVersionID)[0];

        if(confirm("are you sure"))
        {
            if(xmlhttp)
            {
                xmlhttpdo("/php/jsrpc.php?function=recentDLSkip&vid=" + thisVersionID);
            }
            else
            {
                jsrsdo("recentDLSkip", Array(thisVersionID))
            }
        }
    }
        
    function setStars( thisVersionID, rating, state )
    {
        if(state == 'full')
        {
            setStars( thisVersionID, 5, 'empty' );
        }
    
         for (i = 1; i <= rating; i++)
         {
            if (document.images) 
            {
                document[thisVersionID + '.' + i ].src = 'http://image.versiontracker.com/images/star' + state + '.gif';
            }
         }
    }
        
    function recentDLRate(thisVid, rating ) 
    {         
        d = document.getElementById("ScratchPad");
        d.innerHTML = 'Loading....';
        Rating['overall'] = rating;
        Rating['easeofuse'] = rating;
        Rating['support'] = rating;
        Rating['features'] = rating;
        Rating['quality'] = rating;
        Rating['price'] = rating;
        if(xmlhttp)
        {
            xmlhttpdo("/php/jsrpc.php?function=quickRateForm&vid=" + thisVid + '&rating=' + rating);
        }
        else
        {
            jsrsdo('quickRateForm', Array(thisVid, rating))
        }
        showElementFixed('ScratchPad', 40, 40);
    }
    
    function setValue(field, value)
    {
        Rating[field]=value;
    }
    
    function saveReview( docform )
    {
       // hideElement( 'ScratchPad' );
        if(xmlhttp)
        {
            xmlhttpdo("/php/jsrpc.php?function=saveQuickRate&vid=" + docform.form.vid.value);
        }
        else
        {
            jsrsdo('saveQuickRate', Array(docform.form.vid.value))
        }
        
        
    }
