﻿
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=[CrmBlogCenter]","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(TableID)
    {
       var TableName = "[CrmBlogCenter]";
       window.open('../DynamicsExchange-Info/SendMail.aspx? _get_url=' + TableID + '& _get_title=' + TableName + '& pagename=CRM-Blog-Center','mywindow','width=1050,height=600,mywindow.moveTo(0,0),status=1,scrollbars=yes,addressbar=true ,resizable=yes');
    }	
    function clearCheck(cb) {
        
        var cbid = cb.id;
      
        
        var checked = cb.checked;
        var coloum = cbid.split('_')[4];
        var inputCollection = document.getElementsByTagName('input');
        for (i = 0; i < inputCollection.length; i++) {
            if (inputCollection[i].type == 'checkbox') {
                if (inputCollection[i].id.indexOf(coloum) > -1) {
                    
                    inputCollection[i].checked = false;

                }
            }
            
        }
        
        cb.checked = checked;
        
    }
    function PreChaClass(classification) {
        window.open("../crm-blog-center/PreCha.aspx?Classification=" + classification, "PresetChannel", "width=800,height=600,scrollbars=yes");
        return false;
    }
    function search() {

        var id = '<% =tbSearch.ClientID%>';
        var tbSearch = document.getElementById(id);
        if (tbSearch.value != '') {
            window.location = "Search.aspx?q=" + tbSearch.value;
        }
        else {
            alert('Please enter text to be searched');
        }         
        return false;
    }


