﻿/*--------------- 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 emailid=document.getElementById("txt_subs_image").value;//user email
      var name=document.getElementById("txt_subs_name").value;//user email
       var status = 1;
          
    if(emailid=="")
    {
     alert("Please enter your email address for newsletter subscribtion");
     document.getElementById("txt_subs_image").focus();
    }
    else
    {
    
      
      
      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';
              
            //alert(xmlHttp.responseText);
              
                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 + "&name=" + name,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_ctl01_txt_name").value;
          var uemailid=document.getElementById("ctl00_ctl01_txt_email").value;//user email
          var upassword=calcMD5(document.getElementById("ctl00_ctl01_txt_password").value);//hash password
          var mylist=document.getElementById("ctl00_ctl01_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_ctl01_Label_eR').innerHTML=""; 
            }
            if(xmlHttp.readyState==4)
              {
                document.getElementById('loading_divAdmin').style.display = 'none';
              
                if (xmlHttp.responseText!="no")
               {
                 
                 document.getElementById('ctl00_ctl01_Label_eR').innerHTML = "successfully registered";
                 document.getElementById("ctl00_ctl01_txt_name").value="";
                 document.getElementById("ctl00_ctl01_txt_email").value="";
                 document.getElementById("ctl00_ctl01_txt_confirm_password").value="";
                 document.getElementById('ctl00_ctl01_user_grid').innerHTML = xmlHttp.responseText;
                 
                 //alert(window.location.href);
                 //window.location=window.location.href;
               }
               else
               {
                 document.getElementById("ctl00_ctl01_txt_name").value="";
                 document.getElementById("ctl00_ctl01_txt_email").value="";
                 document.getElementById("ctl00_ctl01_txt_confirm_password").value="";
                 document.getElementById('ctl00_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_txt_newlinkgroup").value="";
                
                if (xmlHttp.responseText!="")
               {
                 var ddl=document.getElementById("ctl00_ctl01_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_ctl01_ddl_linkGroup").value;    
          var linkName=document.getElementById("ctl00_ctl01_linkname").value;
          var link=document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_linkname").value="";
                document.getElementById("ctl00_ctl01_url").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_linkname").value="";
                document.getElementById("ctl00_ctl01_url").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_showName").value;    
          var show_desc=document.getElementById("ctl00_ctl01_txt_showDesc_ifr").contentWindow.document.body.innerHTML;
          var show_dt=document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_txt_showName").value="";
                document.getElementById("ctl00_ctl01_txt_showDesc_ifr").contentWindow.document.body.innerHTML="";
                document.getElementById("ctl00_ctl01_txt_showDate").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_txt_showName").value="";
                document.getElementById("ctl00_ctl01_txt_showDesc").value="";
                document.getElementById("ctl00_ctl01_txt_showDate").value="";
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_noteTitle").value; 
          
          var note_desc = document.getElementById("ctl00_ctl01_category_type").value;  
         // var note_desc=document.getElementById("ctl00_ctl01_txt_noteDesc").value;
          var note_dt=document.getElementById("ctl00_ctl01_txt_postdate").value;  ;   
          
            
           //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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_txt_noteTitle").value="";
                
                //document.getElementById("ctl00_ctl01_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
					//alert(xmlHttp.responseText);
                    document.getElementById("ctl00_ctl01_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)
{
     
     
       
     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_ctl01_txt_noteTitle").value="";
                
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_blogName").value;    
          var blog_desc=document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_txt_blogName").value="";
                document.getElementById("ctl00_ctl01_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
					alert(xmlHttp.responseText);
                    document.getElementById("ctl00_ctl01_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_ctl01_txt_newlinkgroup").value="";
                document.getElementById("ctl00_ctl01_txt_blogName").value="";
                document.getElementById("ctl00_ctl01_txt_blogDesc_ifr").contentWindow.document.body.innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_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_ctl01_div_documentCollections").innerHTML="";
                
                if (xmlHttp.responseText!="")
                {
                
                    document.getElementById("ctl00_ctl01_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_ctl01_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_ctl01_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/presentation.ashx?p_type=2",true);
          xmlHttp.send(null);
}





function selectAllCurrentLunchItems()
{

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_ctl01_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?p_type=1",true);
          xmlHttp.send(null);
          
          
}




function selectAllCurrentDinnerItems()
{

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_ctl01_div_documentCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?p_type=3",true);
          xmlHttp.send(null);
          
          
}






function selectAllCateringItems()
{

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_ctl01_div_showCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?p_type=5",true);
          xmlHttp.send(null);
          
          
}




function selectAllNextMonthItems()
{

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_ctl01_div_musicCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?p_type=7",true);
          xmlHttp.send(null);
          
          
}



function deleteNextMonthItems(item_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_ctl01_div_musicCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?itemid=" + item_id + "&p_type=8",true);
          xmlHttp.send(null);
          
}



function deleteCatering(item_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_ctl01_div_showCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?itemid=" + item_id + "&p_type=6",true);
          xmlHttp.send(null);
          
}



function deleteDinner(item_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_ctl01_div_documentCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?itemid=" + item_id + "&p_type=4",true);
          xmlHttp.send(null);
          
}



function deleteLunch(item_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_ctl01_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/lunch.ashx?itemid=" + item_id + "&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_ctl01_div_documentCollections").innerHTML=xmlHttp.responseText;
               setVisible2('layer2');
               
                }
              }
            }
          xmlHttp.open("GET","handler/documents.ashx?p_id=" + p_id + "&p_type=3",true);
          xmlHttp.send(null);
  
  
  
}

function check_review_order()
{

var itemcount;
var name;
var phone1;
var phone2;
var phone3;
var date;
var time1;
var time2;


itemcount = document.getElementById("itemcount").value;
name = document.getElementById("contact_name").value;
phone1 = document.getElementById("contact_phone").value;
phone2 = document.getElementById("contact_phone1").value;
phone3 = document.getElementById("contact_phone2").value;
date = document.getElementById("contact_date").value;
time1 = document.getElementById("datehrs").value;
time2 = document.getElementById("datemins").value;

var itemselected;
itemselected = 0;
for(i=1;i<=itemcount;i++)
{
 element= document.getElementById("itm_" + i);
 if(element.checked == true)
 {
  itemselected = 1;
  break;
 }
 
}

if(itemselected==0)
{
 alert("Please select atleast one item");
 return false;
}
else if(name=="")
{
alert("Please enter the name");
document.getElementById("contact_name").focus();
return false;
}
else if(phone1=="" && phone2== "" && phone3=="")
{
alert("Please enter the phone");
document.getElementById("contact_phone").focus();
return false;
}
else if(date=="")
{
alert("Please select the date");
return false;
}
else if(time1=="0" && time2== "00")
{
alert("Please select the time");
document.getElementById("datehrs").focus();
return false;
}
else
{
    var checked = false; 
    var buttons = document.frmorder.location1; 
  for (var i=0; i<buttons.length; i++)  
  {  
    if (buttons[i].checked==true) {  
      checked = true; 
      break;  
    }  
   } 

 if(!checked)
 {
   alert("Please select the location");
   return false;
 }
 else
 {
    return true;
}
}

}

function rating_dish(itemcount)
{
 alert(itemcount);
}

function insert_items_page_title(pname,ctrlname)
{
 var page_disp_text;
 page_disp_text= document.getElementById("ctl00_ctl01_" + ctrlname + "_dispname").value;
 if(page_disp_text=="")
 {
  alert("Please enter the Display title "); 
 }
 else
 {
 
 
 
 
 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 =="1")
                {                               
                 alert("Saved Successfully");
                  document.getElementById("ctl00_ctl01_" + ctrlname + "_dispname").value = page_disp_text;
                }
              }
            }
          xmlHttp.open("GET","handler/add_disp_name.ashx?dname=" + page_disp_text + "&pname=" + pname + "&p_type=1",true);
          xmlHttp.send(null);
 
 
 
 
 
 
 
 //alert(page_disp_text);
 }
}




function selectAllNewsRoomItems()
{

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_ctl01_div_linkCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/news_room_items.ashx?p_type=1",true);
          xmlHttp.send(null);
          
          
}

function deleteNewsItems(item_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_ctl01_div_linkCollections").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/news_room_items.ashx?itemid=" + item_id + "&p_type=2",true);
          xmlHttp.send(null);
          
}

function show_quanity_box(elementid)
{
var check_element1 = document.getElementById('itm_' + elementid);
var check_element2 = document.getElementById('quandiv_' + elementid);

if(check_element1.checked == true)
{
check_element2.style.display = 'block';
}
else
{
check_element2.style.display = 'none';

}

}

function redirect_Next_Month_Items(flag)
{
if(flag==1)
{
window.location = "Next_Month.aspx";
}
else if(flag==2)
{
window.location = "Next_Month.aspx?opt=2";
}

}

function update_item_order(itemID, posValue)
{
 
 
 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!="")
                {
                    alert("Saved Successfully");
                    //document.getElementById("ctl00_ctl01_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
           
          xmlHttp.open("GET","handler/lunch.ashx?itemid=" + itemID + "&p_type=10&pos=" + posValue,true);
          xmlHttp.send(null);

}

function change_Featured(video_id)
{

 var chek_element = document.getElementById("chk_" + video_id);
 var flag_value;
 if(chek_element.checked==true)
 {
flag_value= 4;
 
 }
 else
 {
  flag_value= 5;
 
 }
 
 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_ctl01_div_videoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/video.ashx?video_id=" + video_id + "&v_type=" + flag_value,true);
          xmlHttp.send(null);
 
 
}

function update_Position(image_id,order_value)
{

//alert(image_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()
            {
            //alert(xmlHttp.responseText);
            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_ctl01_div_videoCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/photo.ashx?p_id=" + image_id + "&p_type=3&pos=" + order_value,true);
          xmlHttp.send(null);
 
 
}


function redirect_servicepage(page_URL)
{
window.location = page_URL;
}

function show_large_image(photoid)
{


 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()
            {
            //alert(xmlHttp.responseText);
            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';
               // alert(xmlHttp.responseText);
               
                if (xmlHttp.responseText!="")
                {
                    document.getElementById("ctl00_CPH_body_load_testimonials_content").innerHTML=xmlHttp.responseText;
                }
              }
            }
          xmlHttp.open("GET","handler/photo.ashx?p_id=" + photoid + "&p_type=4",true);
          xmlHttp.send(null);
}




function update_news_item_order(itemID, posValue)
{
 
 
 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!="")
                {
                    alert("Saved Successfully");
                    //document.getElementById("ctl00_ctl01_div_presentationCollection").innerHTML=xmlHttp.responseText;
                }
              }
            }
           
          xmlHttp.open("GET","handler/news_room_items.ashx?itemid=" + itemID + "&p_type=3&pos=" + posValue,true);
          xmlHttp.send(null);

}



function update_item_order_menu(itemID, posValue)
{
 
 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(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';
                                            
               
                
                if (xmlHttp.responseText!="")
                {
					alert("Saved Successfully");
					
                    
                }
              }
            }
          xmlHttp.open("GET","handler/notes.ashx?note_id=" + itemID + "&pos=" + posValue + "&b_type=5",true);
          xmlHttp.send(null);
  
 
  }