﻿// JScript File
function ExchangeDearAuntiePagerSettings()
{
        var tbl=document.getElementById('gvDearAuntie');
        var pager=tbl.rows[tbl.rows.length-1].cells[0];
        var divPager=document.getElementById('pnlPager');
        if(pager==null) return;
        if(divPager==null) return;
        tbls=pager.getElementsByTagName('table');
        var pages='';
        for(var i=0;i<tbls[0].rows[0].cells.length;i++)
        {
            if(i==tbls[0].rows[0].cells.length-1)
                pages+=tbls[0].rows[0].cells[i].innerHTML;
            else
                pages+=tbls[0].rows[0].cells[i].innerHTML+' | ';
        }
        var spanpager=document.getElementById('spanPager');
        spanpager.innerHTML=pages;
        pager.style.display='none';
}

function HideModalPopup()
{
  var modal = $find('divMail');
  modal.hide();
}
function bookmarksite(title)
{    
    url = window.location.href
    if (window.sidebar) // firefox
        window.sidebar.addPanel(title, url, "");
    else if(window.opera && window.print)
    { // opera
        var elem = document.createElement('a');
        elem.setAttribute('href',url);
        elem.setAttribute('title',title);
        elem.setAttribute('rel','sidebar');
        elem.click();
    }
    else if(document.all)// ie
        window.external.AddFavorite(url, title);
}
function setpost()
{
var isValid=true;
var txtcomment=document.getElementById('txtComments');
var txtCaptcha=document.getElementById('txtCaptcha');
var divcomment=document.getElementById('postComment');
var msg='';
if (txtcomment.value=='')
{
isValid=false;
alert('Please Enter the comments,Befor Post');
}
else
{
if (txtCaptcha.value=='')
{
isValid=false;
alert('Please Enter the Captcha code');
}
else
{
isValid=true;
document.getElementById('hdnPost').value='1';
}
}
return isValid;
}
function lbtnPost_Onclick1()
{
alert('The Captcha code mismath , Try again');
}


//It is used to do the postback operations of "Cancel, Preview and Submit" Buttons,
// and also doing the Validations of that page.
function btnsubmit(val)
{       var IsValid=true;
        var txtquestion=document.getElementById('txtQuestion');
        if (val!=1)
        {
                if (txtquestion.value==null || txtquestion.value=='')
                {
                 
                    IsValid=false;
                    alert('Enter the Question Before Submit (or) Preview the Page');
                }
                else
                {
                document.getElementById('eventIdentifier').value=val;
                }
        }
        else
        {
      document.getElementById('eventIdentifier').value=val;
        }
        
        return IsValid;
}




