var d=document;var isDOM=d.getElementById?1:0,isIE=d.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?d:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');if(typeof addvent!='function'){var addvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addvent._i++;o._evts[t][f._i]=f};addvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='highlighted';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.hideOnClick=true;this.animInSpeed=0.5;this.animOutSpeed=0.25;this.animations=[]};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};FSMenu.prototype.hideAll=function(){with(this){for(var m in menus)if(menus[m].visible&&!menus[m].isRoot)menus[m].hide(true)}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot&&hideDelay>=0){timer=setTimeout('try{'+myName+'.menus["'+id+'"].hide()}catch(err){}',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addvent(ref,'mouseover',this.over);addvent(ref,'mouseout',this.out);if(obj.nested){addvent(ref,'focus',this.over);addvent(ref,'click',this.over);addvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(forced){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);lyr.ref.parentNode.style.zIndex='2';setVis(1,forced)}};FSMenuNode.prototype.hide=function(forced){with(this)with(obj){if(!lyr||!lyr.ref||!visible)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);lyr.ref.parentNode.style.zIndex='1';setVis(0,forced)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh,forced){with(this)with(obj){if(lyr.forced&&!forced)return;lyr.forced=forced;lyr.timer=lyr.timer||0;lyr.counter=lyr.counter||0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;var speed=sh?animInSpeed:animOutSpeed;if(isDOM&&speed<1)for(var a=0;a<animations.length;a++)animations[a](ref,counter,sh);counter+=speed*(sh?1:-1);fct=counter+speed*(sh?1:-1);if(counter<1&&fct>1)counter=1;if(counter>0&&fct<0)counter=0;if(counter>1){counter=1;lyr.forced=false}else if(counter<0){counter=0;sty[cssProp]=cssHid;lyr.forced=false}else if(isDOM){timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+','+forced+')',50)}}}};FSMenu.animSwipeDown=function(ref,counter,show){if(show&&(counter==0)){ref._fsm_styT=ref.style.top;ref._fsm_styMT=ref.style.marginTop;ref._fsm_offT=ref.offsetTop||0}var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);var clipY=ref.offsetHeight*(1-cP);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect('+clipY+'px,'+ref.offsetWidth+'px,'+ref.offsetHeight+'px,0)');if(counter==1||(counter<0.01&&!show)){ref.style.top=ref._fsm_styT;ref.style.marginTop=ref._fsm_styMT}else{ref.style.top=((0-clipY)+(ref._fsm_offT))+'px';ref.style.marginTop='0'}};FSMenu.animFade=function(ref,counter,show){var done=(counter==1);if(ref.filters){var alpha=!done?' alpha(opacity='+parseInt(counter*100)+')':'';if(ref.style.filter.indexOf("alpha")==-1)ref.style.filter+=alpha;else ref.style.filter=ref.style.filter.replace(/\s*alpha\([^\)]*\)/i,alpha)}else ref.style.opacity=ref.style.MozOpacity=counter/1.001};FSMenu.animClipDown=function(ref,counter,show){var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect(0,'+ref.offsetWidth+'px,'+(ref.offsetHeight*cP)+'px,0)')};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!d.documentElement)return;var fsmFB=getRef('fsmenu-fallback');if(fsmFB){fsmFB.rel='alternate stylesheet';fsmFB.disabled=true}var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var evtProp=navigator.userAgent.indexOf('Safari')>-1||isOp?'safRtnVal':'returnValue';var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function('e','if(e.'+evtProp+'!=false)'+myName+'.hide("'+menuID+'")');addvent(a,'mouseover',eShow);addvent(a,'focus',eShow);addvent(a,'mouseout',eHide);addvent(a,'blur',eHide);if(sOC)addvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.'+evtProp+'=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}if(isIE&&!isOp){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)node.onfocus(e);node=node.parentNode}'));addvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}if(hideOnClick)addvent(mRoot,'click',new Function(myName+'.hideAll()'));menus[id]=new FSMenuNode(id,true,this)}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;d.fsmMM=d.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};d.captureEvents(Event.MOUSEMOVE);d.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return d.fsmMM?d.fsmMM(e):d.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}
var screenD,bmaD;
var ttl=escape(d.title.replace(/^Travelerous -/,""));
function bookmark() {
 screenD=d.createElement("div");
 screenD.setAttribute("id","screen");
 d.body.appendChild(screenD);
 bmaD=d.createElement("div");
 bmaD.setAttribute("id","bma");
 var txt='<div style="padding:12px;" class="bmal"><h1>Bookmark This Page With</h1><div class="hr"></div>';
 txt+='<div><a target="bm" href="http://del.icio.us/post?url='+escape(window.location)+'&title='+ttl;
 txt+='"><img src="/i/b/delicious.gif" class="bmi" alt=""/> Del.icio.us</a></div>';
 txt+='<div><a target="bm" href="http://www.facebook.com/sharer.php?u='+escape(window.location)+'&t='+ttl;
 txt+='"><img src="/i/b/facebook.gif" class="bmi" alt=""/> Facebook</a></div>';
 txt+='<div><a target="bm" href="http://www.furl.net/storeIt.jsp?u='+escape(window.location)+'&t='+ttl;
 txt+='"><img src="/i/b/furl.gif" class="bmi" alt=""/> Furl.net</a></div>';
 txt+='<div><a target="bm" href="http://www.mister-wong.com/index.php?action=addurl&bm_notice=&bm_tags=&bm_url=';
 txt+=escape(window.location)+'&bm_description='+ttl;
 txt+='"><img src="/i/b/misterwong.gif" class="bmi" alt=""/> Mister Wong</a></div>';
 txt+='<div><a target="bm" href="http://reddit.com/submit?url='+escape(window.location)+'&title='+ttl;
 txt+='"><img src="/i/b/reddit.gif" class="bmi" alt=""/> reddit</a></div>';
 txt+='<div><a target="bm" href="http://www.stumbleupon.com/submit?url='+escape(window.location)+'&title='+ttl;
 txt+='"><img src="/i/b/stumble.gif" class="bmi" alt=""/> StumbleUpon</a></div>';
 txt+='</div><div style="float:right;margin:12px"><button class="sbtn" type="button" onclick="close_screen()">';
 txt+='Close</button></div>';
 bmaD.innerHTML=txt;
 d.body.appendChild(bmaD);
}
function gsrch() {
 screenD=d.createElement("div");
 screenD.setAttribute("id","screen");
 d.body.appendChild(screenD);
 bmaD=d.createElement("div");
 bmaD.setAttribute("id","bma");
 var txt='<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">';
 txt+='<div style="padding:12px;" class="bmal"><h1>Custom Search the Web with Google</h1><div class="hr"></div>';
 txt+='<div><input type="hidden" name="cx" value="partner-pub-9924717062678968:ojhwgi-b5yy"/>';
 txt+='<input type="hidden" name="ie" value="ISO-8859-1"/><input type="text" name="q" class="fm" size="80" style="width:80%"/>';
 txt+=' <input type="submit" name="sa" value="Search" style="margin-right:8px;"/>';
 txt+='<button class="sbtn" type="button" onclick="close_screen()">Close</button></div></div></form>';
 bmaD.innerHTML=txt;
 d.body.appendChild(bmaD);
 var jm=d.createElement("SCRIPT");
 jm.type="text/javascript";
 jm.src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en";
 d.body.appendChild(jm);
}
function addRSS(link) {
 screenD=d.createElement("div");
 screenD.setAttribute("id","screen");
 d.body.appendChild(screenD);
 bmaD=d.createElement("div");
 bmaD.setAttribute("id","bma");
 var txt='<div style="padding:12px;" class="bmal"><h1>Get Page Updates Via RSS With</h1><div class="hr"></div>';
 txt+='<div class="fder"><a href="http://www.bloglines.com/sub/'+escape(link);
 txt+='">Bloglines</a></div>';
 txt+='<div class="fder"><a href="http://fusion.google.com/add?feedurl='+escape(link);
 txt+='">Google</a></div>';
 txt+='<div class="fder"><a href="http://feeds.my.aol.com/add.jsp?url='+escape(link);
 txt+='">My AOL</a></div>';
 txt+='<div class="fder"><a href="http://add.my.yahoo.com/rss?url='+escape(link);
 txt+='">My Yahoo!</a></div>';
 txt+='<div class="fder"><a href="http://www.netvibes.com/subscribe.php?url='+escape(link);
 txt+='">Netvibes</a></div><br/>';
 txt+='<div class="fder"><a href="http://www.newsgator.com/ngs/subscriber/subexp.aspx?url='+escape(link);
 txt+='">Newsgator</a></div>';
 txt+='<div class="fder"><a href="http://www.pageflakes.com/subscribe.aspx?url='+escape(link);
 txt+='">Pageflakes</a></div>';
 txt+='<div class="fder"><a href="http://www.rojo.com/add-subscription?resource='+escape(link);
 txt+='">Rojo</a></div>';
 txt+='<div class="fder"><a href="'+link;
 txt+='">Your Web Browser</a></div>';
 txt+='</div><div style="float:right;margin:12px"><button class="sbtn" type="button" onclick="close_screen()">';
 txt+='Close</button></div>';
 bmaD.innerHTML=txt;
 d.body.appendChild(bmaD);
}
function emailPage() {
 var tm=0;
 screenD=d.createElement("div");
 screenD.setAttribute("id","screen");
 d.body.appendChild(screenD);
 bmaD=d.createElement("div");
 bmaD.setAttribute("id","bma");
 bmaD.style.top='30%';
 d.body.appendChild(bmaD);
 try {
  new Ajax("", {method:"get"});
 }
 catch(err) {
  var jm=d.createElement("SCRIPT");
  jm.type="text/javascript";
  jm.src="/mt.js";
  d.body.appendChild(jm);
  bmaD.innerHTML='<div style="padding:12px;" class="bmal"><h1>Loading...</h1></div>';
  tm=999;
 }
 setTimeout('new Ajax("/email_this_page.php", { method:"post", update:$("bma"), data:("title='+ttl+'&url='+escape(window.location)+'") }).request();',tm);
}
function close_screen() {
 d.body.removeChild(screenD);
 d.body.removeChild(bmaD);
}
function sendEmail() {
 new Ajax("/email_this_page.php", { method:"post", update:$("bma"), data:('title='+ttl+'&url='+escape(window.location)+'&from_name='+escape(d.etp.from_name.value)+'&from_email='+escape(d.etp.from_email.value)+'&to_name='+escape(d.etp.to_name.value)+'&to_email='+escape(d.etp.to_email.value)+'&subject='+escape(d.etp.subject.value)+'&message='+escape(d.etp.message.value)+'&confirmation='+escape(d.etp.confirmation.value)+'&act=now') }).request();
}

