var og; function selectChar(_c){ _n = 0; switch (_c.toLowerCase()){ case 'a': _n = 1; break; case 'b': _n = 1; break; case 'c': _n = 1; break; case 'd': _n = 2; break; case 'f': _n = 2; break; case 'g': _n = 2; break; case 'h': _n = 3; break; case 'j': _n = 4; break; case 'k': _n = 4; break; case 'l': _n = 5; break; case 'm': _n = 5; break; case 'n': _n = 5; break; case 'p': _n = 6; break; case 'q': _n = 6; break; case 'r': _n = 6; break; case 's': _n = 6; break; case 't': _n = 7; break; case 'u': _n = 8; break; case 'v': _n = 8; break; case 'w': _n = 8; break; case 'x': _n = 9; break; case 'y': _n = 10; break; case 'z': _n = 11; break; } return _n; } function diss(o){ if (o.value.length<1) return; tmpchar = o.value.substr(0,1); _n = selectChar(tmpchar); $("#CTYMenu li").eq(_n).trigger("click"); } function getAbsPosition(_e){ var _x = _e.offsetLeft; var _y = _e.offsetTop; while(_e = _e.offsetParent){ _x += _e.offsetLeft; _y += _e.offsetTop; } return {"x":_x,"y":_y}; }; function showCityList(o){ og = $(o); var currDivE = $("#CTYList"), CTYMenuLi = $("#CTYMenu li"), currBodyDiv = $("#CTYList .destinationName"); var te = $(o), ps = te.position(), tp = (te.height() * 2 + ps.top) + "px", tl = ps.left + "px"; xy = getAbsPosition(o); currDivE.css({ position: "absolute", left: xy.x+"px", top: xy.y+o.offsetHeight+"px", display: "block","background-color": "#FFF" }); } function setvalue(o){ if(og) og.val($(o).text()); $("#CTYList").hide(); } $(function(){ var currDivE = $("#CTYList"),attrDivE = $("#AttrList"), CTYMenuLi = $("#CTYMenu li"), currBodyDiv = $("#CTYList .destinationName"); $("#CTYList img").css("cursor", "pointer").click(function(){ currDivE.hide(); }); CTYMenuLi.click(function(){ CTYMenuLi.removeClass("active"); $(this).addClass("active"); currBodyDiv.hide(); $("#" + $(this).text()).show(); }); $("#CTYList .destinationName li").click(function(){ setvalue(this); }); }); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln(" "); document.writeln("
"); document.writeln("
"); document.writeln("
"); document.writeln("
");