function blank()
        {
            if(document.getElementById("q").value=="Search 7,650,583 Presentations")
            {
            document.getElementById("q").value="";
            }

        }

        function blank2()
        {
            document.getElementById("q").style.color="black";
            if(document.getElementById("q").value=="Search 7,650,583 Presentations")
            {
            document.getElementById("q").value="";
            }
        }

        function blank1()
        {
            if(document.getElementById("q").value=="")
            {
            document.getElementById("q").style.color="gray";
            document.getElementById("q").value="Search 7,650,583 Presentations";
            }

        }

function checksearch(a,b,c,e)
{
//alert(a);
document.getElementById(a).style.color="#8ccb31";
document.getElementById(b).style.color="black";
document.getElementById(c).style.color="black";
document.forms[0].HiddenField1.value=e;
//alert(document.getElementById("HiddenField1").Value)ctl00_header_HiddenField1;
}
function checksearchm(a,b,c,e)
{
//alert(a);
document.getElementById(a).style.color="#8ccb31";
document.getElementById(b).style.color="black";
document.getElementById(c).style.color="black";
document.getElementById("ctl00_Header_HiddenField1").value=e;
return false;
}
function checksearchm1(a,b,c,e)
{
//alert(a);
document.getElementById(a).style.color="#8ccb31";
document.getElementById(b).style.color="black";
document.getElementById(c).style.color="black";
document.getElementById("ctl00_HiddenField1").value=e;
return false;
}
function $(id)
{
return document.getElementById(id);
}

function upload(a)
{

    if(a=='medical')
    {

         $("ddlcategory").style.display="block";
         $("ddlpatientcategory").style.display="none";
         $("ddl_subcategory").style.display="none";
         $("patient").style.Checked="false";
         //ddl_subcategory
    }
    else
    {

         $("ddlcategory").style.display="none";
         $("ddlpatientcategory").style.display="block";
         $("ddl_subcategory").style.display="block";
         $("medical").style.display="false";
    }
}


function Visits(ArticleID,URL){
       //alert(ArticleID);
      //str='ajaxpage_get('DownloadCount_ajax.aspx?CHECKED=1&ArticleID='+ArticleID, 'sp_Enabledisablemember', '')';
       ajaxpage_get('DownloadCount_ajax.aspx?ArticleID='+ArticleID, 'sp_Enabledisablemember', '','');
      if(ArticleID==2451 )
       {
       window.open('ViewSlide1.aspx/'+URL,'slidesonline','status=no,width=550,height=530,scrollbars=yes,menubar=yes,resizable=yes,toolbar=yes');        
       }
        else if(ArticleID==5940 || ArticleID==197028)
       {
       window.open('Pathology Library.aspx?url='+URL,'slidesonline','status=no,width=550,height=530,scrollbars=yes,menubar=yes,resizable=yes,toolbar=yes');        
       }
       else
       {
       window.open('ViewSlides.aspx/'+URL,'slidesonline','status=no,width=550,height=530,scrollbars=yes,menubar=yes,resizable=yes,toolbar=yes');        
   }
   }
    
     function setRating(ArticleID,Rating, bit){
       for(i=0;i<5;i++)
        {
           var loop=i+1;
           var a=document.getElementById(ArticleID + "RatingIcon-" + loop );
           if(i<Rating){            
               a.className="icncuteon";             
             }else{
              a.className="icncuteoff";
            }
        }  
       
   ajaxpage_get('DownloadCount_ajax.aspx?Rating='+ Rating +'&ArticleID='+ArticleID, 'sp_Enabledisablemember', '','');
   
   } 
    function ViewInfo(Info)
         {                         
                          
//               
             
               div_ShowInfo.style.left = event.x + document.body.scrollLeft;
           	   var y=event.y;
           	   
           	   ScrollMonitor(y);         	           	   
               div_ShowInfo.innerHTML  =Info ;
               div_ShowInfo.style.display='block';  
               
         }
         
          function hidediv()
       {
            div_ShowInfo.style.display='none';  
            //alert('Info');
       }
       
        function ScrollMonitor( y)
        {
         // Find out how far the user has scrolled (method varies...)
                 var ScrollAmount;
                if (document.documentElement && document.documentElement.scrollTop){
                 // PC IE6 strict, Mac IE 5, Mac Firefox strict
                  ScrollAmount = document.documentElement.scrollTop;
                 }else if (document.body && document.body.scrollTop){
                  // Safari, PC IE6 trans, Mac Firefox trans                            
                  ScrollAmount = document.body.scrollTop;
                  //alert("safari");
                  //alert(ScrollAmount);
                  }else if (window.scrollY){ 
                    // Mozilla browsers (incl. Firefox and Safari) understand this one,
                    // though they've probably already got the value.
                    ScrollAmount = window.scrollY;
                    }
           
            div_ShowInfo.style.top = y;
        }