﻿// JScript File
var url = "http://localhost:3321/FaveBits";
var poppDiv;
var poppDivIndex;

    function udefame(storyID,index)
    {
    
        //Call Server Side Function
        Anthem_InvokePageMethod(
            'AnthemCallBack',
            [storyID],
            function (result){
                if (parseInt(result.value,10) != 0 )        
                document.getElementById("diggs-span" + context).innerHTML = result.value;  
            }
        );
        
        document.getElementById("ul" + index).style.display = "none";
        var index1 = (index%10) + 2;
        if (parseInt(index1,10) < 10) index1 = "0" + index1;   
            document.getElementById("ctl00_PageContents_gvStories_ctl"+ index1 +"_anthemlnkbtn").innerHTML = "defamed"; 
            document.getElementById("ctl00_PageContents_gvStories_ctl"+ index1 +"_anthemlnkbtn").style.color = "gray";
        try{
                document.getElementById("ctl00_PageContents_gvStories_ctl"+ index1 +"_anthemlnkbtn").style.display = "none";
        }
        catch(e){
        }
        document.getElementById("enclosure"+ index).className = "Tutorials-summary-derated";
        document.getElementById("outer-fame"+ index).className = "outter1";
    }
    
function poppd(index){
   
   if (poppDiv == true)
   {
       document.getElementById("poppDiv"+poppDivIndex).parentNode.removeChild(document.getElementById("poppDiv"+poppDivIndex));
   }
      poppDiv = true;
      poppDivIndex = index;
      
       document.getElementById("enclosure"+ index).style.position = "relative"      ;
        document.getElementById("enclosure"+ index).innerHTML +='<div id="poppDiv'+index+'" class="inline-warning"><div><p><strong>Make your vote count!</strong> To RateTutorials, <a href="'+ url +'/login.html?returnurl='+ window.location +'">login</a> or <a href="register.html">join RateTutorials</a> for free.</p><a href="javascript:unpopp('+index+')"><img src="'+ url +'/images/misc/close.gif" class="close" width="22" height="22" alt="Close" /></a></div></div>';return(false)
    
    }
    
function unpopp(index)
{
    poppDiv = false;
    document.getElementById("poppDiv"+index).parentNode.removeChild(document.getElementById("poppDiv"+index));
 }

