﻿function Load(){
    loadCalendar();
}

function ShowAdsZone(pZoneId,pSource){
   var m3_u = (location.protocol=='https:'?'https://adsaqt.absolunet.com/www/delivery/ajs.php':'http://adsaqt.absolunet.com/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid="+pZoneId+"&amp;source="+pSource+"&amp;block=1;");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
}

function loadCalendar(){
    if ($find("CalendarStart") != null && $find("CalendarReturn") != null){
        $find("CalendarStart").show();
        $find("CalendarReturn").show();
    }
    else
        setTimeout("loadCalendar()",10);
}

// Hide script from older browsers 
// script by http://www.hypergurl.com
var urlAddress = "http://www.quicktrip.com/";
//var pageName = pageNameFavorite;

function addToFavorites() {
    if (window.sidebar) { // firefox
        window.sidebar.addPanel(pageNameFavorite, urlAddress, "");
    } else if( document.all ) { //MSIE
    window.external.AddFavorite(urlAddress, pageNameFavorite);
    } else {
        alert(sorryBrowserNoSupport);
    }

}

//Show autocomplete manually
function onAutoCompleteViewList(obj)
{
    var autoComplete = obj;

    // To show the popup by JavaScript, following code is necessary.
    // [NOTE] This trick is weak if the AutoCompleteExtender is updated.
    autoComplete._cache = {};
    autoComplete._currentPrefix = null;
    autoComplete._textBoxHasFocus = true;

    // save the old minimum prefix length, and set the value 0
    var oldMinimumPrefixLength = autoComplete.get_minimumPrefixLength();
 
    autoComplete.set_minimumPrefixLength(0);

    // send the event to show the popup
    autoComplete._onTimerTick(null, null);

    // restore the old minimum prefix length
    autoComplete.set_minimumPrefixLength(oldMinimumPrefixLength);
    
   
}


