
// The following js comes from: http://i.travelpn.com/js/AC_OETags.js //
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}return version;}function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else{if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}}var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){flashVer=4;}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){flashVer=3;}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){flashVer=2;}else{if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}}}}}return flashVer;}function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision){versionStr=GetSwfVer();if(versionStr==-1){return false;}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else{if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer)){return true;}else{if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision)){return true;}}}}}return false;}}}function AC_AddExtension(src,ext){if(src.indexOf("?")!=-1){return src.replace(/\?/,ext+"?");}else{return src+ext;}}function AC_Generateobj(objAttrs,params,embedAttrs){var str="";if(isIE&&isWin&&!isOpera){str+="<object ";for(var i in objAttrs){str+=i+'="'+objAttrs[i]+'" ';}for(var i in params){str+='><param name="'+i+'" value="'+params[i]+'" /> ';}str+="></object>";}else{str+="<embed ";for(var i in embedAttrs){str+=i+'="'+embedAttrs[i]+'" ';}str+="> </embed>";}document.write(str);}function AC_FL_RunContent(){var ret=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs.src=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":ret.objAttrs[args[i]]=args[i+1];break;case"id":case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}ret.objAttrs.classid=classid;if(mimeType){ret.embedAttrs.type=mimeType;}return ret;}// .
// *****END***** //

// The following js comes from: http://i.travelpn.com/js/vs-track.js //
function vsTrackClick(VStrackingUrl,VS_var,rtAnchor){var __img=new Image(1,1);var rnum=parseInt((Math.random()*Math.random())*100000000);__img.src=VStrackingUrl+"?WAPageName="+VS_var+"&rand="+rnum;if(typeof(rtAnchor)=="object"&&rtAnchor.tagName.toLowerCase()=="a"){pauseJS(100);}else{return false;}}function vsRedirectClick(re,wap){window.location.href=("/vstrack?WAPageName="+wap+"&dst="+re.href);}function vsTrackScreen(VStrackingUrl){if(typeof(VStrackingUrl)==="string"){var sWidth=screen.width;var sHeight=screen.height;var tPixel=document.createElement("img");tPixel.src=VStrackingUrl+"?wascreenres="+sWidth+"x"+sHeight;}}// .
// *****END***** //

// The following js comes from: http://i.travelpn.com/js/swfobject_v2.js //
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0;}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7");}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always";}catch(t){if(AC[0]==6){AB=true;}}if(!AB){try{y=new ActiveXObject(p);}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)];}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w};}();var L=function(){if(!h.w3cdom){return;}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S);}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E();}},10);}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null);}R(E);}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E();}}function E(){if(e){return;}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u);}catch(w){return;}}e=true;if(Z){clearInterval(Z);Z=null;}var q=o.length;for(var r=0;r<q;r++){o[r]();}}function f(q){if(e){q();}else{o[o.length]=q;}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false);}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false);}else{if(typeof j.attachEvent!=b){I(j,"onload",r);}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r();};}else{j.onload=r;}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r);}W(u,true);}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q]);}else{O(r);}}}}else{W(u,true);}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue);}else{w.setAttribute(y[u].nodeName,y[u].nodeValue);}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"));}}}t.parentNode.replaceChild(w,t);}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId;}}else{M=G(u);}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310";}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137";}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u);};I(j,"onload",v);}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x);}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t);};I(j,"onload",q);}else{t.parentNode.replaceChild(G(t),t);}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML;}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true));}}}}}return u;}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t;}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB];}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"';}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"';}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />';}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id);}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z]);}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z]);}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z]);}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y]);}}}v.parentNode.replaceChild(AC,v);q=AC;}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x]);}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x]);}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w]);}}v.parentNode.replaceChild(u,v);q=u;}}}return q;}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u);}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r);}else{j.attachEvent("onload",function(){B(r);});}}else{q.parentNode.removeChild(q);}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null;}}r.parentNode.removeChild(r);}}function C(t){var q=null;try{q=K.getElementById(t);}catch(r){}return q;}function a(q){return K.createElement(q);}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r];}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false;}function V(v,r){if(h.ie&&h.mac){return;}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"));}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r);}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r;}else{V("#"+t,"visibility:"+r);}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s;}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2]);}var t=i.length;for(var u=0;u<t;u++){X(i[u]);}for(var r in h){h[r]=null;}h=null;for(var q in swfobject){swfobject[q]=null;}swfobject=null;});}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return;}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false);},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t;}else{if(typeof u.SetVariable!=b){q=u;}}}}return q;},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return;}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v];}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u];}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t];}else{y.flashvars=t+"="+r[t];}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true);}});}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF);});}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]};},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q);}else{return undefined;}},removeSWF:function(q){if(h.w3cdom){X(q);}},createCSS:function(r,q){if(h.w3cdom){V(r,q);}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u);}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)));}}}return"";},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block";}}M=null;l=null;A=false;}}}};}();// .
// *****END***** //

// The following js comes from: http://i.travelpn.com/js/travel-deals-widgets.js //
jQuery(function(){var DealsTabs={ActiveTabs:["#deal-tab1","#deal-tab2","#deal-tab3"],SetUp:function(){if(typeof tvly.DealsTabs=="object"){jQuery.extend(true,DealsTabs,tvly.DealsTabs);}var ChangeTabs=function(oTab,rld){var oTabID=jQuery(oTab).attr("id");switch(oTabID){case"deal-tab1":jQuery("#deal-tab1-radio").attr("checked",true);noneBlock("#top10!1","#destinationdeals!0");if(jQuery("#deal-tab3").length){noneBlock("#moretraveldeals!0");}jQuery("#tabbing").attr("class","tab_first");if(rld!=1){vsTrackClick(tvly.travelDomain+"/___waseq.img","TOP10_TAB.DEALS_PAGE");}break;case"deal-tab2":jQuery("#deal-tab2-radio").attr("checked",true);noneBlock("#top10!0","#destinationdeals!1");if(jQuery("#deal-tab3").length){noneBlock("#moretraveldeals!0");}jQuery("#tabbing").attr("class","tab_second");if(rld!=1){vsTrackClick(tvly.travelDomain+"/___waseq.img","DESTINATIONS_TAB.DEALS_PAGE");}break;case"deal-tab3":jQuery("#deal-tab3-radio").attr("checked",true);noneBlock("#top10!0","#destinationdeals!0","#moretraveldeals!1");jQuery("#tabbing").attr("class","tab_third");if(rld!=1){vsTrackClick(tvly.travelDomain+"/___waseq.img","TAB3.DEALS_PAGE");}break;}};var DealsTabsRadios=[];jQuery(DealsTabs.ActiveTabs).each(function(x){if(jQuery(this).length){jQuery(DealsTabs.ActiveTabs[x]).bind("click",{tab:DealsTabs.ActiveTabs[x]},function(e){ChangeTabs(e.data.tab);return false;});DealsTabsRadios.push(this+"-radio");}});jQuery(DealsTabsRadios).each(function(i){if(jQuery(DealsTabsRadios[i]).length&&jQuery(DealsTabsRadios[i]).attr("checked")){var tabID="#"+jQuery(DealsTabsRadios[i]).attr("id").replace("-radio","");var theTab=jQuery(tabID).get(0);ChangeTabs(theTab,1);}});}};var TravelDeals={olistText:"",olistValue:"",cachedOrigins:"",testPrefix:"",origins:{ny:"",chi:"",la:"",dfw:""},LoadingSpinner:{container:null,SetUp:function(){TravelDeals.LoadingSpinner.container=document.createElement("span");TravelDeals.LoadingSpinner.container.id="nowloading";TravelDeals.LoadingSpinner.hide();var msg="";if(typeof(tvly)!="undefined"&&typeof(tvly.iDomain)!="undefined"){msg='<img id="spinner" src="'+tvly.iDomain+'/images/i/deals-page/ajax-loader2.gif" alt="New Deals Now Loading">';}msg+="Loading, Please Wait...";jQuery(TravelDeals.LoadingSpinner.container).html(msg).insertAfter("#departure-pulldown");},show:function(){jQuery(TravelDeals.LoadingSpinner.container).css("display","block");},hide:function(){jQuery(TravelDeals.LoadingSpinner.container).css("display","none");}},init:function(){if(typeof tvly.TravelDeals=="object"){jQuery.extend(true,TravelDeals,tvly.TravelDeals);}var CheckForCache=function(str){if(TravelDeals.cachedOrigins.indexOf(str)>-1){return false;}else{return true;}};var UpdateOriginData=function(){var selIndex=jQuery("#depart-city").get(0).selectedIndex;TravelDeals.olistText=jQuery("#depart-city option")[selIndex].text;TravelDeals.olistValue=jQuery("#depart-city option")[selIndex].value;var deptCity=TravelDeals.olistValue;if(deptCity!==""&&typeof(deptCity)!="undefined"){if(CheckForCache(TravelDeals.olistValue)){jQuery.ajax({type:"GET",cache:true,url:"/fd_deals_cmp/0,,"+tvly.service+"|deals2008_trav_"+deptCity+TravelDeals.testPrefix+"|deals2008trav,00.html",success:function(html){TravelDeals.LoadingSpinner.hide();TravelDeals.cachedOrigins+=TravelDeals.olistValue;eval("TravelDeals.origins."+TravelDeals.olistValue+"=html");jQuery("#travel-deals").html(html);jQuery("#depart-city-text").html(TravelDeals.olistText);},error:function(){TravelDeals.LoadingSpinner.hide();jQuery("#depart-city option:first").attr("selected",true);}});TravelDeals.LoadingSpinner.show();}else{jQuery("#travel-deals").html(eval("TravelDeals.origins."+TravelDeals.olistValue));jQuery("#depart-city-text").html(TravelDeals.olistText);}}};TravelDeals.LoadingSpinner.SetUp();jQuery("#deals-update-btn").bind("click",UpdateOriginData);UpdateOriginData();}};jQuery.fn.extend({DealsWidgetsDomReady:function(){DealsTabs.SetUp();TravelDeals.init();},launchWindow:function(url){var winfeatures=arguments[1];var winName="_new";var oDefaultFeatures={left:"150",top:"200",width:500,height:400,scrollbars:"0",resizable:"1",toolbar:"0",location:"0",menubar:"0",status:"0",directories:"0"};if(typeof(winfeatures)!=="undefined"){for(feature in winfeatures){oDefaultFeatures[feature]=winfeatures[feature];}}if(typeof(winfeatures.height)=="undefined"){oDefaultFeatures.height=screen.availHeight-100;}oDefaultFeatures.left=(screen.width/2)-(oDefaultFeatures.width/2);oDefaultFeatures.top=(screen.height/2)-(oDefaultFeatures.height/2);var sWindowFeautres=(function(features_object){var features=[];for(feature in features_object){features.push(feature+"="+features_object[feature]);}return features.join(",");})(oDefaultFeatures);var newwin=window.open(url,winName,sWindowFeautres);newwin.focus();return true;}});});DealsWizard={};DealsWizard.FlashComponent=(function(){var component;var component_configuration;function _Component(){var FlashComponnet=function(){};FlashComponnet.prototype={sLSCookie:"",sPROFILECookie:"",sGEOCookie:"",sFlashCookie:"",sFlashAttributes:null,bComponentLoaded:false,oPopularSearches:{},oComponentConfiguration:false,FlashOriginCityRequest:function(){this.FlashOriginCityResponse();},FlashOriginCityResponse:function(){var origin=this.getOriginCity();var flash_component=jQuery("#"+this.sFlashAttributes.id).get(0);if(flash_component){try{flash_component.setOriginCity(origin);}catch(e){}}},getComponentConfiguration:function(){return this.oComponentConfiguration;},setComponentConfiguration:function(oComponentConfiguration){this.oComponentConfiguration=oComponentConfiguration;},isComponentReady:function(){return this.bComponentLoaded;},getOriginCity:function(){var origin={};if(this.sFlashCookie!==""){origin.city="";}else{if(this.sLSCookie!==""){origin.city=(this.sLSCookie.split("|"))[1];}else{if(this.sPROFILECookie!==""){origin.city=(this.sPROFILECookie.split("|"))[1];}else{if(this.sGEOCookie!==""){origin.latitude=(this.sGEOCookie.split("|"))[0];origin.longitude=(this.sGEOCookie.split("|"))[1];origin.city=(this.sGEOCookie.split("|"))[2];origin.state=(this.sGEOCookie.split("|"))[3];origin.zipcode=(this.sGEOCookie.split("|"))[4];origin.country=(this.sGEOCookie.split("|"))[5];}}}}return origin;},getPopularSearches:function(){return this.oPopularSearches;},subscribeJiffYEvent:function(event,oListener){jQuery("#"+component.oComponentConfiguration.flashContainer).bind(event,{scope:component},oListener);},setFlightSpecificDates:function(from,to){var selectItem=function(elemID,itemIndex){var a=jQuery("#"+elemID);if((!a)||(!a.length)){return;}a[0].selectedIndex=itemIndex;a.change();};var scrollTo=function(id,delay){var target=$("#"+id);if(target.length){var top=target.offset().top;jQuery("html,body").animate({scrollTop:top},delay);}};jQuery("#nav-fo").attr("checked",true);jQuery("#nav-fo").click();jQuery("#fo-exact").attr("checked",true);jQuery("#fo-exact").click();if(!from){from="";}jQuery("#fo-from").val(from);if(!to){to="";}jQuery("#fo-to").val(to);selectItem("fo-adults",1);selectItem("fo-minors",0);selectItem("fo-seniors",0);jQuery("#fo-fromdate").val("mm/dd/yyyy");jQuery("#fo-todate").val("mm/dd/yyyy");scrollTo("search_again",500);},setUp:function(configuration){oScope=this;jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("onBeforeDealsInit");jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("onBeforeDealsParameters");if(!this.oComponentConfiguration){this.oComponentConfiguration=configuration;}this.sLSCookie=oScope.oComponentConfiguration.lscookie?oScope.oComponentConfiguration.lscookie:"";this.sPROFILECookie=oScope.oComponentConfiguration.prefloc?oScope.oComponentConfiguration.prefloc:"";this.sGEOCookie=oScope.oComponentConfiguration.geocookie?oScope.oComponentConfiguration.geocookie:"";if(this.sPROFILECookie==""){this.sPROFILECookie=GetCookie("prefloc");}if(this.sGEOCookie==""){this.sGEOCookie=GetCookie("TVLY_GEO");}this.sFlashAttributes=oScope.oComponentConfiguration.flashAttributes?oScope.oComponentConfiguration.flashAttributes:{};window.getOriginCity=function(){oScope.FlashOriginCityRequest.apply(oScope);};window.getPopularSearches=function(){return oScope.getPopularSearches.apply(oScope);};window.setJiffyMark=function(event){var data=typeof(arguments[1])!=="undefined"?arguments[1]:{};jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("on"+event,data);};jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("onBeforeFlashVersionCheck");var hasRequestedVersion=DetectFlashVer(oScope.oComponentConfiguration.flashVersion,0,0);if(hasRequestedVersion){var fC=document.createElement("div");fC.id="fC-"+oScope.oComponentConfiguration.flashContainer;if(typeof((oScope.getOriginCity()).city)!=="undefined"){oScope.oComponentConfiguration.flashVars.city=((oScope.getOriginCity()).city);}jQuery("#"+oScope.oComponentConfiguration.flashContainer).get(0).appendChild(fC);jQuery(fC).css({position:"absolute",left:"0",top:"0px",visibility:"hidden"});swfobject.embedSWF(oScope.oComponentConfiguration.flashFile,fC.id,oScope.oComponentConfiguration.flashWidth,oScope.oComponentConfiguration.flashHeight,oScope.oComponentConfiguration.flashVersion,"",oScope.oComponentConfiguration.flashVars,oScope.oComponentConfiguration.params,oScope.oComponentConfiguration.flashAttributes);jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("onFlashEmbedded");var dwI=false;var animate_overlay=function(){jQuery("#"+oScope.oComponentConfiguration.flashPlaceholerOverlay).animate({opacity:0},500,"linear",function(){jQuery("#"+oScope.oComponentConfiguration.flashPlaceholerOverlay).remove();jQuery(fC).css({position:"absolute",left:"0",visibility:"visible"});jQuery("#"+oScope.oComponentConfiguration.flashContainer).removeClass("loading");jQuery("#"+oScope.oComponentConfiguration.flashContainer).trigger("onFlashLoaded");clearInterval(dwI);});};dwI=setInterval(function(){var dw=jQuery("#"+oScope.oComponentConfiguration.flashAttributes.id).get(0);if(typeof(dw)=="undefined"||typeof(dw.PercentLoaded)!=="function"){clearInterval(dwI);animate_overlay.call();}if(typeof(dw)!=="undefined"&&typeof(dw.PercentLoaded)!=="undefined"&&dw.PercentLoaded()==100){clearInterval(dwI);animate_overlay.call();}},250);this.bComponentLoaded=true;}else{jQuery("#"+oScope.oComponentConfiguration.flashContainer).css({backgroundImage:"none"}).removeClass("loading").addClass("noscript");var non_flash_container=document.createElement("div");non_flash_container.id=oScope.oComponentConfiguration.nonFlashContainer;jQuery("#"+oScope.oComponentConfiguration.flashContainer).html("");jQuery("#"+oScope.oComponentConfiguration.flashContainer).append(non_flash_container);jQuery("#"+oScope.oComponentConfiguration.nonFlashContainer).html('<p>We&rsquo;re sorry! If you&rsquo;re seeing this message, then you&rsquo;re missing out on cheap travel deals, air travel deals, and travel package deals, including thousands of customized offers that meet your specific search criteria. Here&rsquo;s why:</p><ul><li>Either your browser is not flash enabled. <a href="http://get.adobe.com/flashplayer/" target="_blank">Click here to download the latest Adobe Flash player</a>.</li><li>Or, software is blocking this section from being displayed. Please turn off any ad-blocking utilities.</li></ul>');}}};return new FlashComponnet();}return{isComponentReady:function(){return component.isComponentReady();},getComponentConfiguration:function(){return component.getComponentConfiguration();},getComponentInstance:function(){if(!component){component=_Component();}},getOriginCity:function(){if(component){return component.getOriginCity();}return false;},setConfiguration:function(configuration){component.setComponentConfiguration(configuration);},setUpComponent:function(configuration){component.setUp(configuration);},subscribe:function(event,oListener){component.subscribeJiffYEvent(event,oListener);},setFlightSpecificDates:function(from,to){component.setFlightSpecificDates(from,to);}};})();DealsWizard.JSHistoryManager=(function(){var sUserAgent=navigator.userAgent.toLowerCase();var isOpera=(sUserAgent.match(/opera|compatible.*msie\s6.*mac/i))?1:0;var isIE=(sUserAgent.match(/compatible.*msie/)&&!isOpera)?1:0;var isAWK=(sUserAgent.match(/AppleWebKit.*khtml/i))?1:0;var isAWKver=parseInt(sUserAgent.replace(/.*AppleWebKit\//i,""),10);var jsReady=false;var s_history="";if(!Array.prototype.push){Array.prototype.push=function(e){this[this.length]=e;};}function JSHistoryManager(){}JSHistoryManager.prototype={oDate:false,oTime:false,sHistoryConnect:false,sDocumentTitle:document.title,oHistory:{},oIframeDocument:false,sHistory:"",bJsReady:false,oConfig:{},oHistoryWatcher:function(){var oScope=this;setInterval(function(){oScope.watchHistory(oScope);},201);},getIframeDocument:function(oIframe){if(oIframe.contentDocument){return oIframe.contentDocument;}else{if(oIframe.contentWindow){return oIframe.contentWindow.document;}else{if(oIframe.document){return oIframe.document;}}}return false;},setHistory:function(sNewSearch){var sHash=sNewSearch.replace("?","");if(isIE){this.oIframeDocument=this.getIframeDocument(this.oHistory.iframe);window.location.hash=this.oIframeDocument.location.search.replace("?","");if(sNewSearch){this.oHistory.currentHash=sHash;}document.title=this.documentTitle;}else{if(!isAWK||isAWKver>419){if("#"+sHash==window.location.hash){return false;}var sLocation=window.location.pathname;sLocation+=(sHash!=="")?window.location.search+"#"+sHash:"";if(sHash!==""){window.location.replace(sLocation);}this.oHistory.currentHash=window.location.hash;}}},watchHistory:function(){if(!isIE){if(this.oHistory.currentHash!==window.location.hash){this.oIframeDocument=this.getIframeDocument(this.oHistory.iframe);if(window.location.hash===""){this.oIframeDocument.location.replace(this.oHistory.src);this.oHistory.currentHash="";}else{var sQuery=window.location.hash.replace("#","");var sLocation=this.oHistory.src+"?"+sQuery;this.oIframeDocument.location.replace(sLocation);this.oHistory.currentHash=window.location.hash;}}}else{if(window.location.hash!=="#"+this.oHistory.currentHash){if(this.oHistory.iframe.src!==this.oHistory.src+window.location.hash.replace("#","?")){this.oHistory.iframe.src=this.oHistory.src+window.location.hash.replace("#","?");}}if(document.title!==this.sDocumentTitle){document.title=this.sDocumentTitle;}}},sendCurrentHistory:function(s_history){try{jQuery("#"+this.oConfig.flashAttributes.id).get(0).setHistory(s_history);}catch(e){}return(s_history==="")?false:true;},sendHistory:function(_queryString){s_history=_queryString;window.jsReady=DealsWizard.FlashComponent?DealsWizard.FlashComponent.isComponentReady():false;this.bJsReady=window.jsReady;if(this.bJsReady){try{jQuery("#"+this.oConfig.flashAttributes.id).get(0).setHistory(s_history);}catch(e){}}},isReady:function(){return bJsReady;},init:function(){window.jsReady=true;sendHistory(s_history);},setUp:function(JSHistoryConfig){window.jsReady=DealsWizard.FlashComponent?DealsWizard.FlashComponent.isComponentReady():false;var oScope=this,sHistorySrc=JSHistoryConfig.sHistorySrc,sHistoryIframe=JSHistoryConfig.sHistoryIframe,sJsCodeProxySrc=JSHistoryConfig.sJsCodeProxySrc,sJsCodeProxyIframe=JSHistoryConfig.sJsCodeProxyIframe,FlashConfig=JSHistoryConfig.FlashComponentConfig;this.oConfig=FlashConfig;this.oDate=new Date();this.oTime=this.oDate.getTime();this.sHistoryConnect="historyConnect"+this.oTime;this.oHistory.iframe=jQuery("#"+sHistoryIframe).get(0);this.oHistory.iframe.name=sHistoryIframe+this.oTime;this.oHistory.iframeID=sHistoryIframe;this.oHistory.src=sHistorySrc;this.oHistory.currentHash="";if(window.location.hash!==""){this.oIframeDocument=this.getIframeDocument(this.oHistory.iframe);this.oIframeDocument.location.replace(this.oHistory.src+"?"+window.location.hash.replace("#",""));}this.oHistoryWatcher.apply(this);window.sendCurrentHistory=function(){oScope.sendCurrentHistory.apply(oScope,arguments);};window.sendHistory=function(){oScope.sendHistory.apply(oScope,arguments);};window.isReady=function(){return window.jsReady;};var sHistory=(function(){var sLocation=document.location.toString();var sUrl=sLocation.split("#");var sBParams=sLocation.indexOf("#")>-1?1:0;if(sBParams){var sAParams=sUrl[1].split("&");}var sHistory="#";if(sBParams){for(var i=0;i<sAParams.length;i++){var a_namevalue=sAParams[i].split("=");sHistory+=sAParams[i]+"|";}}return sHistory;})();oScope.sendCurrentHistory.apply(oScope,[sHistory]);}};return JSHistoryManager;})();function GetCookie(Name){var search=Name+"=";var returnvalue="";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length;}returnvalue=unescape(document.cookie.substring(offset,end));}}return returnvalue;}// .
// *****END***** //

// The following js comes from: http://i.travelpn.com/js/jiffy.js //
var Jiffy=function(){this.addBulkLoad=function(_eventName,elapsedTime){measures.captured[_eventName]=elapsedTime;};this.getUID=function(){return Math.round(Math.random()*1000000000000000);};this.checkRemoveEvent=function(eventName){if(eventsForRemoval[eventName]!=null){var captureDetails=eventsForRemoval[eventName];Jiffy.utils.removeEvent(captureDetails.element_id,captureDetails.browser_event,captureDetails.callback_func,true);}};this.addMarksMeasures=function(referenceID,eventName,elapseTime,refTime){marks_measures.push({name:referenceID,evt:eventName,et:elapseTime,rt:refTime});};var eventsForRemoval={};var pageTimer=(window.JiffyParams!=undefined&&JiffyParams.jsStart!=undefined)?JiffyParams.jsStart:(new Date()).getTime();var pname=(window.JiffyParams!=undefined&&JiffyParams.pname!=undefined)?JiffyParams.pname:encodeURI(window.location);var uid=(window.JiffyParams!=undefined&&JiffyParams.uid!=undefined)?JiffyParams.uid:getUID();var cUri="/rx";var cMethod="get";var markers=[];var measures={pn:pname,st:pageTimer,uid:uid,captured:{}};var marks_measures=[];return{mark:function(referenceID){var currTime=(new Date()).getTime();markers[referenceID]={startTime:currTime,lastTime:currTime};},measure:function(eventName,referenceID){if(Jiffy.options.USE_JIFFY==undefined||!Jiffy.options.USE_JIFFY){return;}var _eventName=(typeof eventName=="string"?eventName:eventName.type);var currTime=new Date().getTime();var refStartTime;var elapsedTime;if(referenceID!=null&&markers[referenceID]!=null){refStartTime=markers[referenceID].lastTime;elapsedTime=currTime-refStartTime;markers[referenceID].lastTime=currTime;}else{refStartTime=pageTimer;elapsedTime=currTime-refStartTime;}if(referenceID!=null){addMarksMeasures(referenceID,_eventName,elapsedTime,refStartTime);}else{markers.PageStart={startTime:refStartTime,lastTime:currTime};addMarksMeasures("PageStart",_eventName,elapsedTime,refStartTime);}if(Jiffy.options.ISBULKLOAD&&_eventName!="unload"){addBulkLoad(_eventName,elapsedTime);}else{var curMeasures=Jiffy.utils.formatMeasure(_eventName,elapsedTime);Jiffy.Ajax.report(cMethod,cUri,{uid:uid,st:pageTimer,pn:pname,ets:curMeasures});}checkRemoveEvent(eventName);},_bulkLoad:function(){var bulkmeasures=Jiffy.getMeasures();var bulkmeasuresCount=bulkmeasures.length;var measuresStr="";for(x=0;x<bulkmeasuresCount;x++){measuresStr+=Jiffy.utils.formatMeasure(bulkmeasures[x].evt,bulkmeasures[x].et)+",";}measuresStr=measuresStr.replace(/\,$/g,"");Jiffy.Ajax.report(cMethod,cUri,{uid:uid,st:pageTimer,pn:pname,ets:measuresStr});},getMeasures:function(){return marks_measures;},clearMeasures:function(){marks_measures=[];markers=[];}};}();Jiffy.options={USE_JIFFY:true,ISBULKLOAD:true,ON_LOAD_BULKLOAD:true,BROWSER_EVENTS:{unload:window,load:window},SOFT_ERRORS:false};Jiffy.utils={inArray:function(ary,target){for(var i=0,len=ary.length;i<len;i++){if(target==ary[i]){return true;}}return false;},get:function(id){return document.getElementById(id);},onDOMReady:function(func){if(document.addEventListener){document.addEventListener("DOMContentLoaded",func,false);
/*@cc_on @*/
/*@if (@_win32)
	document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
	var script = document.getElementById("__ie_onload");
	script.onreadystatechange = function() {
	  if (this.readyState == "complete") {
		func.call();
	  }
	};
	/*@end @*/
}if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){func;}},10);}},on:function(elem,evt,func,bubble){bubble=bubble||false;if(evt=="DOMReady"){this.onDOMReady(func);return true;}else{var el=(typeof(elem)=="string")?this.get(elem):elem;if(window.addEventListener){el.addEventListener(evt,func,bubble);return true;}else{if(window.attachEvent){el.attachEvent("on"+evt,func);return true;}else{return false;}}}},serialize:function(obj){var str="";if(typeof(obj)=="object"){for(key in obj){str+=key+"="+obj[key]+"&";}}return str.replace(/&$/,"");},formatMeasure:function(name,val){return name+":"+val;},hashToJiffyList:function(obj){var str="";if(typeof(obj)=="object"){for(key in obj){if(typeof(obj[key])=="object"){Jiffy.utils.hashToJiffyList(obj[key]);}else{str+=Jiffy.utils.formatMeasure(key,obj[key])+",";}}}return str.replace(/,$/,"");},removeEvent:function(elem,evt,func,bubble){var el=(typeof(elem)=="string")?this.get(elem):elem;if(window.removeEventListener){el.removeEventListener(evt,func,bubble);return true;}else{if(window.detachEvent){el.detachEvent("on"+evt,func);return true;}else{return false;}}},getUID:function(){return Math.round(Math.random()*1000000000000000);},hashMerge:function(hash1,hash2){for(var option in hash1){if(hash2[option]!=null){hash2[option]=hash1[option];}}}};Jiffy.Ajax={connection:function(){return((window.XMLHttpRequest)?new XMLHttpRequest():(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null);},report:function(method,url,params,success,failure){var req=this.connection();var strParams=(typeof(params)=="string")?params:Jiffy.utils.serialize(params);url+="?"+strParams;req.onreadystatechange=(!success&&!failure)?function(){return;}:function(){if(req.readyState!=4){return;}if(req.status==200){if(success){success.call(req);}}else{if(failure){failure.call(req);}}};switch(method){case"get":req.open("GET",url,true);req.send(null);break;case"post":req.open("POST",url,true);req.send(strParams);break;case"img":var image=document.createElement("img");image.setAttribute("src",url);break;}}};Jiffy.init=function(){if(window.JiffyOptions!=undefined){Jiffy.utils.hashMerge(window.JiffyOptions,Jiffy.options);}if(Jiffy.options.USE_JIFFY==undefined||!Jiffy.options.USE_JIFFY){return;}var BROWSER_EVENTS=Jiffy.options.BROWSER_EVENTS;for(var bEvents in BROWSER_EVENTS){var objToBind=BROWSER_EVENTS[bEvents];if(objToBind){Jiffy.utils.on(objToBind,bEvents,Jiffy.measure);}}if(Jiffy.options.ISBULKLOAD&&Jiffy.options.ON_LOAD_BULKLOAD){Jiffy.utils.on(window,"load",Jiffy._bulkLoad);}};Jiffy.init();// .
// *****END***** //

// The following js comes from: http://i.travelpn.com/js/tvly-log.js //
var TvlyLog=function(){this.useJiffy=function(){return(Jiffy.options.USE_JIFFY!=undefined&&Jiffy.options.USE_JIFFY);};this.readCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return"";};this.getUID=function(){if(!useJiffy()){return"";}var jsessionid=readCookie("JSESSIONID");var sid=readCookie("SID");var tvlyGeo=readCookie("TVLY_GEO");return jsessionid+","+sid+","+tvlyGeo;};var pageTimer=(window.JiffyParams!=undefined&&JiffyParams.jsStart!=undefined)?JiffyParams.jsStart:(new Date()).getTime();var pname=(window.JiffyParams!=undefined&&JiffyParams.pname!=undefined)?JiffyParams.pname:encodeURI(window.location);var uid=(window.JiffyParams!=undefined&&JiffyParams.uid!=undefined)?JiffyParams.uid:getUID();return{report:function(){if(!useJiffy()){return;}var bulkmeasures=Jiffy.getMeasures();var bulkmeasuresCount=bulkmeasures.length;var measuresStr="";for(x=0;x<bulkmeasuresCount;x++){measuresStr+=Jiffy.utils.formatMeasure(bulkmeasures[x].evt,bulkmeasures[x].et)+",";}measuresStr=measuresStr.replace(/\,$/g,"");var cUri=(window.TvlyLogParams!=undefined&&TvlyLogParams.cUri!=undefined)?TvlyLogParams.cUri:"/rx";var cMethod=(window.TvlyLogParams!=undefined&&TvlyLogParams.cMethod!=undefined)?TvlyLogParams.cMethod:"img";Jiffy.Ajax.report(cMethod,cUri,{uid:uid,st:pageTimer,pn:pname,ets:measuresStr});}};}();// .
// *****END***** //
