﻿// grr include our common.js if it's not here, this is because common.js IS here if you're logged in and we need GetClientId
if (typeof GetClientId == 'undefined') {
    document.write(unescape("%3Cscript src='/Include/JS/common.js' type='text/javascript'%3E%3C/script%3E"));
}

function getRateImage(intID, strAction, strHTTP, strURL) {
    var strImage
    //Images link will not work if this page is called from the sub levels.
    if (strAction == 'IN') {
        strImage = strHTTP + '//' + strURL + '/images/starInput.gif';
    }
    else {
        strImage = strHTTP + '//' + strURL + '/images/starOff.gif';
    }

    for (var i = 1; i < 6; i++) {
        if (i <= intID) {
            document.getElementById(GetClientId('imgRate' + i)).src = strImage;
        }
    }
}

function ratePage(intValue, ArticleID, FolderID, URLID, strHTTP, strURL) {
    window.open(strHTTP + '//' + strURL + '/RatingResults.aspx?V=' + intValue + '&AID=' + ArticleID + '&FID=' + FolderID + '&U=' + URLID, 'PageRate', 'HEIGHT=280,WIDTH=320,TOOLBAR=NO,SCROLLBARS=NO');
}

