﻿  function showmore(Tableid)
    {
        Tableid = Tableid.replace("_link","_less")
        document.getElementById(Tableid).style.display = 'none';
        var s = Tableid;
        s = s.replace("_less","_more")
        document.getElementById(s).style.display = 'block';
    }
    function showless(Tableid)
    {
        Tableid = Tableid.replace("hide","_more")
        document.getElementById(Tableid).style.display = 'none';
        var s = Tableid;
        s = s.replace("_more","_less")
        document.getElementById(s).style.display = 'block';
    }
   
   
   function openNewWindow()
    {
      //window.open("../crm-answer-site/AskQuestion.aspx","AskQuestionstion","width=500,height=250,left=700,top=200")
      window.open('AskQuestion.aspx', 'AskQuestion','width=580,height=530,left=230,top=80,resizable=no,copyhistory=no,toolbar=no,status=no,menubar=no,scrollbars=yes,location=no');
    }
     
   


   
   //this is the function writtened to select row event of the answer center page, where the user can see the blog
        function RowSelected(row,Getting_title)
          {
           var str = new String();
           //blog id it the unique id of the row which was returned when the user wants to see the particualr line
           blogId = row.KeyValues["UniqueId"];
           //var Getting_Url = '../crm-answer-site/Default3.aspx?blogId='+blogId;
          // window.open('../DynamicsExchange-Info/final_NewsLetter.aspx? _get_url=' + Getting_Url + '& _get_title=' + Getting_title + '& pagename=CRM-Answer-Center-Wiki','mywindow','width=300,height=300,left=300,top=50,status=1,scrollbars=yes,addressbar=true ,resizable=no');
           window.open("Default3.aspx?blogId="+blogId,'Editing','width=300,height=300,left=300,top=50,status=1,scrollbars=yes,addressbar=true ,resizable=no');
          }
       //function to call lpopup window of enterxml page
      function CallEnterXmlfunction()
        {
            //this is the function to open a new popup window to enter the data by the user into answer center wiki page
          window.open("enterxml.aspx","mywindow","status=0,scrollbars=0,width=600,height=420,copyhistory=0,toolbar=0,menubar=0,resizable=0");
         }
     
        
//     function change(obj,nid)
//    {
//     obj.className=nid;
//    }



   
         var googlewin = null;
            function mypopup(a,b)
         {
        //   mywindow = window.open ("http://www.javascript-coder.com",
        //  "mywindow","location=1,status=1,scrollbars=1,
        //  width=100,height=100");
        //  mywindow.moveTo(0,0);
           
         //alert(b); 
        // c = c+1;
        // t = setTimeout("mypopup("+a+","+b+")",1000);
        // if(c==5)
        // {  
        //c=0;
        //window.alert("Hi");
        
         //googlewin = dhtmlwindow.open("dynamicsexchange","iframe","../Knowledgebase/PopupRating.aspx?Tableid="+a+"&Caption="+b+"&tablename=CrmAnswerCenter","Please rate this resource","width=260px,height=140px,resize=0,scrolling=0,center=1","recal");
         //googlewin.moveTo(screenLeft,screenTop);
         //googlewin.moveTo(175,300);
         
         
         //googlewin.style.position(575,700)
        // }
         }
//         function VerifyingUser(blogId, Getting_title)
//            {
//              var Getting_Url = '../crm-answer-site/Default3.aspx?blogId='+blogId;
//              window.open("../DynamicsExchange-Info/final_NewsLetter.aspx? _get_url=" + escape(Getting_Url) + "& _get_title=" + Getting_title + "& pagename=CRM-Answer-Center","mywindow","width=900,height=600,left=250,top=90,status=1,scrollbars=yes,addressbar=true,resizable=no");
//             // window.open("Default3.aspx?blogId="+blogId,'Editing','width=300,height=300,left=300,top=50,status=1,scrollbars=yes,addressbar=true ,resizable=no');
//            }	
         function VerifyingUser(TableID)
            {
               var TableName = "CrmAnswerCenter";
               window.open('../DynamicsExchange-Info/SendMail.aspx? _get_url=' + TableID + '& _get_title=' + TableName + '& pagename=CRM-Answer-Center','mywindow','width=1050,height=600,mywindow.moveTo(0,0),status=1,scrollbars=yes,addressbar=true ,resizable=yes');
            }
