var _wr_load = window.onload; window.onload = function() { if (typeof (_wr_load) == "function") { _wr_load() } _wr_d = document; _wr_i(_wr_d.body); _wr_re(_wr_d.body) }; _wr_i = function(g) { var c = g.childNodes; var f = c.length; for (var h = 0; h < f; h++) { if (c[h].nodeType == 3) { if (!c[h].nodeValue.match(/^[\s]*$/)) { r = c[h].nodeValue; r = r.replace(/\s(Rs|Rs\.)\s/gi, " Rs. "); r = r.replace(/^(Rs|Rs\.)\s/gi, " Rs. "); r = _we_reg(r, /\sRs\.[0-9]+\s/gi, /(Rs\.)/gi); r = _we_reg(r, /^Rs\.[0-9]+$/gi, /Rs\./gi); r = _we_reg(r, /^Rs\.[0-9,]+[0-9]$/gi, /Rs\./gi); r = _we_reg(r, /^Rs\.[0-9,]+[0-9]\s/gi, /Rs\./gi); r = _we_reg(r, /\sRs\.[0-9,]+[0-9]\s/gi, /Rs\./gi); r = _we_reg(r, /\sRs\.[0-9,]+[0-9]\./gi, /Rs\./gi); r = _we_reg(r, /^Rs\.[0-9,]+[0-9]\./gi, /Rs\./gi); r = _we_reg(r, /\sRs\.[0-9,]+[0-9]\//gi, /Rs\./gi); r = _we_reg(r, /^Rs\.[0-9,]+[0-9]\//gi, /Rs\./gi); r = _we_reg(r, /\sRs\.[0-9,]+[0-9]/gi, /Rs\./gi); c[h].nodeValue = r } } else { if (c[h].nodeName.toLowerCase() != "script") { _wr_i(c[h]) } } } }; _we_reg = function(f, a, b) { var c = new RegExp(a); var e = c.exec(f); while (e != null) { var d = String(e); d = d.replace(b, " Rs. "); f = f.replace(e, d); e = c.exec(f) } return f }; _wr_re = function(k) { var c = 0; if (k.nodeType == 3) { var n = k.data.indexOf(" Rs. "); if (n >= 0) { var m = document.createElement("span"); m.className = "WebRupee"; var e = k.splitText(n); var o = e.splitText(5); var p = e.cloneNode(true); m.appendChild(p); e.parentNode.replaceChild(m, e); c = 1 } } else { if (k.nodeType == 1 && k.childNodes && !/(script|style)/i.test(k.tagName)) { for (var l = 0; l < k.childNodes.length; ++l) { l += _wr_re(k.childNodes[l]) } } } return c };
jQuery.noConflict();
jQuery(document).ready(function() {
    //alert(jQuery("#diverror").length);
    if (jQuery("#diverror").length > 0) {


        if (jQuery("#ctl00_HiddenError").val() == 1 || jQuery("#ctl00_ctl00_HiddenError").val() == 1) {
            //alert('hai1');

            jQuery('#ctl00_divforgotpwd').hide('fast');
            jQuery('#userlogin').show('slow');
            jQuery('a#forgotpwd').show('slow');
            jQuery('#logintitle').show('slow');
            jQuery('#ctl00_divCaptcha').show('slow');
            jQuery('#ctl00_btnsignin').attr('disabled', '');
            jQuery('#ctl00_ctl00_divforgotpwd').hide();
            jQuery('#ctl00_divforgotpwd').hide();

        }
        else if (jQuery("#ctl00_HiddenError").val() == 2 || jQuery("#ctl00_ctl00_HiddenError").val() == 2) {
            //alert('hai2');

            jQuery('#userlogin').hide();
            jQuery('a#forgotpwd').hide();
            jQuery('#logintitle').hide();
            jQuery('#ctl00_ctl00_divCaptcha').hide();
            jQuery('#ctl00_divCaptcha').hide();
            jQuery('#ctl00_divforgotpwd').show('fast');
            jQuery('#ctl00_divforgotpwd').attr('disabled', '');
        }
        jQuery("div#panel").slideDown("fast");
        jQuery("#toggle a").toggle();
        //jQuery('#ctl00_btnsignin').attr('disabled', '');
        //jQuery('#ctl00_ctl00_btnsignin').attr('disabled', '');


    } else {
        jQuery('#ctl00_ctl00_divforgotpwd').hide();
        jQuery('#ctl00_divforgotpwd').hide();
        jQuery('#ctl00_divCaptcha').show('slow');
        jQuery('#ctl00_btnsignin').attr('disabled', '');

    }

    // Expand Panel
    jQuery("#ctl00_ctl00_open").click(function() {
    jQuery("div#panel").slideDown('slow');
        jQuery(this).css('display', 'none');
        jQuery(this).next().css('display', 'block');
        jQuery('#ctl00_ctl00_btnsignin').attr('disabled', '');
        jQuery('#ctl00_ctl00_TxtUserid').focus();
        return false;
    });
    // Expand Panel
    jQuery("#ctl00_open").click(function() {
       
        jQuery("div#panel").slideDown('slow');
        jQuery(this).css('display', 'none');
        jQuery(this).next().css('display', 'block');
        jQuery('#ctl00_btnsignin').attr('disabled', '');
        jQuery('#ctl00_TxtUserid').focus();
        return false;
    });



    // Collapse Panel
    jQuery("#close").click(function() {
        jQuery("div#panel").slideUp('slow');
        jQuery(this).css('display', 'none');
        jQuery(this).prev().css('display', 'block');
        jQuery('#ctl00_btnsignin').attr('disabled', 'disabled');
        return false;
    });

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    jQuery("#toggle a").click(function() {
        jQuery("#toggle a").toggle();
    });

    // shows the slickbox on clicking the noted link

    jQuery('a#forgotpwd').click(function() {
        jQuery('#ctl00_ctl00_divforgotpwd').show('slow');
        jQuery('#ctl00_divforgotpwd').show('slow');
        jQuery('#userlogin').hide();
        jQuery('a#forgotpwd').hide();
        jQuery('#logintitle').hide();
        jQuery('#ctl00_ctl00_divCaptcha').hide();
        jQuery('#ctl00_divCaptcha').hide();
        jQuery('#diverror').hide();

        return false;
    });
    jQuery('a#cancel').click(function() {
        jQuery('#ctl00_ctl00_divforgotpwd').hide();
        jQuery('#ctl00_divforgotpwd').hide();
        jQuery('#userlogin').show('slow');
        jQuery('a#forgotpwd').show('slow');
        jQuery('#logintitle').show('slow');
        jQuery('#ctl00_ctl00_divCaptcha').show('slow');
        jQuery('#ctl00_divCaptcha').show('slow');
        jQuery('#diverror').hide();
        return false;
    });
});

// Google Search




//<![CDATA[
function initLoader() {
    var script = document.createElement("script");
    //script.src = "http://www.google.com/jsapi?key=ABQIAAAAoaqzZrdbwIFiQIIpWxDWARSIdR4F-3-vczd9RRLo5-PFVp7ncRTC10S3Fvl5RSvJQcaMjg4h0kAT3g";
    var gaJsHostsearch = (("https:" == document.location.protocol) ? "https://" : "http://");
    script.src = gaJsHostsearch + "www.google.com/jsapi?key=ABQIAAAAoaqzZrdbwIFiQIIpWxDWARSIdR4F-3-vczd9RRLo5-PFVp7ncRTC10S3Fvl5RSvJQcaMjg4h0kAT3g";
    script.type = "text/javascript";
    document.getElementsByTagName("head")[0].appendChild(script);
}

function OnLoad() {

    // Create a search control      
    var searchControl = new google.search.SearchControl(); searchControl.setLinkTarget(searchControl.LINK_TARGET_SELF);
    var siteSearch = new GwebSearch(); siteSearch.setUserDefinedLabel("PillaiCenter.com");
    siteSearch.setUserDefinedClassSuffix("siteSearch"); siteSearch.setSiteRestriction("PillaiCenter.com");
    // web search, open, alternate root
    var options = new GsearcherOptions(); options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); options.setRoot(document.getElementById("searchresult"));
    searchControl.addSearcher(siteSearch, options); searchControl.draw(document.getElementById("searchcontrol"));
    // Execute an inital search
    searchControl.execute();

    jQuery('.gsc-search-button').val("");


}
function GoogleSearch() {
    initLoader();
    setTimeout("google.load('search', '1', { 'callback': OnLoad })", 4000)
    
}



