if(typeof MQA=="undefined"){window.MQA={}}(function(){var C=function(G,D,I,J,E){var F=document.createElement("script"),H="";H="http://"+D+"/longurl/v1/?data="+encodeURIComponent(G)+"&callback=MQA.LongURL.CALLBACKS['"+I+"']";if(J){H+="&id="+J}if(E){H+="&done=true"}F.type="text/javascript";F.src=H;document.body.appendChild(F)},A=0,B=function(){return("c"+new Date().getTime()+(++A))};MQA.LongURL=function(E,D){if(!D){D={}}this.url=E;this.maxLength=D.maxLength||1900;this.server=D.server||"platform.beta.mapquest.com";this.parts=[];this.callbackId=B()};MQA.LongURL.prototype={send:function(){var D=this.url.length,F=0,E=this;while(F<D){this.parts.push(this.url.substring(F,(F+this.maxLength)));F=F+this.maxLength}MQA.LongURL.CALLBACKS[this.callbackId]=function(G){E.getNext(G)};this.getNext(null)},getNext:function(E){var F=this.parts.shift(),G,D=false;if(!F){return }if(E&&E.id){G=E.id}if(this.parts.length==0){D=true}C(F,this.server,this.callbackId,G,D)}};MQA.LongURL.CALLBACKS={}})();