﻿/*--------------- check user login ---------------*/
        var xmlHttp;
        function userLogin()
        {
          //ShowLoadingMessage();
        try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          
          var emailid=document.getElementById("ctl00_txt_login_name").value;//user email
          var u_password=calcMD5(document.getElementById("ctl00_txt_login_password").value);//hash password
          
          
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
//               var div_left=document.getElementById("ctl00_Panel_login").style.left;
//               var div_top=document.getElementById("ctl00_Panel_login").style.top;
//               var div_width=document.getElementById("ctl00_Panel_login").offsetWidth;
//               var div_height=document.getElementById("ctl00_Panel_login").offsetHeight;
//               
//               document.getElementById("loading_div").style.display="";
//               document.getElementById("loading_div").style.top= div_top-div_height + "px";
//               document.getElementById("loading_div").style.left= div_left-div_width + "px";
               document.getElementById('ctl00_img_loading_login').style.display="";              
               document.getElementById('ctl00_Label_e').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('ctl00_img_loading_login').style.display ='none';
              
                if (xmlHttp.responseText=="yes")
               {
                 
                 document.getElementById('ctl00_Label_e').innerHTML = "Welcome to FusionSurface";
                 //alert(window.location.href);
                 window.location=window.location.href;
               }
               else
               {
                 
                 document.getElementById('ctl00_Label_e').innerHTML = "Sorry! information is wrong";
                 //document.getElementById("txt_email").focus();
               }
              }
            }
          xmlHttp.open("GET","handler/admin_login.ashx?user_id=" + emailid + "&user_pass=" + u_password,true);
          xmlHttp.send(null);
         }
     
     
     
     /* user news letter subscription */
     function insertNewsLetterMember()
     {
      var checkstatus = document.getElementById("newletter_status");
       var emailid=document.getElementById("ctl00_txt_subs_image").value;//user email
       var status = 1;
          
    if(emailid=="")
    {
     alert("Please enter your email address for newsletter subscribtion");
     document.getElementById("ctl00_txt_subs_image").focus();
    }
    else
    {
    
      if(checkstatus.checked==true)
      {           
      
      
      try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
      
      xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {

            }
            if(xmlHttp.readyState==4)
              {
               // document.getElementById('ctl00_img_loading_login').style.display ='none';
              
             
              
                if (xmlHttp.responseText=="yes")
               {
                 
                alert("you have successfully subscribed the news letter");
                // document.getElementById('ctl00_Label_e').innerHTML = "Welcome to FusionSurface";
                 //alert(window.location.href);
                 //window.location=window.location.href;
               }
               else if(xmlHttp.responseText=="registred")
               {
                 alert("you have already subscribed the news letter");
                 //document.getElementById('ctl00_Label_e').innerHTML = "Sorry! information is wrong";
                 //document.getElementById("txt_email").focus();
               }
              }
            }
          xmlHttp.open("GET","handler/news_letter_registration.ashx?email=" + emailid + "&status=" + status,true);
          xmlHttp.send(null);
      
      
      }
      }
     }
         
/*------------------------------------------user registration-----------------------------------------------*/
/*-----------1---------------*/
function registrationValidate()
{
    var status=""; 
    if (document.getElementById("txt_name").value!="")
    {
        status="no";
        document.getElementById("val_userName").value="user name";
        return status;
    }
    else if(echeck(document.getElementById("txt_email").value) == false)
    {
        status="no";
        document.getElementById("val_email").value="wrong e-mail id";
        return status;
    }
    else if(document.getElementById("txt_password").value=="") 
    {
        status="no";
        document.getElementById("val_password").value="wrong e-mail id";
        return status;
    }
    else if(document.getElementById("txt_password").value!=document.getElementById("txt_confirm_password").value)
    {
       status="no";
       return status; 
    }
    else
    {
        status="yes";
    }
    return status;
    
}

/*------------2--------------*/
function userRegistration()
{
    //var validate=registrationValidate();
    
//    if (validate=="yes")
//    {
          //ShowLoadingMessage();
        try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var uname = document.getElementById("ctl00_txt_name").value;
          var uemailid=document.getElementById("ctl00_txt_email").value;//user email
          var upassword=calcMD5(document.getElementById("ctl00_txt_password").value);//hash password
          var mylist=document.getElementById("ctl00_ddl_country");
          var ucountry=mylist.options[mylist.selectedIndex].text;
          var upermision=0;
          
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
               var div_left=document.getElementById("ctl00_Panel_registration").style.left;
               var div_top=document.getElementById("ctl00_Panel_registration").style.top;
               var div_width=document.getElementById("ctl00_Panel_registration").offsetWidth;
               var div_height=document.getElementById("ctl00_Panel_registration").offsetHeight;
               
               document.getElementById("loading_divR").style.display="";
               document.getElementById("loading_divR").style.top= div_top-div_height + "px";
               document.getElementById("loading_divR").style.left= div_left-div_width + "px";
              
               document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divR').style.display = 'none';
              
                if (xmlHttp.responseText=="yes")
               {
                 
                 document.getElementById('ctl00_Label_eR').innerHTML = "successfully registered";
                 document.getElementById("ctl00_txt_name").value="";
                 document.getElementById("ctl00_txt_email").value="";
                 document.getElementById("txt_confirm_password").value="";
                 
                 //alert(window.location.href);
                 //window.location=window.location.href;
               }
               else
               {
                 document.getElementById("ctl00_txt_name").value="";
                 document.getElementById("ctl00_txt_email").value="";
                 document.getElementById("txt_confirm_password").value="";
                 document.getElementById('ctl00_Label_eR').innerHTML = "Sorry! Try again";
                 //document.getElementById("txt_email").focus();
               }
              }
            }
          xmlHttp.open("GET","handler/user_registration.ashx?uname=" + uname + "&uemail=" + uemailid + "&upass=" + upassword + "&ucontry=" + ucountry + "&uper=" + upermision,true);
          xmlHttp.send(null);
    }
//    else
//    {
//    
//    }
//}
/*------------------------------------- fusion create user ---------------------------------------------*/
function fusionUserRegistration()
{
    //var validate=registrationValidate();
    
//    if (validate=="yes")
//    {
          //ShowLoadingMessage();
        try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var uname = document.getElementById("ctl00_ctl05_txt_name").value;
          var uemailid=document.getElementById("ctl00_ctl05_txt_email").value;//user email
          var upassword=calcMD5(document.getElementById("ctl00_ctl05_txt_password").value);//hash password
          var mylist=document.getElementById("ctl00_ctl05_ddl_country");
          var ucountry=mylist.options[mylist.selectedIndex].text;
          var upermision=1;
          
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
               var div_left=document.getElementById("admin_body_user").offsetLeft;
              var div_top=document.getElementById("admin_body_user").offsetTop;
              var div_width=document.getElementById("admin_body_user").offsetWidth;
              var div_height=document.getElementById("admin_body_user").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               document.getElementById('ctl00_ctl05_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
              
                if (xmlHttp.responseText!="no")
               {
                 
                 document.getElementById('ctl00_ctl05_Label_eR').innerHTML = "successfully registered";
                 document.getElementById("ctl00_ctl05_txt_name").value="";
                 document.getElementById("ctl00_ctl05_txt_email").value="";
                 document.getElementById("ctl00_ctl05_txt_confirm_password").value="";
                 document.getElementById('ctl00_ctl05_user_grid').innerHTML = xmlHttp.responseText;
                 
                 //alert(window.location.href);
                 //window.location=window.location.href;
               }
               else
               {
                 document.getElementById("ctl00_ctl05_txt_name").value="";
                 document.getElementById("ctl00_ctl05_txt_email").value="";
                 document.getElementById("ctl00_ctl05_txt_confirm_password").value="";
                 document.getElementById('ctl00_ctl05_Label_eR').innerHTML = "Sorry! Try again";
                 //document.getElementById("txt_email").focus();
               }
              }
            }
          xmlHttp.open("GET","handler/fusionUser.ashx?uname=" + uname + "&uemail=" + uemailid + "&upass=" + upassword + "&ucontry=" + ucountry + "&uper=" + upermision ,true);
          xmlHttp.send(null);
    }

//------------------ delete user ---------------//

function deleteUser(uid)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
                    
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_home").offsetLeft;
              var div_top=document.getElementById("admin_body_home").offsetTop;
              var div_width=document.getElementById("admin_body_home").offsetWidth;
              var div_height=document.getElementById("admin_body_home").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
              
                if (xmlHttp.responseText!="")
               {
                 
                 document.getElementById('ctl00_ctl05_user_grid').innerHTML = xmlHttp.responseText;
                 
               }
               else
               {
                 
               }
              }
            }
          xmlHttp.open("GET","handler/userModifier.ashx?m_type=1&u_id=" + uid,true);
          xmlHttp.send(null);
}
//------------------------------- modify user -----------------------------------//
function changeRoal(uid,e)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var chkUser=document.getElementById(e.id);
          var role_type;
          if (chkUser.checked==true) 
          {
            role_type=1;
          }
          else
          {
            role_type=0;
          }
                    
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_home").offsetLeft;
              var div_top=document.getElementById("admin_body_home").offsetTop;
              var div_width=document.getElementById("admin_body_home").offsetWidth;
              var div_height=document.getElementById("admin_body_home").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
              
                if (xmlHttp.responseText!="")
               {
                 
                 document.getElementById('ctl00_ctl05_user_grid').innerHTML = xmlHttp.responseText;
                 
               }
               else
               {
                 
               }
              }
            }
          xmlHttp.open("GET","handler/userModifier.ashx?m_type=2&u_id=" + uid + "&role_id=" + role_type,true);
          xmlHttp.send(null);
}

//----------------------------------------------------------------------------------------------//

//------------------------------- links and link groups ----------------------------------//

function insertLinkgroup()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var linkGroupName=document.getElementById("ctl00_ctl05_txt_newlinkgroup").value;    
                
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_link").offsetLeft;
              var div_top=document.getElementById("admin_body_link").offsetTop;
              var div_width=document.getElementById("admin_body_link").offsetWidth;
              var div_height=document.getElementById("admin_body_link").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                
                if (xmlHttp.responseText!="")
               {
                 var ddl=document.getElementById("ctl00_ctl05_ddl_linkGroup"); 
                 var ddl_txt = xmlHttp.responseText;
                 var mySplitResult = ddl_txt.split("|");
                 
                 //remove all nodes
                 while (ddl.childNodes[0])
                 {
                   ddl.removeChild(ddl.childNodes[0]);
                 }
                 //readd nodes         
                 for(i = 0; i < mySplitResult.length; i++)
                 {
                    
                     var opt=mySplitResult[i].split("^");
                     
                     var optn = document.createElement("OPTION");
                     optn.text = opt[1];
                     optn.value = opt[0];
                     ddl.options.add(optn);
                 }

               }
               else
               {
                 
               }
              }
            }
          xmlHttp.open("GET","handler/links.ashx?lg_name=" + linkGroupName + "&l_type=1",true);
          xmlHttp.send(null);
}

//----------------------------------------------------------------------------------------//

function insertLink()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var linkGroupID=document.getElementById("ctl00_ctl05_ddl_linkGroup").value;    
          var linkName=document.getElementById("ctl00_ctl05_linkname").value;
          var link=document.getElementById("ctl00_ctl05_url").value;
                
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_link").offsetLeft;
              var div_top=document.getElementById("admin_body_link").offsetTop;
              var div_width=document.getElementById("admin_body_link").offsetWidth;
              var div_height=document.getElementById("admin_body_link").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_linkname").value="";
                document.getElementById("ctl00_ctl05_url").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_linkCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/links.ashx?l_id=" + linkGroupID + "&l_name="+linkName+"&l_url=" + link + "&l_type=2",true);
          xmlHttp.send(null);
}

/*--------------------------------------------------------------------------------------------------*/

function deleteLink(linkID)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
                          
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_link").offsetLeft;
              var div_top=document.getElementById("admin_body_link").offsetTop;
              var div_width=document.getElementById("admin_body_link").offsetWidth;
              var div_height=document.getElementById("admin_body_link").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_linkname").value="";
                document.getElementById("ctl00_ctl05_url").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_linkCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/links.ashx?l_id=" + linkID + "&l_type=3",true);
          xmlHttp.send(null);
}

/***************************************** show ***********************************************/

function insertShow()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var show_tit=document.getElementById("ctl00_ctl05_txt_showName").value;    
          var show_desc=document.getElementById("ctl00_ctl05_txt_showDesc_ifr").contentWindow.document.body.innerHTML;
          var show_dt=document.getElementById("ctl00_ctl05_txt_showDate").value;
                
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (ymlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_shows").offsetLeft;
              var div_top=document.getElementById("admin_body_shows").offsetTop;
              var div_width=document.getElementById("admin_body_shows").offsetWidth;
              var div_height=document.getElementById("admin_body_shows").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_txt_showName").value="";
                document.getElementById("ctl00_ctl05_txt_showDesc_ifr").contentWindow.document.body.innerHTML="";
                document.getElementById("ctl00_ctl05_txt_showDate").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_showCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/show.ashx?show_tit=" + show_tit + "&show_desc=" + show_desc + "&show_dt=" + show_dt + "&show_type=1",true);
          xmlHttp.send(null);
}

/*-------------------------------------------------------------------------------------------*/
function deleteShow(show_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
                
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_shows").offsetLeft;
              var div_top=document.getElementById("admin_body_shows").offsetTop;
              var div_width=document.getElementById("admin_body_shows").offsetWidth;
              var div_height=document.getElementById("admin_body_shows").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_txt_showName").value="";
                document.getElementById("ctl00_ctl05_txt_showDesc").value="";
                document.getElementById("ctl00_ctl05_txt_showDate").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_showCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/show.ashx?show_id=" + show_id + "&show_type=2",true);
          xmlHttp.send(null);
}



/********************************** Notes **********************************/
function insertNotes()
{
    
    ///var editor = new FCKeditor("txt_noteDesc");

// ... Then later, to get the value
  
 
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var c_date=new Date();  
          
          var note_tit=document.getElementById("ctl00_ctl05_txt_noteTitle").value;  
          var inst = FCKeditorAPI.GetInstance("ctl00_ctl05_txt_noteDesc");
          var note_desc = inst.GetHTML();  
         // var note_desc=document.getElementById("ctl00_ctl05_txt_noteDesc").value;
          var note_dt=c_date.getDate();   
          
            
           //alert(note_desc); 
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_notes").offsetLeft;
              var div_top=document.getElementById("admin_body_notes").offsetTop;
              var div_width=document.getElementById("admin_body_notes").offsetWidth;
              var div_height=document.getElementById("admin_body_notes").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_txt_noteTitle").value="";
                inst.SetHTML('');
                //document.getElementById("ctl00_ctl05_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
					//alert(xmlHttp.responseText);
                    document.getElementById("ctl00_ctl05_div_notesCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/notes.ashx?note_tit=" + note_tit + "&note_desc=" + note_desc + "&note_dt=" + note_dt + "&b_type=1",true);
          xmlHttp.send(null);
}





function deleteNotes(note_id)
{
     
     
       var inst = FCKeditorAPI.GetInstance("ctl00_ctl05_txt_noteDesc");
     try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_notes").offsetLeft;
              var div_top=document.getElementById("admin_body_notes").offsetTop;
              var div_width=document.getElementById("admin_body_notes").offsetWidth;
              var div_height=document.getElementById("admin_body_notes").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
               document.getElementById("ctl00_ctl05_txt_noteTitle").value="";
                inst.SetHTML('');
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_notesCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/notes.ashx?note_id=" + note_id + "&b_type=2",true);
          xmlHttp.send(null);
}




/*---------------------------------------------------------------------------------------------*/
function editNotesTopics(id,fid,lblid)
{


    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var editor= "ctl00_CPH_body_Repeater1_ct"+fid+"_description";
         
          
          //making iframe id
          var inst = FCKeditorAPI.GetInstance(editor);
          var note_desc = inst.GetHTML();
          
                     
//          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
          {
            if (xmlHttp.readyState==1)
            {
                //document.getElementById(lbl_id).innerHTML="Loading.........";
            }
            if(xmlHttp.readyState==4)
              {
                if (xmlHttp.responseText!="")
                {
                    document.getElementById(lblid).innerHTML=xmlHttp.responseText;
                }
              }
           }
          xmlHttp.open("GET","handler/notes.ashx?note_id=" + id + "&note_desc=" + note_desc + "&b_type=3",true);
          xmlHttp.send(null);

}








/********************************** Notes **********************************/















/********************************** Blog **********************************/

function insertBlog()
{
    
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var c_date=new Date();  
          
          var blog_tit=document.getElementById("ctl00_ctl05_txt_blogName").value;    
          var blog_desc=document.getElementById("ctl00_ctl05_txt_blogDesc_ifr").contentWindow.document.body.innerHTML;
           var blog_dt=c_date.format("MM/dd/yyyy");  
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_blog").offsetLeft;
              var div_top=document.getElementById("admin_body_blog").offsetTop;
              var div_width=document.getElementById("admin_body_blog").offsetWidth;
              var div_height=document.getElementById("admin_body_blog").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_txt_blogName").value="";
                document.getElementById("ctl00_ctl05_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
					alert(xmlHttp.responseText);
                    document.getElementById("ctl00_ctl05_div_blogCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/blog.ashx?blog_tit=" + blog_tit + "&blog_desc=" + blog_desc + "&blog_dt=" + blog_dt + "&b_type=1",true);
          xmlHttp.send(null);
}

/*-------------------------------------------------------------------------------------------------------*/

function deleteBlog(blog_id)
{
     try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_blog").offsetLeft;
              var div_top=document.getElementById("admin_body_blog").offsetTop;
              var div_width=document.getElementById("admin_body_blog").offsetWidth;
              var div_height=document.getElementById("admin_body_blog").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                //document.getElementById("ctl00_ctl05_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl05_txt_blogName").value="";
                document.getElementById("ctl00_ctl05_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_blogCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/blog.ashx?blog_id=" + blog_id + "&b_type=2",true);
          xmlHttp.send(null);
}
/*---------------------------------------------------------------------------------------------*/
function editBlogTopics(id,txt_id,lbl_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var editor= "ctl00_CPH_body_Repeater1_ct"+txt_id+"_description";
         
          
          //making iframe id
          var inst = FCKeditorAPI.GetInstance(editor);
          var blog_Topicsdesc = inst.GetHTML();
            
          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
          {
            if (xmlHttp.readyState==1)
            {
                document.getElementById(lbl_id).innerHTML="Loading.........";
            }
            if(xmlHttp.readyState==4)
              {
                if (xmlHttp.responseText!="")
                {
                    document.getElementById(lbl_id).innerHTML=xmlHttp.responseText;
                }
              }
           }
          xmlHttp.open("GET","handler/blog.ashx?blog_id=" + id + "&blog_desc=" + blog_Topicsdesc + "&b_type=3",true);
          xmlHttp.send(null);
}

/**************************************** video ************************************************/

function deleteVideo(video_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_video").offsetLeft;
              var div_top=document.getElementById("admin_body_video").offsetTop;
              var div_width=document.getElementById("admin_body_video").offsetWidth;
              var div_height=eocument.getElementById("admin_body_video").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_videoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/video.ashx?video_id=" + video_id + "&v_type=1",true);
          xmlHttp.send(null);
}
/*-----------------------------------------------------------------------------------------*/

function selectVideos()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_video").offsetLeft;
              var div_top=document.getElementById("admin_body_video").offsetTop;
              var div_width=document.getElementById("admin_body_video").offsetWidth;
              var div_height=document.getElementById("admin_body_video").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_videoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/video.ashx?v_type=3",true);
          xmlHttp.send(null);
}
/*-----------------------------------------------------------------------------------------*/

function playVideo(v_url)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
               document.getElementById("ctl00_CPH_body_Label_video").innerHTML="<img src='images/vdol.jpg' />";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_CPH_body_Label_video").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/video.ashx?video_url=" + v_url + "&v_type=2",true);
          xmlHttp.send(null);
}

/*********************************** day in life **************************************/

function deleteDIF(dif_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_daylife").offsetLeft;
              var div_top=document.getElementById("admin_body_daylife").offsetTop;
              var div_width=document.getElementById("admin_body_daylife").offsetWidth;
              var div_height=document.getElementById("admin_body_daylife").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_dayinlifeCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/dayinlife.ashx?dif_id=" + dif_id + "&dif_type=1",true);
          xmlHttp.send(null);
   }
 /*------------------------------------------------------------------------------------------------*/
 function selectDayInlife()
 {
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_daylife").offsetLeft;
              var div_top=document.getElementById("admin_body_daylife").offsetTop;
              var div_width=document.getElementById("admin_body_daylife").offsetWidth;
              var div_height=document.getElementById("admin_body_daylife").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_dayinlifeCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/dayinlife.ashx?dif_type=3",true);
          xmlHttp.send(null);
 }
   
/*-------------------------------------------------------------------------------------------------------*/
   function playDIFVideo(v_url)
    {
        try
              {
              // Firefox, Opera 8.0+, Safari
              xmlHttp=new XMLHttpRequest();
              }
            catch (e)
              {
              // Internet Explorer
              try
                {
                xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
                }
              catch (e)
                {
                try
                  {
                  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
                  }
                catch (e)
                  {
                  alert("Your browser does not support AJAX!");
                  return false;
                  }
                }
              }
              

              //alert(emailid + "***" + u_password);
              xmlHttp.onreadystatechange=function()
                {
                if (xmlHttp.readyState==1)
                {
                   document.getElementById("ctl00_CPH_body_Label_video").innerHTML="<img src='images/vdol.jpg' />";
                  
                   //document.getElementById('ctl00_Label_eR').innerHTML=""; 
                }
                if(xmlHttp.readyState==4)
                  {
                    if (xmlHttp.responseText!="")
                    {
                        document.getElementById("ctl00_CPH_body_Label_video").innerHTML=xmlHttp.responseText;
                    }
                  }
                }
              xmlHttp.open("GET","handler/dayinlife.ashx?video_url=" + v_url + "&dif_type=2",true);
              xmlHttp.send(null);
    }

/************************************** music *****************************************/

function deleteMusic(music_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_video").offsetLeft;
              var div_top=document.getElementById("admin_body_video").offsetTop;
              var div_width=document.getElementById("admin_body_video").offsetWidth;
              var div_height=document.getElementById("admin_body_video").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_musicCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/music.ashx?music_id=" + music_id + "&m_type=1",true);
          xmlHttp.send(null);
}
/*---------------------------------------------------------------------------------------------*/
function selectMusic()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_video").offsetLeft;
              var div_top=document.getElementById("admin_body_video").offsetTop;
              var div_width=document.getElementById("admin_body_video").offsetWidth;
              var div_height=document.getElementById("admin_body_video").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_musicCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/music.ashx?m_type=3",true);
          xmlHttp.send(null);
}
/*---------------------------------------------------------------------------------------------*/
function playMusic(m_url)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
               //document.getElementById("ctl00_CPH_body_Label_mPlayer").innerHTML="<img src='images/loading_mplayer.jpg' />";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                if (xmlHttp.responseText!="")
                {                    
                    document.getElementById("Label_mPlayer").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/music.ashx?m_url=" + m_url + "&m_type=2",true);
          xmlHttp.send(null);
}

/*************************************** photo section *****************************************/

function deletePhoto(p_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_photoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/photo.ashx?p_id=" + p_id + "&p_type=1",true);
          xmlHttp.send(null);
}
/*-------------------------------------------------------------------------------------------------*/
function selectAllPhoto()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_photoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/photo.ashx?p_type=2",true);
          xmlHttp.send(null);
}


/******************************************** event **************************************************/

function deleteEvent(e_id)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_event").offsetLeft;
              var div_top=document.getElementById("admin_body_event").offsetTop;
              var div_width=document.getElementById("admin_body_event").offsetWidth;
              var div_height=document.getElementById("admin_body_event").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_EventCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/events.ashx?e_id=" + e_id + "&e_type=1",true);
          xmlHttp.send(null);
}

/*----------------------------------------------------------------------------------------------------*/

function selectEvent()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_event").offsetLeft;
              var div_top=document.getElementById("admin_body_event").offsetTop;
              var div_width=document.getElementById("admin_body_event").offsetWidth;
              var div_height=document.getElementById("admin_body_event").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_EventCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/events.ashx?e_type=2",true);
          xmlHttp.send(null);
}

/**********************************page title********************************/

function changePageTitle(p_name)
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          
          var pageTitle=document.getElementById('ctl00_pageHandler1_txt_pageTitle').value;
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
               document.getElementById('ctl00_pageHandler1_Label_err').innerHTML="<img src='images/small_loader.gif' />"; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('ctl00_pageHandler1_Label_err').innerHTML = xmlHttp.responseText;
               
              }
            }
          xmlHttp.open("GET","handler/pageTitle.ashx?page_type=1" + "&page_name=" + p_name + "&page_title=" + pageTitle,true);
          xmlHttp.send(null);
}

/********************************** documents ********************************/

function selectAlldocuments()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_documentCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/documents.ashx?p_type=1",true);
          xmlHttp.send(null);
}


function deleteDocuments(p_id)
{
   
  
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                document.getElementById("ctl00_ctl05_div_documentCollections").innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
                
                    document.getElementById("ctl00_ctl05_div_documentCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/documents.ashx?p_id=" + p_id + "&p_type=2",true);
          xmlHttp.send(null);
}


/********************************** presentations ********************************/

function deletePresentations(p_id)
{
   
  
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/presentation.ashx?p_id=" + p_id + "&p_type=1",true);
          xmlHttp.send(null);
}

function selectAllPresentations()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/presentation.ashx?p_type=2",true);
          xmlHttp.send(null);
}



function delete_Page_image(p_id)
{
   
  
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_imageCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/page_images.ashx?p_id=" + p_id + "&p_type=1",true);
          xmlHttp.send(null);
}



function selectAllPageImages()
{
    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            if (xmlHttp.readyState==1)
            {
              var div_left=document.getElementById("admin_body_photo").offsetLeft;
              var div_top=document.getElementById("admin_body_photo").offsetTop;
              var div_width=document.getElementById("admin_body_photo").offsetWidth;
              var div_height=document.getElementById("admin_body_photo").offsetHeight;
              
              document.getElementById("loading_divAdmin").style.display="";
              document.getElementById("loading_divAdmin").style.top= div_top + "px";
              document.getElementById("loading_divAdmin").style.left= div_left + "px";
              
               //document.getElementById('ctl00_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl05_div_imageCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/page_images.ashx?p_type=2",true);
          xmlHttp.send(null);
}








function add_notes_caleder(datevalue)
{


    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            
            if(xmlHttp.readyState==4)
              {
                               
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("innertext").innerHTML=xmlHttp.responseText;
                    setVisible('layer1',true);
                }
              }
            }
          xmlHttp.open("GET","handler/calendar_notes.ashx?p_type=1&dvalue="+datevalue,true);
          xmlHttp.send(null);
}


function insert_notes_caleder(datevalue)
{

var comments;
comments = document.getElementById("day_notes").value;

    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            
            if(xmlHttp.readyState==4)
              {
                setVisible('layer1');
                               
                if (xmlHttp.responseText!="")
                {
                  
                    //document.getElementById("innertext").innerHTML=xmlHttp.responseText;
                    //setVisible('layer1',true);
                }
              }
            }
          xmlHttp.open("GET","handler/calendar_notes.ashx?p_type=2&notes="+comments+"&dvalue="+datevalue,true);
          xmlHttp.send(null);
}


function select_add_notes_caleder(datevalue)
{


    try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            
            if(xmlHttp.readyState==4)
              {
                               
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("innertext").innerHTML=xmlHttp.responseText;
                    setVisible('layer1',true);
                }
              }
            }
          xmlHttp.open("GET","handler/calendar_notes.ashx?p_type=3&dvalue="+datevalue,true);
          xmlHttp.send(null);
}

function show_documents(p_id)
{
  
  //alert(p_id);
  
  try
          {
          // Firefox, Opera 8.0+, Safari
          xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
            try
              {
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            catch (e)
              {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
          

          //alert(emailid + "***" + u_password);
          xmlHttp.onreadystatechange=function()
            {
            
            if(xmlHttp.readyState==4)
              {
                               
                if (xmlHttp.responseText!="")
                {
                
                 document.getElementById("innertext1").innerHTML=xmlHttp.responseText;
                
                    //document.getElementById("ctl00_ctl05_div_documentCollections").innerHTML=xmlHttp.responseText;
               setVisible2('layer2');
               
                }
              }
            }
          xmlHttp.open("GET","handler/documents.ashx?p_id=" + p_id + "&p_type=3",true);
          xmlHttp.send(null);
  
  
  
}