/*
Select Fix for IE6 and IE5.x
Lite Version 0.34
by Fabien Molinet : http://fabien-molinet.fr/
Released under BSD Licence
*/

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 T=(6(){2 s=D;2 t=H;2 u=S;2 v=H;2 w=D;2 x=D;2 y=H;2 z=19 1b();C.1v=6(a,b){3((a.K.1g("17-1i")==-1)&&(a.1j!="1o")){2 c=a.4.Y;2 d=(c=="20");3(d)a.4.Y="2a";2 e=a.U;2 f=a.1w;2 g=a.R-e;2 h=a.P-f;3(d)a.4.Y=c;3(b){a.4.B=e+\'8\';a.4.W=e+\'8\'}3((g>0)||(h>0)){2 i=A.Z("1l");1k(a,i,\'I\');a.4.I=\'0\';2 j=9(i,\'I-13-B\');2 k=9(i,\'I-14-B\');2 l=9(i,\'I-15-B\');2 m=9(i,\'I-16-B\');a.4.1h=F(j,9(a,\'Q-13\'))+\'8\';a.4.23=F(k,9(a,\'Q-14\'));+\'8\';a.4.1S=F(l,9(a,\'Q-15\'))+\'8\';a.4.1R=F(m,9(a,\'Q-16\'))+\'8\';3(!1a()){2 n=e+F(j,l);2 o=f+F(k,m);a.4.B=n+\'8\';a.4.W=o+\'8\';J(a,i,n,o)}E{J(a,i,e,f)}}2 p=A.Z("1D");2 q=21(24.25).27(0,5);3(q=="1B"){p.1d="1E:\'<1e></1e>\';"}E{p.1d="1H:1O"}J(a,p,e+g,f+h);a.K+=" 17-1i"}3(t)O(a)};C.18=6(a){3(!y){1f("T.18("+a+")",a);7}3(a==0){s=D;7}M(2 i=0;i<z.G;i++){2 b=z[i].26;3(1a()){2 c=z[i].R-z[i].U;2 d=z[i].P-z[i].1w;L(z[i],b.R-c,b.P-d)}E{L(z[i],b.R,b.P)}}12();s=1f("T.18("+a+")",a)};C.1x=6(a){t=a};C.1y=6(a){u=a};C.1z=6(a){v=a};6 1k(a,b,c){2 d=19 1b(\'-14\',\'-15\',\'-16\',\'-13\');2 e=19 1b(\'-B\',\'-4\',\'-1A\');M(2 i=0;i<d.G;i++){M(2 j=0;j<e.G;j++){2 f=c+d[i]+e[j];b.4[11(f)]=9(a,f)}}}6 1a(){3(x==D){2 a=A.Z(\'1l\');2 b=1C;2 c=10;a.4.B=b+\'8\';a.4.1h=c+\'8\';A.N.1m(a);x=(a.U==(b+c));A.N.1F(a)}7 x}6 J(a,b,c,d){b.K="1n";a.1m(b);z[z.G]=b;L(b,c,d)}6 L(a,b,c){3(b>0)a.4.B=b+"8";3(c>0)a.4.W=c+"8"}6 X(a){3(a.1I().1J("(1K)|(1L)|(1M)"))7"1N";7 a}6 F(a,b){2 c=X(a);2 d=X(b);2 e=1c(c)+1c(d);3(1P(e)){7 0}7 e}6 12(){3(u){2 a=A.1Q("17");3(a.G==0)7}3(w==D){w=(A.N.1p!=D)}O(A.N);y=S};6 O(a){M(2 i=0;i<a.1q.G;i++){2 b=a.1q[i];3(b.1T==1){3((b.1j!="1o")&&b.1U){3(((9(b,"1V")=="1W")&&((!v)||(9(b,"z-1X")!="")))&&(b.K.1g("1n")==-1)){C.1v(b,H)}E{O(b)}}}}};6 11(c){7 c.1Y(/\\-(\\w)/g,6(a,b){7 b.1Z()})}6 9(a,b){2 c="";3(A.V&&A.V.1r){c=A.V.1r(a,"").22(b)}E 3(w){b=11(b);3((a.4[b]!=D)&&(a.4[b]!="")){c=a.4[b]}E{c=a.1p[b]}}7 c};6 1s(a,b,c){3(a.1t){a.1t(b,c,H);7 S}E 3(a.1u){2 r=a.1u("1G"+b,c);7 r}E{7 H}};6 C(){1s(28,\'29\',12)};C();7 C})();',62,135,'||var|if|style||function|return|px|getStyle|||||||||||||||||||||||||||document|width|cSelectFix|null|else|addSizes|length|false|border|appendFixer|className|resizeFixerElement|for|body|recursiveLookChilds|offsetHeight|padding|offsetWidth|true|SelectFix|clientWidth|defaultView|height|checkValueForAddSizes|display|createElement||getCssRule|checkHtmlElements|left|top|right|bottom|select|autoRepairFloatingElements|new|isW3BoxModelCompliant|Array|parseInt|src|html|setTimeout|indexOf|paddingLeft|free|tagName|copyCssBorderWithDirectionToNewElement|div|appendChild|innerFixer|IFRAME|currentStyle|childNodes|getComputedStyle|addEvent|addEventListener|attachEvent|repairFloatingElement|clientHeight|parseFloatingElementsFixed|parseOnlyIfAvailableSelectElements|isZIndexRequired|color|https|100|iframe|javascript|removeChild|on|about|toString|match|thin|medium|thick|0px|blank|isNaN|getElementsByTagName|paddingBottom|paddingRight|nodeType|canHaveChildren|position|absolute|index|replace|toUpperCase|none|String|getPropertyValue|paddingTop|self|location|parentNode|substring|window|load|block'.split('|'),0,{}))

var arrayStates=new Array();
function getFile(url, passData)
{
    if (window.XMLHttpRequest)
    {
        AJAX=new XMLHttpRequest();
    }
    else
    {
        AJAX=new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (AJAX)
    {
        AJAX.open("POST", url, false);
        AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        AJAX.send(passData);
        return AJAX.responseText;
    }
    else
    {
        return false;
    }
}

function getStates(sQuery)
{
    var paramList = 'searchKey=' + sQuery+ '&isDomestic=false';
    var url = "./tektravels/StatesAjax.aspx";
    var arrayStates="";
    var response=getFile(url, paramList);
    arrayStates=response.split('/');
    if(arrayStates[0]!="")
    {
        for (var i=0; i<arrayStates.length;i++)
        {
            arrayStates[i]=["i",arrayStates[i]];
        }
        return arrayStates;
    }
    else return (false);
}

function getDomStates(sQuery)
{
    var paramList = 'searchKey=' + sQuery+ '&isDomestic=true';
    var url = "./tektravels/StatesAjax.aspx";
    var arrayStates="";
    var response=getFile(url, paramList);
    arrayStates=response.split('/');
    if(arrayStates[0]!="")
    {
        for (var i=0; i<arrayStates.length;i++)
        {
            arrayStates[i]=["i",arrayStates[i]];
        }
        return arrayStates;
    }
    else return (false);
}

function getStates_Hotel(sQuery)
{
    var paramList = 'searchKey=' + sQuery;
    paramList+='&requestFrom='+"HotelSearchDomestic";
    var url = "./tektravels/StatesAjax.aspx";
    var arrayStates="";
    var faltoo=getFile(url, paramList);
    arrayStates=faltoo.split('/');
    if(arrayStates[0]!="")
    {
        for (var i=0; i<arrayStates.length;i++)
        {
            arrayStates[i]=["i",arrayStates[i]];
        }
        return arrayStates;
    }
    else return (false);
}

function autoCompInit()
{
oACDS = new YAHOO.widget.DS_JSFunction(getStates);//temporarily autosearch deactivated
    oAutoComp = new YAHOO.widget.AutoComplete('JY_origin','JY_statescontainer1', oACDS);
    oAutoComp.prehighlightClassName = "yui-ac-prehighlight";
    oAutoComp.useShadow = true;
    oAutoComp.minQueryLength = 3;
    oAutoComp.queryDelay = 0;
    oAutoComp.useIFrame = true;
    oAutoComp.formatResult = function(oResultItem, sQuery)
    {
        document.getElementById('JY_statescontainer1').style.display="block";
        var sMarkup = oResultItem[1];
        var aMarkup = [sMarkup];
        return ( aMarkup.join(""));
    };
    oAutoComp.itemSelectEvent.subscribe(itemSelectHandler);
oACDS2 = new YAHOO.widget.DS_JSFunction(getStates); // temporarily autosearch deactivated
    oAutoComp2 = new YAHOO.widget.AutoComplete('JY_destination','JY_statescontainer2', oACDS2);
    oAutoComp2.prehighlightClassName = "yui-ac-prehighlight";
    oAutoComp2.queryDelay = 0;
    oAutoComp2.minQueryLength = 3;
    oAutoComp2.useIFrame = true;
    oAutoComp2.useShadow = true;

    oAutoComp2.formatResult = function(oResultItem, sQuery)
    {
        document.getElementById('JY_statescontainer2').style.display="block";
        var sMarkup = oResultItem[1]  ;
        var aMarkup = [sMarkup];
        return ( aMarkup.join(""));
    };
    oAutoComp2.itemSelectEvent.subscribe(itemSelectHandler2);

oACDS3 = new YAHOO.widget.DS_JSFunction(getStates_Hotel); // temporarily autosearch deactivated
    oAutoComp3 = new YAHOO.widget.AutoComplete('JY_city','JY_statescontainer3', oACDS3);
    oAutoComp3.prehighlightClassName = "yui-ac-prehighlight";
    oAutoComp3.queryDelay = 0;
    oAutoComp3.minQueryLength = 3;
    oAutoComp3.useIFrame = true;
    oAutoComp3.useShadow = true;

    oAutoComp3.formatResult = function(oResultItem, sQuery)
    {
        document.getElementById('JY_statescontainer3').style.display="block";
        var sMarkup = oResultItem[1]  ;
        var aMarkup = [sMarkup];
        return ( aMarkup.join(""));
    };
    oAutoComp3.itemSelectEvent.subscribe(itemSelectHandler3);
}

function autoCompInit_wid_()
{
oACDS_wid_ = new YAHOO.widget.DS_JSFunction(getStates);//temporarily autosearch deactivated
    oAutoComp_wid_ = new YAHOO.widget.AutoComplete('origin','statescontainer1', oACDS_wid_);
    oAutoComp_wid_.prehighlightClassName = "yui-ac-prehighlight";
    oAutoComp_wid_.useShadow = true;
    oAutoComp_wid_.minQueryLength = 3;
    oAutoComp_wid_.queryDelay = 0;
    oAutoComp_wid_.useIFrame = true;
    oAutoComp_wid_.formatResult = function(oResultItem, sQuery)
    {
        document.getElementById('statescontainer1').style.display="block";
        var sMarkup = oResultItem[1];
        var aMarkup = [sMarkup];
        return ( aMarkup.join(""));
    };
    oAutoComp_wid_.itemSelectEvent.subscribe(itemSelectHandler_wid_);
oACDS_wid_2 = new YAHOO.widget.DS_JSFunction(getStates); // temporarily autosearch deactivated
    oAutoComp_wid_2 = new YAHOO.widget.AutoComplete('destination','statescontainer2', oACDS_wid_2);
    oAutoComp_wid_2.prehighlightClassName = "yui-ac-prehighlight";
    oAutoComp_wid_2.queryDelay = 0;
    oAutoComp_wid_2.minQueryLength = 3;
    oAutoComp_wid_2.useIFrame = true;
    oAutoComp_wid_2.useShadow = true;

    oAutoComp_wid_2.formatResult = function(oResultItem, sQuery)
    {
        document.getElementById('statescontainer2').style.display="block";
        var sMarkup = oResultItem[1]  ;
        var aMarkup = [sMarkup];
        return ( aMarkup.join(""));
    };
    oAutoComp_wid_2.itemSelectEvent.subscribe(itemSelectHandler_wid_2);
}

var itemSelectHandler = function(sType, aArgs)
{
    YAHOO.log(sType); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance = aArgs[2]; // your AutoComplete instance
    document.getElementById('JY_origin').value=oMyAcInstance[1];
    document.getElementById('JY_statescontainer1').style.display="none";
    var elListItem = aArgs[1]; //the <li> element selected in the suggestion container
    var aData = aArgs[2]; //array of the data for the item as returned by the DataSource
};

//define your itemSelect handler function:
var itemSelectHandler2 = function(sType2, aArgs2)
{
    YAHOO.log(sType2); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance2 = aArgs2[2]; // your AutoComplete instance
    document.getElementById('JY_destination').value=oMyAcInstance2[1];
    document.getElementById('JY_statescontainer2').style.display="none";
    var elListItem2 = aArgs2[1]; //the <li> element selected in the suggestion container
    var aData2 = aArgs2[2]; //array of the data for the item as returned by the DataSource
};

var itemSelectHandler3 = function(sType2, aArgs2)
{
    YAHOO.log(sType2); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance2 = aArgs2[2]; // your AutoComplete instance
    document.getElementById('JY_city').value=oMyAcInstance2[1];
    document.getElementById('JY_statescontainer3').style.display="none";
    var elListItem2 = aArgs2[1]; //the <li> element selected in the suggestion container
    var aData2 = aArgs2[2]; //array of the data for the item as returned by the DataSource
};

var itemSelectHandler_wid_ = function(sType, aArgs)
{
    YAHOO.log(sType); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance = aArgs[2]; // your AutoComplete instance
    document.getElementById('origin').value=oMyAcInstance[1];
    document.getElementById('statescontainer1').style.display="none";
    var elListItem = aArgs[1]; //the <li> element selected in the suggestion container
    var aData = aArgs[2]; //array of the data for the item as returned by the DataSource
};

//define your itemSelect handler function:
var itemSelectHandler_wid_2 = function(sType2, aArgs2)
{
    YAHOO.log(sType2); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance2 = aArgs2[2]; // your AutoComplete instance
    document.getElementById('destination').value=oMyAcInstance2[1];
    document.getElementById('statescontainer2').style.display="none";
    var elListItem2 = aArgs2[1]; //the <li> element selected in the suggestion container
    var aData2 = aArgs2[2]; //array of the data for the item as returned by the DataSource
};

var itemSelectHandler_wid_3 = function(sType2, aArgs2)
{
    YAHOO.log(sType2); //this is a string representing the event; e.g., "itemSelectEvent"
    var oMyAcInstance2 = aArgs2[2]; // your AutoComplete instance
    document.getElementById('city').value=oMyAcInstance2[1];
    document.getElementById('statescontainer3').style.display="none";
    var elListItem2 = aArgs2[1]; //the <li> element selected in the suggestion container
    var aData2 = aArgs2[2]; //array of the data for the item as returned by the DataSource
};     
