
function doLinkLibrary(sLinkID,bPop){
    if(bPop=="True"){
        window.open("/LinkLibrary/linkEntry.aspx?linkid=" + sLinkID,"","width=600,height=500,toolbar,menubar,scrollbars,resizable,location");
    }
    else{
        location.href = "/LinkLibrary/linkEntry.aspx?linkid=" + sLinkID;
    }
}

function popRating(sUID,sRatingDropID){
    if(document.getElementById("drop" + sUID).value=="0"){
        alert("Select a rating.");
        document.getElementById("drop" + sUID).focus();
    }
    else{
        if(sServerVar.indexOf("category.aspx") > -1){
            location.href = sServerVar+ "?mode=insertRating&slinkid=" + sUID + "&sRatingDropID=" + document.getElementById(sRatingDropID).value + "&categoryid=" + document.getElementById("categoryid").value;
        }
        else if(sServerVar.indexOf("results.aspx") > -1){
            location.href = sServerVar+ "?mode=insertRating&slinkid=" + sUID + "&sRatingDropID=" + document.getElementById(sRatingDropID).value + "&uidParentCategory=" + document.getElementById("uidParentCategory").value + "&uidCategory=" + document.getElementById("uidCategory").value + "&hSearchText=" + document.getElementById("hSearchText").value; 
        }
        else{
            location.href = sServerVar+ "?mode=insertRating&slinkid=" + sUID + "&sRatingDropID=" + document.getElementById(sRatingDropID).value
        }
    }
}

function popEmailLink(sURL){
    window.open("/LinkLibrary/emailLink/emailForm.aspx?surl=" + sURL,"","top=10,left=10,width=365,height=480");
}

