﻿// JScript File

        myWait_com = "<IMG SRC='../../images/icons/please_wait.gif' align='center' ALT='' border='0'>"

        function openCommunities(myDiv){
        

            if (document.getElementById(myDiv).style.display == "none"){
            
                document.getElementById("community_plus").innerHTML = "-"
                
           }
           else
           {
           
                document.getElementById("community_plus").innerHTML = "+"
                
           } 

            document.getElementById(myDiv).style.display = (document.getElementById(myDiv).style.display == "none") ? "inline" : "none";

        }

       function sendBlogAssociationsDetails(myBlogId, myCommunityId, myCommunityType, myCommunityName, actionType){
       
       
                               var javaWords = document.getElementById("java_words").value; 
                               var myRegExp2 = new RegExp(/\|/)
                               javaWords_array = javaWords.split(myRegExp2);   
           
          if (actionType == 'd'){
          
                 if (confirm(javaWords_array[0])) {
                 //alert("yes")
                    UseCallback_blog_association(myBlogId + "|" + myCommunityId + "|" + myCommunityType + "|d");
                 } 
                 else 
                 {
                 //alert("no")
                 }          
          }
          else
          {
           
                 if (confirm(javaWords_array[1] + " " + myCommunityName + "?")) {
                 
                    document.getElementById(myCommunityId + "|" + myCommunityType).innerHTML = myWait_com;
                 //alert("yes")
                    UseCallback_blog_association(myBlogId + "|" + myCommunityId + "|" + myCommunityType + "|a");
                 } 
                 else 
                 {
                 //alert("no")
                 }
          }
        }
      

       function returnBlogAssociationFromServer(TotalStr, context){
              //  alert(TotalStr)
                var myRegExp = new RegExp(/\`/)
                var myTotal = TotalStr;
                myTotalArray = myTotal.split(myRegExp);   
       
                if (myTotalArray[0] == "d") {
                
                        var a = window.location.href                    
                        window.location.href = a
                
                }
                else{
                
                
                    document.getElementById(myTotalArray[1] ).innerHTML = "";
                
                }
       
       }
