
json_parse=(function(){
var at,
ch,
escapee={'"':'"','\\':'\\','/':'/',
b:'\b',
f:'\f',
n:'\n',
r:'\r',
t:'\t'},
text,
error=function(m){
throw{
name:'SyntaxError',
message:m,
at:at,
text:text};},
next=function(c){
if(c&&c!==ch){
error("Expected '"+c+"' instead of '"+ch+"'");}
ch=text.charAt(at);
at+=1;
return ch;},
number=function(){
var number,
string='';
if(ch==='-'){
string='-';
next('-');}
while(ch>='0'&&ch<='9'){
string+=ch;
next();}
if(ch==='.'){
string+='.';
while(next()&&ch>='0'&&ch<='9'){
string+=ch;}}
if(ch==='e'||ch==='E'){
string+=ch;
next();
if(ch==='-'||ch==='+'){
string+=ch;
next();}
while(ch>='0'&&ch<='9'){
string+=ch;
next();}}
number=+string;
if(isNaN(number)){
error("Bad number");}else{
return number;}},
string=function(){
var hex,
i,
string='',
uffff;
if(ch==='"'){
while(next()){
if(ch==='"'){
next();
return string;}else if(ch==='\\'){
next();
if(ch==='u'){
uffff=0;
for(i=0;i<4;i+=1){
hex=parseInt(next(),16);
if(!isFinite(hex)){
break;}
uffff=uffff*16+hex;}
string+=String.fromCharCode(uffff);}else if(typeof escapee[ch]==='string'){
string+=escapee[ch];}else{
break;}}else{
string+=ch;}}}
error("Bad string");},
white=function(){
while(ch&&ch<=' '){
next();}},
word=function(){
switch(ch){
case't':
next('t');
next('r');
next('u');
next('e');
return true;
case'f':
next('f');
next('a');
next('l');
next('s');
next('e');
return false;
case'n':
next('n');
next('u');
next('l');
next('l');
return null;}
error("Unexpected '"+ch+"'");},
value,
array=function(){
var array=[];
if(ch==='['){
next('[');
white();
if(ch===']'){
next(']');
return array;}
while(ch){
array.push(value());
white();
if(ch===']'){
next(']');
return array;}
next(',');
white();}}
error("Bad array");},
object=function(){
var key,
object={};
if(ch==='{'){
next('{');
white();
if(ch==='}'){
next('}');
return object;}
while(ch){
key=string();
white();
next(':');
if(Object.hasOwnProperty.call(object,key)){
error('Duplicate key "'+key+'"');}
object[key]=value();
white();
if(ch==='}'){
next('}');
return object;}
next(',');
white();}}
error("Bad object");};
value=function(){
white();
switch(ch){
case'{':
return object();
case'[':
return array();
case'"':
return string();
case'-':
return number();
default:
return ch>='0'&&ch<='9'?number():word();}};
return function(source,reviver){
var result;
text=source;
at=0;
ch=' ';
result=value();
white();
if(ch){
error("Syntax error");}
return typeof reviver==='function'?(function walk(holder,key){
var k,v,value=holder[key];
if(value&&typeof value==='object'){
for(k in value){
if(Object.hasOwnProperty.call(value,k)){
v=walk(value,k);
if(v!==undefined){
value[k]=v;}else{
delete value[k];}}}}
return reviver.call(holder,key,value);}({'':result},'')):result;};}());
Date.dayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
Date.abbrDayNames=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];
Date.monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];
Date.abbrMonthNames=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
Date.firstDayOfWeek=1;
Date.format='dd/mm/yyyy';
Date.fullYearStart='20';
(function(){
function add(name,method){
if(!Date.prototype[name]){
Date.prototype[name]=method;}};
add("isLeapYear",function(){
var y=this.getFullYear();
return(y%4==0&&y%100!=0)||y%400==0;});
add("isWeekend",function(){
return this.getDay()==0||this.getDay()==6;});
add("isWeekDay",function(){
return!this.isWeekend();});
add("getDaysInMonth",function(){
return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()];});
add("getDayName",function(abbreviated){
return abbreviated?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()];});
add("getMonthName",function(abbreviated){
return abbreviated?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()];});
add("getDayOfYear",function(){
var tmpdtm=new Date("1/1/"+this.getFullYear());
return Math.floor((this.getTime()-tmpdtm.getTime())/86400000);});
add("getWeekOfYear",function(){
return Math.ceil(this.getDayOfYear()/7);});
add("setDayOfYear",function(day){
this.setMonth(0);
this.setDate(day);
return this;});
add("addYears",function(num){
this.setFullYear(this.getFullYear()+num);
return this;});
add("addMonths",function(num){
var tmpdtm=this.getDate();
this.setMonth(this.getMonth()+num);
if(tmpdtm>this.getDate())
this.addDays(-this.getDate());
return this;});
add("addDays",function(num){
this.setDate(this.getDate()+num);
return this;});
add("addHours",function(num){
this.setHours(this.getHours()+num);
return this;});
add("addMinutes",function(num){
this.setMinutes(this.getMinutes()+num);
return this;});
add("addSeconds",function(num){
this.setSeconds(this.getSeconds()+num);
return this;});
add("zeroTime",function(){
this.setMilliseconds(0);
this.setSeconds(0);
this.setMinutes(0);
this.setHours(0);
return this;});
add("asString",function(){
var r=Date.format;
return r.split('yyyy').join(this.getFullYear()).split('yy').join((this.getFullYear()+'').substring(2)).split('mmm').join(this.getMonthName(true)).split('mm').join(_zeroPad(this.getMonth()+1)).split('dd').join(_zeroPad(this.getDate()));});
Date.fromString=function(s){
var f=Date.format;
var d=new Date('01/01/1977');
var iY=f.indexOf('yyyy');
if(iY>-1){
d.setFullYear(Number(s.substr(iY,4)));}else{
d.setFullYear(Number(Date.fullYearStart+s.substr(f.indexOf('yy'),2)));}
var iM=f.indexOf('mmm');
if(iM>-1){
var mStr=s.substr(iM,3);
for(var i=0;i<Date.abbrMonthNames.length;i++){
if(Date.abbrMonthNames[i]==mStr)break;}
d.setMonth(i);}else{
d.setMonth(Number(s.substr(f.indexOf('mm'),2))-1);}
d.setDate(Number(s.substr(f.indexOf('dd'),2)));
if(isNaN(d.getTime())){
return false;}
return d;};
var _zeroPad=function(num){
var s='0'+num;
return s.substring(s.length-2)};})();
var isIE=navigator.userAgent.toLowerCase().indexOf("msie")>-1;var isMoz=document.implementation&&document.implementation.createDocument;var isSafari=((navigator.userAgent.toLowerCase().indexOf("safari")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("mac")!=-1))?true:false;function curvyCorners(){if(typeof(arguments[0])!="object"){throw newCurvyError("First parameter of curvyCorners() must be an object.")}if(typeof(arguments[1])!="object"&&typeof(arguments[1])!="string"){throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.")}if(typeof(arguments[1])=="string"){var G=0;var A=getElementsByClass(arguments[1])}else{var G=1;var A=arguments}var D=new Array();if(arguments[0].validTags){var F=arguments[0].validTags}else{var F=["div"]}for(var C=G,B=A.length;C<B;C++){var E=A[C].tagName.toLowerCase();if(inArray(F,E)!==false){D[D.length]=new curvyObject(arguments[0],A[C])}}this.objects=D;this.applyCornersToAll=function(){for(var H=0,I=this.objects.length;H<I;H++){this.objects[H].applyCorners()}}}function curvyObject(){this.box=arguments[1];this.settings=arguments[0];this.topContainer=null;this.bottomContainer=null;this.masterCorners=new Array();this.contentDIV=null;var G=get_style(this.box,"height","height");var D=get_style(this.box,"width","width");var A=get_style(this.box,"borderTopWidth","border-top-width");var H=get_style(this.box,"borderTopColor","border-top-color");var C=get_style(this.box,"backgroundColor","background-color");var E=get_style(this.box,"backgroundImage","background-image");var B=get_style(this.box,"position","position");var F=get_style(this.box,"paddingTop","padding-top");this.boxHeight=parseInt(((G!=""&&G!="auto"&&G.indexOf("%")==-1)?G.substring(0,G.indexOf("px")):this.box.scrollHeight));this.boxWidth=parseInt(((D!=""&&D!="auto"&&D.indexOf("%")==-1)?D.substring(0,D.indexOf("px")):this.box.scrollWidth));this.borderWidth=parseInt(((A!=""&&A.indexOf("px")!==-1)?A.slice(0,A.indexOf("px")):0));this.boxColour=format_colour(C);this.boxPadding=parseInt(((F!=""&&F.indexOf("px")!==-1)?F.slice(0,F.indexOf("px")):0));this.borderColour=format_colour(H);this.borderString=this.borderWidth+"px solid "+this.borderColour;this.backgroundImage=((E!="none")?E:"");this.boxContent=this.box.innerHTML;if(B!="absolute"){this.box.style.position="relative"}this.box.style.padding="0px";if(isIE&&D=="auto"&&G=="auto"){this.box.style.width="100%"}if(this.settings.autoPad==true&&this.boxPadding>0){this.box.innerHTML=""}this.applyCorners=function(){for(var Z=0;Z<2;Z++){switch(Z){case 0:if(this.settings.tl||this.settings.tr){var W=document.createElement("DIV");W.style.width="100%";W.style.fontSize="1px";W.style.overflow="hidden";W.style.position="absolute";W.style.paddingLeft=this.borderWidth+"px";W.style.paddingRight=this.borderWidth+"px";var R=Math.max(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);W.style.height=R+"px";W.style.top=0-R+"px";W.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(W)}break;case 1:if(this.settings.bl||this.settings.br){var W=document.createElement("DIV");W.style.width="100%";W.style.fontSize="1px";W.style.overflow="hidden";W.style.position="absolute";W.style.paddingLeft=this.borderWidth+"px";W.style.paddingRight=this.borderWidth+"px";var X=Math.max(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);W.style.height=X+"px";W.style.bottom=0-X+"px";W.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(W)}break}}if(this.topContainer){this.box.style.borderTopWidth="0px"}if(this.bottomContainer){this.box.style.borderBottomWidth="0px"}var d=["tr","tl","br","bl"];for(var h in d){if(h>-1<4){var c=d[h];if(!this.settings[c]){if(((c=="tr"||c=="tl")&&this.topContainer!=null)||((c=="br"||c=="bl")&&this.bottomContainer!=null)){var V=document.createElement("DIV");V.style.position="relative";V.style.fontSize="1px";V.style.overflow="hidden";if(this.backgroundImage==""){V.style.backgroundColor=this.boxColour}else{V.style.backgroundImage=this.backgroundImage}switch(c){case"tl":V.style.height=R-this.borderWidth+"px";V.style.marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";V.style.borderLeft=this.borderString;V.style.borderTop=this.borderString;V.style.left=-this.borderWidth+"px";break;case"tr":V.style.height=R-this.borderWidth+"px";V.style.marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";V.style.borderRight=this.borderString;V.style.borderTop=this.borderString;V.style.backgroundPosition="-"+(R+this.borderWidth)+"px 0px";V.style.left=this.borderWidth+"px";break;case"bl":V.style.height=X-this.borderWidth+"px";V.style.marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";V.style.borderLeft=this.borderString;V.style.borderBottom=this.borderString;V.style.left=-this.borderWidth+"px";V.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(X+this.borderWidth))+"px";break;case"br":V.style.height=X-this.borderWidth+"px";V.style.marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";V.style.borderRight=this.borderString;V.style.borderBottom=this.borderString;V.style.left=this.borderWidth+"px";V.style.backgroundPosition="-"+(X+this.borderWidth)+"px -"+(this.boxHeight+(X+this.borderWidth))+"px";break}}}else{if(this.masterCorners[this.settings[c].radius]){var V=this.masterCorners[this.settings[c].radius].cloneNode(true)}else{var V=document.createElement("DIV");V.style.height=this.settings[c].radius+"px";V.style.width=this.settings[c].radius+"px";V.style.position="absolute";V.style.fontSize="1px";V.style.overflow="hidden";var M=parseInt(this.settings[c].radius-this.borderWidth);for(var T=0,g=this.settings[c].radius;T<g;T++){if((T+1)>=M){var O=-1}else{var O=(Math.floor(Math.sqrt(Math.pow(M,2)-Math.pow((T+1),2)))-1)}if(M!=g){if((T)>=M){var L=-1}else{var L=Math.ceil(Math.sqrt(Math.pow(M,2)-Math.pow(T,2)))}if((T+1)>=g){var J=-1}else{var J=(Math.floor(Math.sqrt(Math.pow(g,2)-Math.pow((T+1),2)))-1)}}if((T)>=g){var I=-1}else{var I=Math.ceil(Math.sqrt(Math.pow(g,2)-Math.pow(T,2)))}if(O>-1){this.drawPixel(T,0,this.boxColour,100,(O+1),V,-1,this.settings[c].radius)}if(M!=g){for(var S=(O+1);S<L;S++){if(this.settings.antiAlias){if(this.backgroundImage!=""){var K=(pixelFraction(T,S,M)*100);if(K<30){this.drawPixel(T,S,this.borderColour,100,1,V,0,this.settings[c].radius)}else{this.drawPixel(T,S,this.borderColour,100,1,V,-1,this.settings[c].radius)}}else{var b=BlendColour(this.boxColour,this.borderColour,pixelFraction(T,S,M));this.drawPixel(T,S,b,100,1,V,0,this.settings[c].radius,c)}}}if(this.settings.antiAlias){if(J>=L){if(L==-1){L=0}this.drawPixel(T,L,this.borderColour,100,(J-L+1),V,0,0)}}else{if(J>=O){this.drawPixel(T,(O+1),this.borderColour,100,(J-O),V,0,0)}}var Q=this.borderColour}else{var Q=this.boxColour;var J=O}if(this.settings.antiAlias){for(var S=(J+1);S<I;S++){this.drawPixel(T,S,Q,(pixelFraction(T,S,g)*100),1,V,((this.borderWidth>0)?0:-1),this.settings[c].radius)}}}this.masterCorners[this.settings[c].radius]=V.cloneNode(true)}if(c!="br"){for(var Z=0,f=V.childNodes.length;Z<f;Z++){var U=V.childNodes[Z];var e=parseInt(U.style.top.substring(0,U.style.top.indexOf("px")));var m=parseInt(U.style.left.substring(0,U.style.left.indexOf("px")));var o=parseInt(U.style.height.substring(0,U.style.height.indexOf("px")));if(c=="tl"||c=="bl"){U.style.left=this.settings[c].radius-m-1+"px"}if(c=="tr"||c=="tl"){U.style.top=this.settings[c].radius-o-e+"px"}switch(c){case"tr":U.style.backgroundPosition="-"+Math.abs((this.boxWidth-this.settings[c].radius+this.borderWidth)+m)+"px -"+Math.abs(this.settings[c].radius-o-e-this.borderWidth)+"px";break;case"tl":U.style.backgroundPosition="-"+Math.abs((this.settings[c].radius-m-1)-this.borderWidth)+"px -"+Math.abs(this.settings[c].radius-o-e-this.borderWidth)+"px";break;case"bl":U.style.backgroundPosition="-"+Math.abs((this.settings[c].radius-m-1)-this.borderWidth)+"px -"+Math.abs((this.boxHeight+this.settings[c].radius+e)-this.borderWidth)+"px";break}}}}if(V){switch(c){case"tl":if(V.style.position=="absolute"){V.style.top="0px"}if(V.style.position=="absolute"){V.style.left="0px"}if(this.topContainer){this.topContainer.appendChild(V)}break;case"tr":if(V.style.position=="absolute"){V.style.top="0px"}if(V.style.position=="absolute"){V.style.right="0px"}if(this.topContainer){this.topContainer.appendChild(V)}break;case"bl":if(V.style.position=="absolute"){V.style.bottom="0px"}if(V.style.position=="absolute"){V.style.left="0px"}if(this.bottomContainer){this.bottomContainer.appendChild(V)}break;case"br":if(V.style.position=="absolute"){V.style.bottom="0px"}if(V.style.position=="absolute"){V.style.right="0px"}if(this.bottomContainer){this.bottomContainer.appendChild(V)}break}}}}var Y=new Array();Y.t=Math.abs(this.settings.tl.radius-this.settings.tr.radius);Y.b=Math.abs(this.settings.bl.radius-this.settings.br.radius);for(z in Y){if(z=="t"||z=="b"){if(Y[z]){var l=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");var N=document.createElement("DIV");N.style.height=Y[z]+"px";N.style.width=this.settings[l].radius+"px";N.style.position="absolute";N.style.fontSize="1px";N.style.overflow="hidden";N.style.backgroundColor=this.boxColour;switch(l){case"tl":N.style.bottom="0px";N.style.left="0px";N.style.borderLeft=this.borderString;this.topContainer.appendChild(N);break;case"tr":N.style.bottom="0px";N.style.right="0px";N.style.borderRight=this.borderString;this.topContainer.appendChild(N);break;case"bl":N.style.top="0px";N.style.left="0px";N.style.borderLeft=this.borderString;this.bottomContainer.appendChild(N);break;case"br":N.style.top="0px";N.style.right="0px";N.style.borderRight=this.borderString;this.bottomContainer.appendChild(N);break}}var P=document.createElement("DIV");P.style.position="relative";P.style.fontSize="1px";P.style.overflow="hidden";P.style.backgroundColor=this.boxColour;P.style.backgroundImage=this.backgroundImage;switch(z){case"t":if(this.topContainer){if(this.settings.tl.radius&&this.settings.tr.radius){P.style.height=R-this.borderWidth+"px";P.style.marginLeft=this.settings.tl.radius-this.borderWidth+"px";P.style.marginRight=this.settings.tr.radius-this.borderWidth+"px";P.style.borderTop=this.borderString;if(this.backgroundImage!=""){P.style.backgroundPosition="-"+(R-this.borderWidth)+"px 0px"}this.topContainer.appendChild(P)}this.box.style.backgroundPosition="0px -"+(R-this.borderWidth)+"px"}break;case"b":if(this.bottomContainer){if(this.settings.bl.radius&&this.settings.br.radius){P.style.height=X-this.borderWidth+"px";P.style.marginLeft=this.settings.bl.radius-this.borderWidth+"px";P.style.marginRight=this.settings.br.radius-this.borderWidth+"px";P.style.borderBottom=this.borderString;if(this.backgroundImage!=""){P.style.backgroundPosition="-"+(X-this.borderWidth)+"px -"+(this.boxHeight+(R-this.borderWidth))+"px"}this.bottomContainer.appendChild(P)}}break}}}if(this.settings.autoPad==true&&this.boxPadding>0){var a=document.createElement("DIV");a.style.position="relative";a.innerHTML=this.boxContent;a.className="autoPadDiv";var n=Math.abs(R-this.boxPadding);var p=Math.abs(X-this.boxPadding);if(R<this.boxPadding){a.style.paddingTop=n+"px"}if(X<this.boxPadding){a.style.paddingBottom=X+"px"}a.style.paddingLeft=this.boxPadding+"px";a.style.paddingRight=this.boxPadding+"px";this.contentDIV=this.box.appendChild(a)}};this.drawPixel=function(R,O,I,N,P,Q,K,M){var J=document.createElement("DIV");J.style.height=P+"px";J.style.width="1px";J.style.position="absolute";J.style.fontSize="1px";J.style.overflow="hidden";var L=Math.max(this.settings.tr.radius,this.settings.tl.radius);if(K==-1&&this.backgroundImage!=""){J.style.backgroundImage=this.backgroundImage;J.style.backgroundPosition="-"+(this.boxWidth-(M-R)+this.borderWidth)+"px -"+((this.boxHeight+L+O)-this.borderWidth)+"px"}else{J.style.backgroundColor=I}if(N!=100){setOpacity(J,N)}J.style.top=O+"px";J.style.left=R+"px";Q.appendChild(J)}}function insertAfter(B,C,A){B.insertBefore(C,A.nextSibling)}function BlendColour(L,J,G){var D=parseInt(L.substr(1,2),16);var K=parseInt(L.substr(3,2),16);var F=parseInt(L.substr(5,2),16);var C=parseInt(J.substr(1,2),16);var I=parseInt(J.substr(3,2),16);var E=parseInt(J.substr(5,2),16);if(G>1||G<0){G=1}var H=Math.round((D*G)+(C*(1-G)));if(H>255){H=255}if(H<0){H=0}var B=Math.round((K*G)+(I*(1-G)));if(B>255){B=255}if(B<0){B=0}var A=Math.round((F*G)+(E*(1-G)));if(A>255){A=255}if(A<0){A=0}return"#"+IntToHex(H)+IntToHex(B)+IntToHex(A)}function IntToHex(A){base=A/16;rem=A%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+""+remS}function MakeHex(A){if((A>=0)&&(A<=9)){return A}else{switch(A){case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F"}}}function pixelFraction(H,G,A){var C=0;var B=new Array(1);var F=new Array(1);var I=0;var D="";var E=Math.sqrt((Math.pow(A,2)-Math.pow(H,2)));if((E>=G)&&(E<(G+1))){D="Left";B[I]=0;F[I]=E-G;I=I+1}var E=Math.sqrt((Math.pow(A,2)-Math.pow(G+1,2)));if((E>=H)&&(E<(H+1))){D=D+"Top";B[I]=E-H;F[I]=1;I=I+1}var E=Math.sqrt((Math.pow(A,2)-Math.pow(H+1,2)));if((E>=G)&&(E<(G+1))){D=D+"Right";B[I]=1;F[I]=E-G;I=I+1}var E=Math.sqrt((Math.pow(A,2)-Math.pow(G,2)));if((E>=H)&&(E<(H+1))){D=D+"Bottom";B[I]=E-H;F[I]=0}switch(D){case"LeftRight":C=Math.min(F[0],F[1])+((Math.max(F[0],F[1])-Math.min(F[0],F[1]))/2);break;case"TopRight":C=1-(((1-B[0])*(1-F[1]))/2);break;case"TopBottom":C=Math.min(B[0],B[1])+((Math.max(B[0],B[1])-Math.min(B[0],B[1]))/2);break;case"LeftBottom":C=(F[0]*B[1])/2;break;default:C=1}return C}function rgb2Hex(B){try{var C=rgb2Array(B);var G=parseInt(C[0]);var E=parseInt(C[1]);var A=parseInt(C[2]);var D="#"+IntToHex(G)+IntToHex(E)+IntToHex(A)}catch(F){alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex")}return D}function rgb2Array(A){var C=A.substring(4,A.indexOf(")"));var B=C.split(", ");return B}function setOpacity(F,C){C=(C==100)?99.999:C;if(isSafari&&F.tagName!="IFRAME"){var B=rgb2Array(F.style.backgroundColor);var E=parseInt(B[0]);var D=parseInt(B[1]);var A=parseInt(B[2]);F.style.backgroundColor="rgba("+E+", "+D+", "+A+", "+C/100+")"}else{if(typeof(F.style.opacity)!="undefined"){F.style.opacity=C/100}else{if(typeof(F.style.MozOpacity)!="undefined"){F.style.MozOpacity=C/100}else{if(typeof(F.style.filter)!="undefined"){F.style.filter="alpha(opacity:"+C+")"}else{if(typeof(F.style.KHTMLOpacity)!="undefined"){F.style.KHTMLOpacity=C/100}}}}}}function inArray(C,B){for(var A=0;A<C.length;A++){if(C[A]===B){return A}}return false}function inArrayKey(B,A){for(key in B){if(key===A){return true}}return false}function addEvent(E,D,B,A){if(E.addEventListener){E.addEventListener(D,B,A);return true}else{if(E.attachEvent){var C=E.attachEvent("on"+D,B);return C}else{E["on"+D]=B}}}function removeEvent(E,D,B,A){if(E.removeEventListener){E.removeEventListener(D,B,A);return true}else{if(E.detachEvent){var C=E.detachEvent("on"+D,B);return C}else{alert("Handler could not be removed")}}}function format_colour(B){var A="#ffffff";if(B!=""&&B!="transparent"){if(B.substr(0,3)=="rgb"){A=rgb2Hex(B)}else{if(B.length==4){A="#"+B.substring(1,2)+B.substring(1,2)+B.substring(2,3)+B.substring(2,3)+B.substring(3,4)+B.substring(3,4)}else{A=B}}}return A}function get_style(obj,property,propertyNS){try{if(obj.currentStyle){var returnVal=eval("obj.currentStyle."+property)}else{if(isSafari&&obj.style.display=="none"){obj.style.display="";var wasHidden=true}var returnVal=document.defaultView.getComputedStyle(obj,"").getPropertyValue(propertyNS);if(isSafari&&wasHidden){obj.style.display="none"}}}catch(e){}return returnVal}function getElementsByClass(G,E,A){var D=new Array();if(E==null){E=document}if(A==null){A="*"}var C=E.getElementsByTagName(A);var B=C.length;var F=new RegExp("(^|s)"+G+"(s|$)");for(i=0,j=0;i<B;i++){if(F.test(C[i].className)){D[j]=C[i];j++}}return D}function newCurvyError(A){return new Error("curvyCorners Error:\n"+A)};
﻿
var config=new Object();var tt_Debug=true
var tt_Enabled=true
var TagsToTip=true
config.Above=false
config.BgColor='#E2E7FF'
config.BgImg=''
config.BorderColor='#003099'
config.BorderStyle='solid'
config.BorderWidth=1
config.CenterMouse=false
config.ClickClose=false
config.ClickSticky=false
config.CloseBtn=false
config.CloseBtnColors=['#990000','#FFFFFF','#DD3333','#FFFFFF']
config.CloseBtnText='&nbsp;X&nbsp;'
config.CopyContent=true
config.Delay=400
config.Duration=0
config.Exclusive=false
config.FadeIn=100
config.FadeOut=100
config.FadeInterval=30
config.Fix=null
config.FollowMouse=true
config.FontColor='#000044'
config.FontFace='Verdana,Geneva,sans-serif'
config.FontSize='8pt'
config.FontWeight='normal'
config.Height=0
config.JumpHorz=false
config.JumpVert=true
config.Left=false
config.OffsetX=14
config.OffsetY=8
config.Opacity=100
config.Padding=3
config.Shadow=false
config.ShadowColor='#C0C0C0'
config.ShadowWidth=5
config.Sticky=false
config.TextAlign='left'
config.Title=''
config.TitleAlign='left'
config.TitleBgColor=''
config.TitleFontColor='#FFFFFF'
config.TitleFontFace=''
config.TitleFontSize=''
config.TitlePadding=2
config.Width=0
function Tip(){tt_Tip(arguments,null);}
function TagToTip(){var t2t=tt_GetElt(arguments[0]);if(t2t)
tt_Tip(arguments,t2t);}
function UnTip(){tt_OpReHref();if(tt_aV[DURATION]<0&&(tt_iState&0x2))
tt_tDurt.Timer("tt_HideInit()",-tt_aV[DURATION],true);else if(!(tt_aV[STICKY]&&(tt_iState&0x2)))
tt_HideInit();}
var tt_aElt=new Array(10),tt_aV=new Array(),tt_sContent,tt_t2t,tt_t2tDad,tt_musX,tt_musY,tt_over,tt_x,tt_y,tt_w,tt_h;function tt_Extension(){tt_ExtCmdEnum();tt_aExt[tt_aExt.length]=this;return this;}
function tt_SetTipPos(x,y){var css=tt_aElt[0].style;tt_x=x;tt_y=y;css.left=x+"px";css.top=y+"px";if(tt_ie56){var ifrm=tt_aElt[tt_aElt.length-1];if(ifrm){ifrm.style.left=css.left;ifrm.style.top=css.top;}}}
function tt_HideInit(){if(tt_iState){tt_ExtCallFncs(0,"HideInit");tt_iState&=~(0x4|0x8);if(tt_flagOpa&&tt_aV[FADEOUT]){tt_tFade.EndTimer();if(tt_opa){var n=Math.round(tt_aV[FADEOUT]/(tt_aV[FADEINTERVAL]*(tt_aV[OPACITY]/tt_opa)));tt_Fade(tt_opa,tt_opa,0,n);return;}}
tt_tHide.Timer("tt_Hide();",1,false);}}
function tt_Hide(){if(tt_db&&tt_iState){tt_OpReHref();if(tt_iState&0x2){tt_aElt[0].style.visibility="hidden";tt_ExtCallFncs(0,"Hide");}
tt_tShow.EndTimer();tt_tHide.EndTimer();tt_tDurt.EndTimer();tt_tFade.EndTimer();if(!tt_op&&!tt_ie){tt_tWaitMov.EndTimer();tt_bWait=false;}
if(tt_aV[CLICKCLOSE]||tt_aV[CLICKSTICKY])
tt_RemEvtFnc(document,"mouseup",tt_OnLClick);tt_ExtCallFncs(0,"Kill");if(tt_t2t&&!tt_aV[COPYCONTENT])
tt_UnEl2Tip();tt_iState=0;tt_over=null;tt_ResetMainDiv();if(tt_aElt[tt_aElt.length-1])
tt_aElt[tt_aElt.length-1].style.display="none";}}
function tt_GetElt(id){return(document.getElementById?document.getElementById(id):document.all?document.all[id]:null);}
function tt_GetDivW(el){return(el?(el.offsetWidth||el.style.pixelWidth||0):0);}
function tt_GetDivH(el){return(el?(el.offsetHeight||el.style.pixelHeight||0):0);}
function tt_GetScrollX(){return(window.pageXOffset||(tt_db?(tt_db.scrollLeft||0):0));}
function tt_GetScrollY(){return(window.pageYOffset||(tt_db?(tt_db.scrollTop||0):0));}
function tt_GetClientW(){return tt_GetWndCliSiz("Width");}
function tt_GetClientH(){return tt_GetWndCliSiz("Height");}
function tt_GetEvtX(e){return(e?((typeof(e.pageX)!=tt_u)?e.pageX:(e.clientX+tt_GetScrollX())):0);}
function tt_GetEvtY(e){return(e?((typeof(e.pageY)!=tt_u)?e.pageY:(e.clientY+tt_GetScrollY())):0);}
function tt_AddEvtFnc(el,sEvt,PFnc){if(el){if(el.addEventListener)
el.addEventListener(sEvt,PFnc,false);else
el.attachEvent("on"+sEvt,PFnc);}}
function tt_RemEvtFnc(el,sEvt,PFnc){if(el){if(el.removeEventListener)
el.removeEventListener(sEvt,PFnc,false);else
el.detachEvent("on"+sEvt,PFnc);}}
function tt_GetDad(el){return(el.parentNode||el.parentElement||el.offsetParent);}
function tt_MovDomNode(el,dadFrom,dadTo){if(dadFrom)
dadFrom.removeChild(el);if(dadTo)
dadTo.appendChild(el);}
var tt_aExt=new Array(),tt_db,tt_op,tt_ie,tt_ie56,tt_bBoxOld,tt_body,tt_ovr_,tt_flagOpa,tt_maxPosX,tt_maxPosY,tt_iState=0,tt_opa,tt_bJmpVert,tt_bJmpHorz,tt_elDeHref,tt_tShow=new Number(0),tt_tHide=new Number(0),tt_tDurt=new Number(0),tt_tFade=new Number(0),tt_tWaitMov=new Number(0),tt_bWait=false,tt_u="undefined";function tt_Init(){tt_MkCmdEnum();if(!tt_Browser()||!tt_MkMainDiv())
return;tt_IsW3cBox();tt_OpaSupport();tt_AddEvtFnc(document,"mousemove",tt_Move);if(TagsToTip||tt_Debug)
tt_SetOnloadFnc();tt_AddEvtFnc(window,"unload",tt_Hide);}
function tt_MkCmdEnum(){var n=0;for(var i in config)
eval("window."+i.toString().toUpperCase()+" = "+n++);tt_aV.length=n;}
function tt_Browser(){var n,nv,n6,w3c;n=navigator.userAgent.toLowerCase(),nv=navigator.appVersion;tt_op=(document.defaultView&&typeof(eval("w"+"indow"+"."+"o"+"p"+"er"+"a"))!=tt_u);tt_ie=n.indexOf("msie")!=-1&&document.all&&!tt_op;if(tt_ie){var ieOld=(!document.compatMode||document.compatMode=="BackCompat");tt_db=!ieOld?document.documentElement:(document.body||null);if(tt_db)
tt_ie56=parseFloat(nv.substring(nv.indexOf("MSIE")+5))>=5.5&&typeof document.body.style.maxHeight==tt_u;}
else{tt_db=document.documentElement||document.body||(document.getElementsByTagName?document.getElementsByTagName("body")[0]:null);if(!tt_op){n6=document.defaultView&&typeof document.defaultView.getComputedStyle!=tt_u;w3c=!n6&&document.getElementById;}}
tt_body=(document.getElementsByTagName?document.getElementsByTagName("body")[0]:(document.body||null));if(tt_ie||n6||tt_op||w3c){if(tt_body&&tt_db){if(document.attachEvent||document.addEventListener)
return true;}
else
tt_Err("wz_tooltip.js must be included INSIDE the body section,"
+" immediately after the opening <body> tag.",false);}
tt_db=null;return false;}
function tt_MkMainDiv(){if(tt_body.insertAdjacentHTML)
tt_body.insertAdjacentHTML("afterBegin",tt_MkMainDivHtm());else if(typeof tt_body.innerHTML!=tt_u&&document.createElement&&tt_body.appendChild)
tt_body.appendChild(tt_MkMainDivDom());if(window.tt_GetMainDivRefs&&tt_GetMainDivRefs())
return true;tt_db=null;return false;}
function tt_MkMainDivHtm(){return('<div id="WzTtDiV"></div>'+
(tt_ie56?('<iframe id="WzTtIfRm" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>'):''));}
function tt_MkMainDivDom(){var el=document.createElement("div");if(el)
el.id="WzTtDiV";return el;}
function tt_GetMainDivRefs(){tt_aElt[0]=tt_GetElt("WzTtDiV");if(tt_ie56&&tt_aElt[0]){tt_aElt[tt_aElt.length-1]=tt_GetElt("WzTtIfRm");if(!tt_aElt[tt_aElt.length-1])
tt_aElt[0]=null;}
if(tt_aElt[0]){var css=tt_aElt[0].style;css.visibility="hidden";css.position="absolute";css.overflow="hidden";return true;}
return false;}
function tt_ResetMainDiv(){tt_SetTipPos(0,0);tt_aElt[0].innerHTML="";tt_aElt[0].style.width="0px";tt_h=0;}
function tt_IsW3cBox(){var css=tt_aElt[0].style;css.padding="10px";css.width="40px";tt_bBoxOld=(tt_GetDivW(tt_aElt[0])==40);css.padding="0px";tt_ResetMainDiv();}
function tt_OpaSupport(){var css=tt_body.style;tt_flagOpa=(typeof(css.KhtmlOpacity)!=tt_u)?2:(typeof(css.KHTMLOpacity)!=tt_u)?3:(typeof(css.MozOpacity)!=tt_u)?4:(typeof(css.opacity)!=tt_u)?5:(typeof(css.filter)!=tt_u)?1:0;}
function tt_SetOnloadFnc(){tt_AddEvtFnc(document,"DOMContentLoaded",tt_HideSrcTags);tt_AddEvtFnc(window,"load",tt_HideSrcTags);if(tt_body.attachEvent)
tt_body.attachEvent("onreadystatechange",function(){if(tt_body.readyState=="complete")
tt_HideSrcTags();});if(/WebKit|KHTML/i.test(navigator.userAgent)){var t=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(t);tt_HideSrcTags();}},10);}}
function tt_HideSrcTags(){if(!window.tt_HideSrcTags||window.tt_HideSrcTags.done)
return;window.tt_HideSrcTags.done=true;if(!tt_HideSrcTagsRecurs(tt_body))
tt_Err("There are HTML elements to be converted to tooltips.\nIf you"
+" want these HTML elements to be automatically hidden, you"
+" must edit wz_tooltip.js, and set TagsToTip in the global"
+" tooltip configuration to true.",true);}
function tt_HideSrcTagsRecurs(dad){var ovr,asT2t;var a=dad.childNodes||dad.children||null;for(var i=a?a.length:0;i;){--i;if(!tt_HideSrcTagsRecurs(a[i]))
return false;ovr=a[i].getAttribute?(a[i].getAttribute("onmouseover")||a[i].getAttribute("onclick")):(typeof a[i].onmouseover=="function")?(a[i].onmouseover||a[i].onclick):null;if(ovr){asT2t=ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/);if(asT2t&&asT2t.length){if(!tt_HideSrcTag(asT2t[0]))
return false;}}}
return true;}
function tt_HideSrcTag(sT2t){var id,el;id=sT2t.replace(/.+'([^'.]+)'.+/,"$1");el=tt_GetElt(id);if(el){if(tt_Debug&&!TagsToTip)
return false;else
el.style.display="none";}
else
tt_Err("Invalid ID\n'"+id+"'\npassed to TagToTip()."
+" There exists no HTML element with that ID.",true);return true;}
function tt_Tip(arg,t2t){if(!tt_db||(tt_iState&0x8))
return;if(tt_iState)
tt_Hide();if(!tt_Enabled)
return;tt_t2t=t2t;if(!tt_ReadCmds(arg))
return;tt_iState=0x1|0x4;tt_AdaptConfig1();tt_MkTipContent(arg);tt_MkTipSubDivs();tt_FormatTip();tt_bJmpVert=false;tt_bJmpHorz=false;tt_maxPosX=tt_GetClientW()+tt_GetScrollX()-tt_w-1;tt_maxPosY=tt_GetClientH()+tt_GetScrollY()-tt_h-1;tt_AdaptConfig2();tt_OverInit();tt_ShowInit();tt_Move();}
function tt_ReadCmds(a){var i;i=0;for(var j in config)
tt_aV[i++]=config[j];if(a.length&1){for(i=a.length-1;i>0;i-=2)
tt_aV[a[i-1]]=a[i];return true;}
tt_Err("Incorrect call of Tip() or TagToTip().\n"
+"Each command must be followed by a value.",true);return false;}
function tt_AdaptConfig1(){tt_ExtCallFncs(0,"LoadConfig");if(!tt_aV[TITLEBGCOLOR].length)
tt_aV[TITLEBGCOLOR]=tt_aV[BORDERCOLOR];if(!tt_aV[TITLEFONTCOLOR].length)
tt_aV[TITLEFONTCOLOR]=tt_aV[BGCOLOR];if(!tt_aV[TITLEFONTFACE].length)
tt_aV[TITLEFONTFACE]=tt_aV[FONTFACE];if(!tt_aV[TITLEFONTSIZE].length)
tt_aV[TITLEFONTSIZE]=tt_aV[FONTSIZE];if(tt_aV[CLOSEBTN]){if(!tt_aV[CLOSEBTNCOLORS])
tt_aV[CLOSEBTNCOLORS]=new Array("","","","");for(var i=4;i;){--i;if(!tt_aV[CLOSEBTNCOLORS][i].length)
tt_aV[CLOSEBTNCOLORS][i]=(i&1)?tt_aV[TITLEFONTCOLOR]:tt_aV[TITLEBGCOLOR];}
if(!tt_aV[TITLE].length)
tt_aV[TITLE]=" ";}
if(tt_aV[OPACITY]==100&&typeof tt_aElt[0].style.MozOpacity!=tt_u&&!Array.every)
tt_aV[OPACITY]=99;if(tt_aV[FADEIN]&&tt_flagOpa&&tt_aV[DELAY]>100)
tt_aV[DELAY]=Math.max(tt_aV[DELAY]-tt_aV[FADEIN],100);}
function tt_AdaptConfig2(){if(tt_aV[CENTERMOUSE]){tt_aV[OFFSETX]-=((tt_w-(tt_aV[SHADOW]?tt_aV[SHADOWWIDTH]:0))>>1);tt_aV[JUMPHORZ]=false;}}
function tt_MkTipContent(a){if(tt_t2t){if(tt_aV[COPYCONTENT])
tt_sContent=tt_t2t.innerHTML;else
tt_sContent="";}
else
tt_sContent=a[0];tt_ExtCallFncs(0,"CreateContentString");}
function tt_MkTipSubDivs(){var sCss='position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;',sTbTrTd=' cellspacing="0" cellpadding="0" border="0" style="'+sCss+'"><tbody style="'+sCss+'"><tr><td ';tt_aElt[0].style.width=tt_GetClientW()+"px";tt_aElt[0].innerHTML=(''
+(tt_aV[TITLE].length?('<div id="WzTiTl" style="position:relative;z-index:1;">'
+'<table id="WzTiTlTb"'+sTbTrTd+'id="WzTiTlI" style="'+sCss+'">'
+tt_aV[TITLE]
+'</td>'
+(tt_aV[CLOSEBTN]?('<td align="right" style="'+sCss
+'text-align:right;">'
+'<span id="WzClOsE" style="position:relative;left:2px;padding-left:2px;padding-right:2px;'
+'cursor:'+(tt_ie?'hand':'pointer')
+';" onmouseover="tt_OnCloseBtnOver(1)" onmouseout="tt_OnCloseBtnOver(0)" onclick="tt_HideInit()">'
+tt_aV[CLOSEBTNTEXT]
+'</span></td>'):'')
+'</tr></tbody></table></div>'):'')
+'<div id="WzBoDy" style="position:relative;z-index:0;">'
+'<table'+sTbTrTd+'id="WzBoDyI" style="'+sCss+'">'
+tt_sContent
+'</td></tr></tbody></table></div>'
+(tt_aV[SHADOW]?('<div id="WzTtShDwR" style="position:absolute;overflow:hidden;"></div>'
+'<div id="WzTtShDwB" style="position:relative;overflow:hidden;"></div>'):''));tt_GetSubDivRefs();if(tt_t2t&&!tt_aV[COPYCONTENT])
tt_El2Tip();tt_ExtCallFncs(0,"SubDivsCreated");}
function tt_GetSubDivRefs(){var aId=new Array("WzTiTl","WzTiTlTb","WzTiTlI","WzClOsE","WzBoDy","WzBoDyI","WzTtShDwB","WzTtShDwR");for(var i=aId.length;i;--i)
tt_aElt[i]=tt_GetElt(aId[i-1]);}
function tt_FormatTip(){var css,w,h,pad=tt_aV[PADDING],padT,wBrd=tt_aV[BORDERWIDTH],iOffY,iOffSh,iAdd=(pad+wBrd)<<1;if(tt_aV[TITLE].length){padT=tt_aV[TITLEPADDING];css=tt_aElt[1].style;css.background=tt_aV[TITLEBGCOLOR];css.paddingTop=css.paddingBottom=padT+"px";css.paddingLeft=css.paddingRight=(padT+2)+"px";css=tt_aElt[3].style;css.color=tt_aV[TITLEFONTCOLOR];if(tt_aV[WIDTH]==-1)
css.whiteSpace="nowrap";css.fontFamily=tt_aV[TITLEFONTFACE];css.fontSize=tt_aV[TITLEFONTSIZE];css.fontWeight="bold";css.textAlign=tt_aV[TITLEALIGN];if(tt_aElt[4]){css=tt_aElt[4].style;css.background=tt_aV[CLOSEBTNCOLORS][0];css.color=tt_aV[CLOSEBTNCOLORS][1];css.fontFamily=tt_aV[TITLEFONTFACE];css.fontSize=tt_aV[TITLEFONTSIZE];css.fontWeight="bold";}
if(tt_aV[WIDTH]>0)
tt_w=tt_aV[WIDTH];else{tt_w=tt_GetDivW(tt_aElt[3])+tt_GetDivW(tt_aElt[4]);if(tt_aElt[4])
tt_w+=pad;if(tt_aV[WIDTH]<-1&&tt_w>-tt_aV[WIDTH])
tt_w=-tt_aV[WIDTH];}
iOffY=-wBrd;}
else{tt_w=0;iOffY=0;}
css=tt_aElt[5].style;css.top=iOffY+"px";if(wBrd){css.borderColor=tt_aV[BORDERCOLOR];css.borderStyle=tt_aV[BORDERSTYLE];css.borderWidth=wBrd+"px";}
if(tt_aV[BGCOLOR].length)
css.background=tt_aV[BGCOLOR];if(tt_aV[BGIMG].length)
css.backgroundImage="url("+tt_aV[BGIMG]+")";css.padding=pad+"px";css.textAlign=tt_aV[TEXTALIGN];if(tt_aV[HEIGHT]){css.overflow="auto";if(tt_aV[HEIGHT]>0)
css.height=(tt_aV[HEIGHT]+iAdd)+"px";else
tt_h=iAdd-tt_aV[HEIGHT];}
css=tt_aElt[6].style;css.color=tt_aV[FONTCOLOR];css.fontFamily=tt_aV[FONTFACE];css.fontSize=tt_aV[FONTSIZE];css.fontWeight=tt_aV[FONTWEIGHT];css.textAlign=tt_aV[TEXTALIGN];if(tt_aV[WIDTH]>0)
w=tt_aV[WIDTH];else if(tt_aV[WIDTH]==-1&&tt_w)
w=tt_w;else{w=tt_GetDivW(tt_aElt[6]);if(tt_aV[WIDTH]<-1&&w>-tt_aV[WIDTH])
w=-tt_aV[WIDTH];}
if(w>tt_w)
tt_w=w;tt_w+=iAdd;if(tt_aV[SHADOW]){tt_w+=tt_aV[SHADOWWIDTH];iOffSh=Math.floor((tt_aV[SHADOWWIDTH]*4)/3);css=tt_aElt[7].style;css.top=iOffY+"px";css.left=iOffSh+"px";css.width=(tt_w-iOffSh-tt_aV[SHADOWWIDTH])+"px";css.height=tt_aV[SHADOWWIDTH]+"px";css.background=tt_aV[SHADOWCOLOR];css=tt_aElt[8].style;css.top=iOffSh+"px";css.left=(tt_w-tt_aV[SHADOWWIDTH])+"px";css.width=tt_aV[SHADOWWIDTH]+"px";css.background=tt_aV[SHADOWCOLOR];}
else
iOffSh=0;tt_SetTipOpa(tt_aV[FADEIN]?0:tt_aV[OPACITY]);tt_FixSize(iOffY,iOffSh);}
function tt_FixSize(iOffY,iOffSh){var wIn,wOut,h,add,pad=tt_aV[PADDING],wBrd=tt_aV[BORDERWIDTH],i;tt_aElt[0].style.width=tt_w+"px";tt_aElt[0].style.pixelWidth=tt_w;wOut=tt_w-((tt_aV[SHADOW])?tt_aV[SHADOWWIDTH]:0);wIn=wOut;if(!tt_bBoxOld)
wIn-=(pad+wBrd)<<1;tt_aElt[5].style.width=wIn+"px";if(tt_aElt[1]){wIn=wOut-((tt_aV[TITLEPADDING]+2)<<1);if(!tt_bBoxOld)
wOut=wIn;tt_aElt[1].style.width=wOut+"px";tt_aElt[2].style.width=wIn+"px";}
if(tt_h){h=tt_GetDivH(tt_aElt[5]);if(h>tt_h){if(!tt_bBoxOld)
tt_h-=(pad+wBrd)<<1;tt_aElt[5].style.height=tt_h+"px";}}
tt_h=tt_GetDivH(tt_aElt[0])+iOffY;if(tt_aElt[8])
tt_aElt[8].style.height=(tt_h-iOffSh)+"px";i=tt_aElt.length-1;if(tt_aElt[i]){tt_aElt[i].style.width=tt_w+"px";tt_aElt[i].style.height=tt_h+"px";}}
function tt_DeAlt(el){var aKid;if(el){if(el.alt)
el.alt="";if(el.title)
el.title="";aKid=el.childNodes||el.children||null;if(aKid){for(var i=aKid.length;i;)
tt_DeAlt(aKid[--i]);}}}
function tt_OpDeHref(el){if(!tt_op)
return;if(tt_elDeHref)
tt_OpReHref();while(el){if(el.hasAttribute&&el.hasAttribute("href")){el.t_href=el.getAttribute("href");el.t_stats=window.status;el.removeAttribute("href");el.style.cursor="hand";tt_AddEvtFnc(el,"mousedown",tt_OpReHref);window.status=el.t_href;tt_elDeHref=el;break;}
el=tt_GetDad(el);}}
function tt_OpReHref(){if(tt_elDeHref){tt_elDeHref.setAttribute("href",tt_elDeHref.t_href);tt_RemEvtFnc(tt_elDeHref,"mousedown",tt_OpReHref);window.status=tt_elDeHref.t_stats;tt_elDeHref=null;}}
function tt_El2Tip(){var css=tt_t2t.style;tt_t2t.t_cp=css.position;tt_t2t.t_cl=css.left;tt_t2t.t_ct=css.top;tt_t2t.t_cd=css.display;tt_t2tDad=tt_GetDad(tt_t2t);tt_MovDomNode(tt_t2t,tt_t2tDad,tt_aElt[6]);css.display="block";css.position="static";css.left=css.top=css.marginLeft=css.marginTop="0px";}
function tt_UnEl2Tip(){var css=tt_t2t.style;css.display=tt_t2t.t_cd;tt_MovDomNode(tt_t2t,tt_GetDad(tt_t2t),tt_t2tDad);css.position=tt_t2t.t_cp;css.left=tt_t2t.t_cl;css.top=tt_t2t.t_ct;tt_t2tDad=null;}
function tt_OverInit(){if(window.event)
tt_over=window.event.target||window.event.srcElement;else
tt_over=tt_ovr_;tt_DeAlt(tt_over);tt_OpDeHref(tt_over);}
function tt_ShowInit(){tt_tShow.Timer("tt_Show()",tt_aV[DELAY],true);if(tt_aV[CLICKCLOSE]||tt_aV[CLICKSTICKY])
tt_AddEvtFnc(document,"mouseup",tt_OnLClick);}
function tt_Show(){var css=tt_aElt[0].style;css.zIndex=Math.max((window.dd&&dd.z)?(dd.z+2):0,1010);if(tt_aV[STICKY]||!tt_aV[FOLLOWMOUSE])
tt_iState&=~0x4;if(tt_aV[EXCLUSIVE])
tt_iState|=0x8;if(tt_aV[DURATION]>0)
tt_tDurt.Timer("tt_HideInit()",tt_aV[DURATION],true);tt_ExtCallFncs(0,"Show")
css.visibility="visible";tt_iState|=0x2;if(tt_aV[FADEIN])
tt_Fade(0,0,tt_aV[OPACITY],Math.round(tt_aV[FADEIN]/tt_aV[FADEINTERVAL]));tt_ShowIfrm();}
function tt_ShowIfrm(){if(tt_ie56){var ifrm=tt_aElt[tt_aElt.length-1];if(ifrm){var css=ifrm.style;css.zIndex=tt_aElt[0].style.zIndex-1;css.display="block";}}}
function tt_Move(e){if(e)
tt_ovr_=e.target||e.srcElement;e=e||window.event;if(e){tt_musX=tt_GetEvtX(e);tt_musY=tt_GetEvtY(e);}
if(tt_iState&0x4){if(!tt_op&&!tt_ie){if(tt_bWait)
return;tt_bWait=true;tt_tWaitMov.Timer("tt_bWait = false;",1,true);}
if(tt_aV[FIX]){tt_iState&=~0x4;tt_PosFix();}
else if(!tt_ExtCallFncs(e,"MoveBefore"))
tt_SetTipPos(tt_Pos(0),tt_Pos(1));tt_ExtCallFncs([tt_musX,tt_musY],"MoveAfter")}}
function tt_Pos(iDim){var iX,bJmpMod,cmdAlt,cmdOff,cx,iMax,iScrl,iMus,bJmp;if(iDim){bJmpMod=tt_aV[JUMPVERT];cmdAlt=ABOVE;cmdOff=OFFSETY;cx=tt_h;iMax=tt_maxPosY;iScrl=tt_GetScrollY();iMus=tt_musY;bJmp=tt_bJmpVert;}
else{bJmpMod=tt_aV[JUMPHORZ];cmdAlt=LEFT;cmdOff=OFFSETX;cx=tt_w;iMax=tt_maxPosX;iScrl=tt_GetScrollX();iMus=tt_musX;bJmp=tt_bJmpHorz;}
if(bJmpMod){if(tt_aV[cmdAlt]&&(!bJmp||tt_CalcPosAlt(iDim)>=iScrl+16))
iX=tt_PosAlt(iDim);else if(!tt_aV[cmdAlt]&&bJmp&&tt_CalcPosDef(iDim)>iMax-16)
iX=tt_PosAlt(iDim);else
iX=tt_PosDef(iDim);}
else{iX=iMus;if(tt_aV[cmdAlt])
iX-=cx+tt_aV[cmdOff]-(tt_aV[SHADOW]?tt_aV[SHADOWWIDTH]:0);else
iX+=tt_aV[cmdOff];}
if(iX>iMax)
iX=bJmpMod?tt_PosAlt(iDim):iMax;if(iX<iScrl)
iX=bJmpMod?tt_PosDef(iDim):iScrl;return iX;}
function tt_PosDef(iDim){if(iDim)
tt_bJmpVert=tt_aV[ABOVE];else
tt_bJmpHorz=tt_aV[LEFT];return tt_CalcPosDef(iDim);}
function tt_PosAlt(iDim){if(iDim)
tt_bJmpVert=!tt_aV[ABOVE];else
tt_bJmpHorz=!tt_aV[LEFT];return tt_CalcPosAlt(iDim);}
function tt_CalcPosDef(iDim){return iDim?(tt_musY+tt_aV[OFFSETY]):(tt_musX+tt_aV[OFFSETX]);}
function tt_CalcPosAlt(iDim){var cmdOff=iDim?OFFSETY:OFFSETX;var dx=tt_aV[cmdOff]-(tt_aV[SHADOW]?tt_aV[SHADOWWIDTH]:0);if(tt_aV[cmdOff]>0&&dx<=0)
dx=1;return((iDim?(tt_musY-tt_h):(tt_musX-tt_w))-dx);}
function tt_PosFix(){var iX,iY;if(typeof(tt_aV[FIX][0])=="number"){iX=tt_aV[FIX][0];iY=tt_aV[FIX][1];}
else{if(typeof(tt_aV[FIX][0])=="string")
el=tt_GetElt(tt_aV[FIX][0]);else
el=tt_aV[FIX][0];iX=tt_aV[FIX][1];iY=tt_aV[FIX][2];if(!tt_aV[ABOVE]&&el)
iY+=tt_GetDivH(el);for(;el;el=el.offsetParent){iX+=el.offsetLeft||0;iY+=el.offsetTop||0;}}
if(tt_aV[ABOVE])
iY-=tt_h;tt_SetTipPos(iX,iY);}
function tt_Fade(a,now,z,n){if(n){now+=Math.round((z-now)/n);if((z>a)?(now>=z):(now<=z))
now=z;else
tt_tFade.Timer("tt_Fade("
+a+","+now+","+z+","+(n-1)
+")",tt_aV[FADEINTERVAL],true);}
now?tt_SetTipOpa(now):tt_Hide();}
function tt_SetTipOpa(opa){tt_SetOpa(tt_aElt[5],opa);if(tt_aElt[1])
tt_SetOpa(tt_aElt[1],opa);if(tt_aV[SHADOW]){opa=Math.round(opa*0.8);tt_SetOpa(tt_aElt[7],opa);tt_SetOpa(tt_aElt[8],opa);}}
function tt_OnCloseBtnOver(iOver){var css=tt_aElt[4].style;iOver<<=1;css.background=tt_aV[CLOSEBTNCOLORS][iOver];css.color=tt_aV[CLOSEBTNCOLORS][iOver+1];}
function tt_OnLClick(e){e=e||window.event;if(!((e.button&&e.button&2)||(e.which&&e.which==3))){if(tt_aV[CLICKSTICKY]&&(tt_iState&0x4)){tt_aV[STICKY]=true;tt_iState&=~0x4;}
else if(tt_aV[CLICKCLOSE])
tt_HideInit();}}
function tt_Int(x){var y;return(isNaN(y=parseInt(x))?0:y);}
Number.prototype.Timer=function(s,iT,bUrge){if(!this.value||bUrge)
this.value=window.setTimeout(s,iT);}
Number.prototype.EndTimer=function(){if(this.value){window.clearTimeout(this.value);this.value=0;}}
function tt_GetWndCliSiz(s){var db,y=window["inner"+s],sC="client"+s,sN="number";if(typeof y==sN){var y2;return(((db=document.body)&&typeof(y2=db[sC])==sN&&y2&&y2<=y)?y2:((db=document.documentElement)&&typeof(y2=db[sC])==sN&&y2&&y2<=y)?y2:y);}
return(((db=document.documentElement)&&(y=db[sC]))?y:document.body[sC]);}
function tt_SetOpa(el,opa){var css=el.style;tt_opa=opa;if(tt_flagOpa==1){if(opa<100){if(typeof(el.filtNo)==tt_u)
el.filtNo=css.filter;var bVis=css.visibility!="hidden";css.zoom="100%";if(!bVis)
css.visibility="visible";css.filter="alpha(opacity="+opa+")";if(!bVis)
css.visibility="hidden";}
else if(typeof(el.filtNo)!=tt_u)
css.filter=el.filtNo;}
else{opa/=100.0;switch(tt_flagOpa){case 2:css.KhtmlOpacity=opa;break;case 3:css.KHTMLOpacity=opa;break;case 4:css.MozOpacity=opa;break;case 5:css.opacity=opa;break;}}}
function tt_Err(sErr,bIfDebug){if(tt_Debug||!bIfDebug)
alert("Tooltip Script Error Message:\n\n"+sErr);}
function tt_ExtCmdEnum(){var s;for(var i in config){s="window."+i.toString().toUpperCase();if(eval("typeof("+s+") == tt_u")){eval(s+" = "+tt_aV.length);tt_aV[tt_aV.length]=null;}}}
function tt_ExtCallFncs(arg,sFnc){var b=false;for(var i=tt_aExt.length;i;){--i;var fnc=tt_aExt[i]["On"+sFnc];if(fnc&&fnc(arg))
b=true;}
return b;}
tt_Init();if(typeof config=="undefined")
alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");config.Balloon=false
config.BalloonImgPath="/images/ballontooltip/"
config.BalloonEdgeSize=6
config.BalloonStemWidth=15
config.BalloonStemHeight=19
config.BalloonStemOffset=-7
config.BalloonImgExt="gif";var balloon=new tt_Extension();balloon.OnLoadConfig=function(){if(tt_aV[BALLOON]){balloon.padding=Math.max(tt_aV[PADDING]-tt_aV[BALLOONEDGESIZE],0);balloon.width=tt_aV[WIDTH];tt_aV[BORDERWIDTH]=0;tt_aV[WIDTH]=0;tt_aV[PADDING]=0;tt_aV[BGCOLOR]="";tt_aV[BGIMG]="";tt_aV[SHADOW]=false;if(tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length-1)!='/')
tt_aV[BALLOONIMGPATH]+="/";return true;}
return false;};balloon.OnCreateContentString=function(){if(!tt_aV[BALLOON])
return false;var aImg,sImgZ,sCssCrn,sVaT,sVaB,sCss0;if(tt_aV[BALLOONIMGPATH]==config.BalloonImgPath)
aImg=balloon.aDefImg;else
aImg=Balloon_CacheImgs(tt_aV[BALLOONIMGPATH],tt_aV[BALLOONIMGEXT]);sCss0='padding:0;margin:0;border:0;line-height:0;overflow:hidden;';sCssCrn=' style="position:relative;width:'+tt_aV[BALLOONEDGESIZE]+'px;'+sCss0+'overflow:hidden;';sVaT='vertical-align:top;" valign="top"';sVaB='vertical-align:bottom;" valign="bottom"';sImgZ='" style="'+sCss0+'" />';tt_sContent='<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0;margin:0;left:0;top:0;"><tr>'
+'<td'+sCssCrn+sVaB+'>'
+'<img src="'+aImg[1].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+sImgZ
+'</td>'
+'<td valign="bottom" style="position:relative;'+sCss0+'">'
+'<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;'+sCss0+'" src="'+aImg[9].src+'" width="'+tt_aV[BALLOONSTEMWIDTH]+'" height="'+tt_aV[BALLOONSTEMHEIGHT]+'" />'
+'<div style="position:relative;z-index:0;top:0;'+sCss0+'width:auto;height:'+tt_aV[BALLOONEDGESIZE]+'px;background-image:url('+aImg[2].src+');">'
+'</div>'
+'</td>'
+'<td'+sCssCrn+sVaB+'>'
+'<img src="'+aImg[3].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+sImgZ
+'</td>'
+'</tr><tr>'
+'<td style="position:relative;'+sCss0+'width:'+tt_aV[BALLOONEDGESIZE]+'px;background-image:url('+aImg[8].src+');">'
+'<img width="'+tt_aV[BALLOONEDGESIZE]+'" height="100%" src="'+aImg[8].src+sImgZ
+'</td>'
+'<td id="bALlO0nBdY" style="position:relative;line-height:normal;'
+';background-image:url('+aImg[0].src+')'
+';color:'+tt_aV[FONTCOLOR]
+';font-family:'+tt_aV[FONTFACE]
+';font-size:'+tt_aV[FONTSIZE]
+';font-weight:'+tt_aV[FONTWEIGHT]
+';text-align:'+tt_aV[TEXTALIGN]
+';padding:'+balloon.padding+'px'
+';width:'+((balloon.width>0)?(balloon.width+'px'):'auto')
+';">'+tt_sContent+'</td>'
+'<td style="position:relative;'+sCss0+'width:'+tt_aV[BALLOONEDGESIZE]+'px;background-image:url('+aImg[4].src+');">'
+'<img width="'+tt_aV[BALLOONEDGESIZE]+'" height="100%" src="'+aImg[4].src+sImgZ
+'</td>'
+'</tr><tr>'
+'<td'+sCssCrn+sVaT+'>'
+'<img src="'+aImg[7].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+sImgZ
+'</td>'
+'<td valign="top" style="position:relative;'+sCss0+'">'
+'<div style="position:relative;left:0;top:0;'+sCss0+'width:auto;height:'+tt_aV[BALLOONEDGESIZE]+'px;background-image:url('+aImg[6].src+');"></div>'
+'<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;'+sCss0+'" src="'+aImg[10].src+'" width="'+tt_aV[BALLOONSTEMWIDTH]+'" height="'+tt_aV[BALLOONSTEMHEIGHT]+'" />'
+'</td>'
+'<td'+sCssCrn+sVaT+'>'
+'<img src="'+aImg[5].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+sImgZ
+'</td>'
+'</tr></table>';return true;};balloon.OnSubDivsCreated=function(){if(tt_aV[BALLOON]){var bdy=tt_GetElt("bALlO0nBdY");if(tt_t2t&&!tt_aV[COPYCONTENT]&&bdy)
tt_MovDomNode(tt_t2t,tt_GetDad(tt_t2t),bdy);balloon.iStem=tt_aV[ABOVE]*1;balloon.aStem=[tt_GetElt("bALlOOnT"),tt_GetElt("bALlOOnB")];balloon.aStem[balloon.iStem].style.display="inline";if(balloon.width<-1)
Balloon_MaxW(bdy);return true;}
return false;};balloon.OnMoveAfter=function(){if(tt_aV[BALLOON]){var iStem=(tt_aV[ABOVE]!=tt_bJmpVert)*1;if(iStem!=balloon.iStem){balloon.aStem[balloon.iStem].style.display="none";balloon.aStem[iStem].style.display="inline";balloon.iStem=iStem;}
balloon.aStem[iStem].style.left=Balloon_CalcStemX()+"px";return true;}
return false;};function Balloon_CalcStemX(){var x=tt_musX-tt_x+tt_aV[BALLOONSTEMOFFSET]-tt_aV[BALLOONEDGESIZE];return Math.max(Math.min(x,tt_w-tt_aV[BALLOONSTEMWIDTH]-(tt_aV[BALLOONEDGESIZE]<<1)-2),2);}
function Balloon_CacheImgs(sPath,sExt){var asImg=["background","lt","t","rt","r","rb","b","lb","l","stemt","stemb"],n=asImg.length,aImg=new Array(n),img;while(n){--n;img=aImg[n]=new Image();img.src=sPath+asImg[n]+"."+sExt;}
return aImg;}
function Balloon_MaxW(bdy){if(bdy){var iAdd=tt_bBoxOld?(balloon.padding<<1):0,w=tt_GetDivW(bdy);if(w>-balloon.width+iAdd)
bdy.style.width=(-balloon.width+iAdd)+"px";}}
function Balloon_PreCacheDefImgs(){if(config.BalloonImgPath.charAt(config.BalloonImgPath.length-1)!='/')
config.BalloonImgPath+="/";balloon.aDefImg=Balloon_CacheImgs(config.BalloonImgPath,config.BalloonImgExt);}
Balloon_PreCacheDefImgs();/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();;(function($){
$.ui={
plugin:{
add:function(module,option,set){
var proto=$.ui[module].prototype;
for(var i in set){
proto.plugins[i]=proto.plugins[i]||[];
proto.plugins[i].push([option,set[i]]);}},
call:function(instance,name,args){
var set=instance.plugins[name];
if(!set){return;}
for(var i=0;i<set.length;i++){
if(instance.options[set[i][0]]){
set[i][1].apply(instance.element,args);}}}},
cssCache:{},
css:function(name){
if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');
$.ui.cssCache[name]=!!(
(!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));
try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},
disableSelection:function(el){
$(el).attr('unselectable','on').css('MozUserSelect','none');},
enableSelection:function(el){
$(el).attr('unselectable','off').css('MozUserSelect','');},
hasScroll:function(e,a){
var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;
if(e[scroll]>0)return true;e[scroll]=1;
has=e[scroll]>0?true:false;e[scroll]=0;
return has;}};
var _remove=$.fn.remove;
$.fn.remove=function(){
$("*",this).add(this).triggerHandler("remove");
return _remove.apply(this,arguments);};
function getter(namespace,plugin,method){
var methods=$[namespace][plugin].getter||[];
methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){
var namespace=name.split(".")[0];
name=name.split(".")[1];
$.fn[name]=function(options){
var isMethodCall=(typeof options=='string'),
args=Array.prototype.slice.call(arguments,1);
if(isMethodCall&&getter(namespace,name,options)){
var instance=$.data(this[0],name);
return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){
var instance=$.data(this,name);
if(isMethodCall&&instance&&$.isFunction(instance[options])){
instance[options].apply(instance,args);}else if(!isMethodCall){
$.data(this,name,new $[namespace][name](this,options));}});};
$[namespace][name]=function(element,options){
var self=this;
this.widgetName=name;
this.widgetBaseClass=namespace+'-'+name;
this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);
this.element=$(element).bind('setData.'+name,function(e,key,value){
return self.setData(key,value);}).bind('getData.'+name,function(e,key){
return self.getData(key);}).bind('remove',function(){
return self.destroy();});
this.init();};
$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};
$.widget.prototype={
init:function(){},
destroy:function(){
this.element.removeData(this.widgetName);},
getData:function(key){
return this.options[key];},
setData:function(key,value){
this.options[key]=value;
if(key=='disabled'){
this.element[value?'addClass':'removeClass'](
this.widgetBaseClass+'-disabled');}},
enable:function(){
this.setData('disabled',false);},
disable:function(){
this.setData('disabled',true);}};
$.widget.defaults={
disabled:false};
$.ui.mouse={
mouseInit:function(){
var self=this;
this.element.bind('mousedown.'+this.widgetName,function(e){
return self.mouseDown(e);});
if($.browser.msie){
this._mouseUnselectable=this.element.attr('unselectable');
this.element.attr('unselectable','on');}
this.started=false;},
mouseDestroy:function(){
this.element.unbind('.'+this.widgetName);
($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},
mouseDown:function(e){
(this._mouseStarted&&this.mouseUp(e));
this._mouseDownEvent=e;
var self=this,
btnIsLeft=(e.which==1),
elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);
if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){
return true;}
this._mouseDelayMet=!this.options.delay;
if(!this._mouseDelayMet){
this._mouseDelayTimer=setTimeout(function(){
self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){
this._mouseStarted=(this.mouseStart(e)!==false);
if(!this._mouseStarted){
e.preventDefault();
return true;}}
this._mouseMoveDelegate=function(e){
return self.mouseMove(e);};
this._mouseUpDelegate=function(e){
return self.mouseUp(e);};
$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);
return false;},
mouseMove:function(e){
if($.browser.msie&&!e.button){
return this.mouseUp(e);}
if(this._mouseStarted){
this.mouseDrag(e);
return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){
this._mouseStarted=
(this.mouseStart(this._mouseDownEvent,e)!==false);
(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},
mouseUp:function(e){
$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){
this._mouseStarted=false;
this.mouseStop(e);}
return false;},
mouseDistanceMet:function(e){
return(Math.max(
Math.abs(this._mouseDownEvent.pageX-e.pageX),
Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},
mouseDelayMet:function(e){
return this._mouseDelayMet;},
mouseStart:function(e){},
mouseDrag:function(e){},
mouseStop:function(e){},
mouseCapture:function(e){return true;}};
$.ui.mouse.defaults={
cancel:null,
distance:1,
delay:0};})(jQuery);
(function($){
$.widget("ui.draggable",$.extend({},$.ui.mouse,{
init:function(){
var o=this.options;
if(o.helper=='original'&&!(/(relative|absolute|fixed)/).test(this.element.css('position')))
this.element.css('position','relative');
this.element.addClass('ui-draggable');
(o.disabled&&this.element.addClass('ui-draggable-disabled'));
this.mouseInit();},
mouseStart:function(e){
var o=this.options;
if(this.helper||o.disabled||$(e.target).is('.ui-resizable-handle'))return false;
var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;
$(this.options.handle,this.element).find("*").andSelf().each(function(){
if(this==e.target)handle=true;});
if(!handle)return false;
if($.ui.ddmanager)$.ui.ddmanager.current=this;
this.helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[e])):(o.helper=='clone'?this.element.clone():this.element);
if(!this.helper.parents('body').length)this.helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));
if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position")))this.helper.css("position","absolute");
this.margins={
left:(parseInt(this.element.css("marginLeft"),10)||0),
top:(parseInt(this.element.css("marginTop"),10)||0)};
this.cssPosition=this.helper.css("position");
this.offset=this.element.offset();
this.offset={
top:this.offset.top-this.margins.top,
left:this.offset.left-this.margins.left};
this.offset.click={
left:e.pageX-this.offset.left,
top:e.pageY-this.offset.top};
this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();
if(this.offsetParent[0]==document.body&&$.browser.mozilla)po={top:0,left:0};
this.offset.parent={
top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};
var p=this.element.position();
this.offset.relative=this.cssPosition=="relative"?{
top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,
left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};
this.originalPosition=this.generatePosition(e);
this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};
if(o.cursorAt){
if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left+this.margins.left;
if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right+this.margins.left;
if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top+this.margins.top;
if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom+this.margins.top;}
if(o.containment){
if(o.containment=='parent')o.containment=this.helper[0].parentNode;
if(o.containment=='document'||o.containment=='window')this.containment=[
0-this.offset.relative.left-this.offset.parent.left,
0-this.offset.relative.top-this.offset.parent.top,
$(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),
($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];
if(!(/^(document|window|parent)$/).test(o.containment)){
var ce=$(o.containment)[0];
var co=$(o.containment).offset();
this.containment=[
co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,
co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,
co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),
co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}}
this.propagate("start",e);
this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};
if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,e);
this.helper.addClass("ui-draggable-dragging");
this.mouseDrag(e);
return true;},
convertPositionTo:function(d,pos){
if(!pos)pos=this.position;
var mod=d=="absolute"?1:-1;
return{
top:(
pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*mod
+(this.cssPosition=="fixed"?$(document).scrollTop():0)*mod
+this.margins.top*mod),
left:(
pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*mod
+(this.cssPosition=="fixed"?$(document).scrollLeft():0)*mod
+this.margins.left*mod)};},
generatePosition:function(e){
var o=this.options;
var position={
top:(
e.pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)
-(this.cssPosition=="fixed"?$(document).scrollTop():0)),
left:(
e.pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)
-(this.cssPosition=="fixed"?$(document).scrollLeft():0))};
if(!this.originalPosition)return position;
if(this.containment){
if(position.left<this.containment[0])position.left=this.containment[0];
if(position.top<this.containment[1])position.top=this.containment[1];
if(position.left>this.containment[2])position.left=this.containment[2];
if(position.top>this.containment[3])position.top=this.containment[3];}
if(o.grid){
var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];
position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;
var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])*o.grid[0];
position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
return position;},
mouseDrag:function(e){
this.position=this.generatePosition(e);
this.positionAbs=this.convertPositionTo("absolute");
this.position=this.propagate("drag",e)||this.position;
if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';
if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';
if($.ui.ddmanager)$.ui.ddmanager.drag(this,e);
return false;},
mouseStop:function(e){
var dropped=false;
if($.ui.ddmanager&&!this.options.dropBehaviour)
var dropped=$.ui.ddmanager.drop(this,e);
if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true){
var self=this;
$(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){
self.propagate("stop",e);
self.clear();});}else{
this.propagate("stop",e);
this.clear();}
return false;},
clear:function(){
this.helper.removeClass("ui-draggable-dragging");
if(this.options.helper!='original'&&!this.cancelHelperRemoval)this.helper.remove();
this.helper=null;
this.cancelHelperRemoval=false;},
plugins:{},
uiHash:function(e){
return{
helper:this.helper,
position:this.position,
absolutePosition:this.positionAbs,
options:this.options};},
propagate:function(n,e){
$.ui.plugin.call(this,n,[e,this.uiHash()]);
if(n=="drag")this.positionAbs=this.convertPositionTo("absolute");
return this.element.triggerHandler(n=="drag"?n:"drag"+n,[e,this.uiHash()],this.options[n]);},
destroy:function(){
if(!this.element.data('draggable'))return;
this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');
this.mouseDestroy();}}));
$.extend($.ui.draggable,{
defaults:{
appendTo:"parent",
axis:false,
cancel:":input",
delay:0,
distance:1,
helper:"original"}});
$.ui.plugin.add("draggable","cursor",{
start:function(e,ui){
var t=$('body');
if(t.css("cursor"))ui.options._cursor=t.css("cursor");
t.css("cursor",ui.options.cursor);},
stop:function(e,ui){
if(ui.options._cursor)$('body').css("cursor",ui.options._cursor);}});
$.ui.plugin.add("draggable","zIndex",{
start:function(e,ui){
var t=$(ui.helper);
if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");
t.css('zIndex',ui.options.zIndex);},
stop:function(e,ui){
if(ui.options._zIndex)$(ui.helper).css('zIndex',ui.options._zIndex);}});
$.ui.plugin.add("draggable","opacity",{
start:function(e,ui){
var t=$(ui.helper);
if(t.css("opacity"))ui.options._opacity=t.css("opacity");
t.css('opacity',ui.options.opacity);},
stop:function(e,ui){
if(ui.options._opacity)$(ui.helper).css('opacity',ui.options._opacity);}});
$.ui.plugin.add("draggable","iframeFix",{
start:function(e,ui){
$(ui.options.iframeFix===true?"iframe":ui.options.iframeFix).each(function(){
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
width:this.offsetWidth+"px",height:this.offsetHeight+"px",
position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},
stop:function(e,ui){
$("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this);});}});
$.ui.plugin.add("draggable","scroll",{
start:function(e,ui){
var o=ui.options;
var i=$(this).data("draggable");
o.scrollSensitivity=o.scrollSensitivity||20;
o.scrollSpeed=o.scrollSpeed||20;
i.overflowY=function(el){
do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);
return $(document);}(this);
i.overflowX=function(el){
do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);
return $(document);}(this);
if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();
if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},
drag:function(e,ui){
var o=ui.options;
var i=$(this).data("draggable");
if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){
if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop+o.scrollSpeed;
if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop-o.scrollSpeed;}else{
if(e.pageY-$(document).scrollTop()<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);
if($(window).height()-(e.pageY-$(document).scrollTop())<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){
if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft+o.scrollSpeed;
if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft-o.scrollSpeed;}else{
if(e.pageX-$(document).scrollLeft()<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);
if($(window).width()-(e.pageX-$(document).scrollLeft())<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}});
$.ui.plugin.add("draggable","snap",{
start:function(e,ui){
var inst=$(this).data("draggable");
inst.snapElements=[];
$(ui.options.snap===true?'.ui-draggable':ui.options.snap).each(function(){
var $t=$(this);var $o=$t.offset();
if(this!=inst.element[0])inst.snapElements.push({
item:this,
width:$t.outerWidth(),height:$t.outerHeight(),
top:$o.top,left:$o.left});});},
drag:function(e,ui){
var inst=$(this).data("draggable");
var d=ui.options.snapTolerance||20;
var x1=ui.absolutePosition.left,x2=x1+inst.helperProportions.width,
y1=ui.absolutePosition.top,y2=y1+inst.helperProportions.height;
for(var i=inst.snapElements.length-1;i>=0;i--){
var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,
t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;
if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d)))continue;
if(ui.options.snapMode!='inner'){
var ts=Math.abs(t-y2)<=20;
var bs=Math.abs(b-y1)<=20;
var ls=Math.abs(l-x2)<=20;
var rs=Math.abs(r-x1)<=20;
if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;
if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b,left:0}).top;
if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;
if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r}).left;}
if(ui.options.snapMode!='outer'){
var ts=Math.abs(t-y1)<=20;
var bs=Math.abs(b-y2)<=20;
var ls=Math.abs(l-x1)<=20;
var rs=Math.abs(r-x2)<=20;
if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t,left:0}).top;
if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;
if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l}).left;
if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left;}};}});
$.ui.plugin.add("draggable","connectToSortable",{
start:function(e,ui){
var inst=$(this).data("draggable");
inst.sortables=[];
$(ui.options.connectToSortable).each(function(){
if($.data(this,'sortable')){
var sortable=$.data(this,'sortable');
inst.sortables.push({
instance:sortable,
shouldRevert:sortable.options.revert});
sortable.refreshItems();
sortable.propagate("activate",e,inst);}});},
stop:function(e,ui){
var inst=$(this).data("draggable");
$.each(inst.sortables,function(){
if(this.instance.isOver){
this.instance.isOver=0;
inst.cancelHelperRemoval=true;
this.instance.cancelHelperRemoval=false;
if(this.shouldRevert)this.instance.options.revert=true;
this.instance.mouseStop(e);
this.instance.element.triggerHandler("sortreceive",[e,$.extend(this.instance.ui(),{sender:inst.element})],this.instance.options["receive"]);
this.instance.options.helper=this.instance.options._helper;}else{
this.instance.propagate("deactivate",e,inst);}});},
drag:function(e,ui){
var inst=$(this).data("draggable"),self=this;
var checkPos=function(o){
var l=o.left,r=l+o.width,
t=o.top,b=t+o.height;
return(l<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<r&&t<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<b);};
$.each(inst.sortables,function(i){
if(checkPos.call(inst,this.instance.containerCache)){
if(!this.instance.isOver){
this.instance.isOver=1;
this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;
this.instance.options.helper=function(){return ui.helper[0];};
e.target=this.instance.currentItem[0];
this.instance.mouseCapture(e,true);
this.instance.mouseStart(e,true,true);
this.instance.offset.click.top=inst.offset.click.top;
this.instance.offset.click.left=inst.offset.click.left;
this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;
inst.propagate("toSortable",e);}
if(this.instance.currentItem)this.instance.mouseDrag(e);}else{
if(this.instance.isOver){
this.instance.isOver=0;
this.instance.cancelHelperRemoval=true;
this.instance.options.revert=false;
this.instance.mouseStop(e,true);
this.instance.options.helper=this.instance.options._helper;
this.instance.currentItem.remove();
if(this.instance.placeholder)this.instance.placeholder.remove();
inst.propagate("fromSortable",e);}};});}});
$.ui.plugin.add("draggable","stack",{
start:function(e,ui){
var group=$.makeArray($(ui.options.stack.group)).sort(function(a,b){
return(parseInt($(a).css("zIndex"),10)||ui.options.stack.min)-(parseInt($(b).css("zIndex"),10)||ui.options.stack.min);});
$(group).each(function(i){
this.style.zIndex=ui.options.stack.min+i;});
this[0].style.zIndex=ui.options.stack.min+group.length;}});})(jQuery);
(function($){
var setDataSwitch={
dragStart:"start.draggable",
drag:"drag.draggable",
dragStop:"stop.draggable",
maxHeight:"maxHeight.resizable",
minHeight:"minHeight.resizable",
maxWidth:"maxWidth.resizable",
minWidth:"minWidth.resizable",
resizeStart:"start.resizable",
resize:"drag.resizable",
resizeStop:"stop.resizable"};
$.widget("ui.dialog",{
init:function(){
var self=this,
options=this.options,
resizeHandles=typeof options.resizable=='string'?options.resizable:'n,e,s,w,se,sw,ne,nw',
uiDialogContent=this.element.addClass('ui-dialog-content').wrap('<div/>').wrap('<div/>'),
uiDialogContainer=(this.uiDialogContainer=uiDialogContent.parent().addClass('ui-dialog-container').css({position:'relative',width:'100%',height:'100%'})),
title=options.title||uiDialogContent.attr('title')||'',
uiDialogTitlebar=(this.uiDialogTitlebar=
$('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+title+'</span>').append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(uiDialogContainer),
uiDialog=(this.uiDialog=uiDialogContainer.parent()).appendTo(document.body).hide().addClass('ui-dialog').addClass(options.dialogClass).addClass(uiDialogContent.attr('className')).removeClass('ui-dialog-content').css({
position:'absolute',
width:options.width,
height:options.height,
overflow:'hidden',
zIndex:options.zIndex}).attr('tabIndex',-1).css('outline',0).keydown(function(ev){
if(options.closeOnEscape){
var ESC=27;
(ev.keyCode&&ev.keyCode==ESC&&self.close());}}).mousedown(function(){
self.moveToTop();}),
uiDialogButtonPane=(this.uiDialogButtonPane=$('<div/>')).addClass('ui-dialog-buttonpane').css({position:'absolute',bottom:0}).appendTo(uiDialog);
this.uiDialogTitlebarClose=$('.ui-dialog-titlebar-close',uiDialogTitlebar).hover(
function(){
$(this).addClass('ui-dialog-titlebar-close-hover');},
function(){
$(this).removeClass('ui-dialog-titlebar-close-hover');}).mousedown(function(ev){
ev.stopPropagation();}).click(function(){
self.close();
return false;});
this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){
$.ui.disableSelection(this);});
if($.fn.draggable){
uiDialog.draggable({
cancel:'.ui-dialog-content',
helper:options.dragHelper,
handle:'.ui-dialog-titlebar',
start:function(e,ui){
self.moveToTop();
(options.dragStart&&options.dragStart.apply(self.element[0],arguments));},
drag:function(e,ui){
(options.drag&&options.drag.apply(self.element[0],arguments));},
stop:function(e,ui){
(options.dragStop&&options.dragStop.apply(self.element[0],arguments));
$.ui.dialog.overlay.resize();}});
(options.draggable||uiDialog.draggable('disable'));}
if($.fn.resizable){
uiDialog.resizable({
cancel:'.ui-dialog-content',
helper:options.resizeHelper,
maxWidth:options.maxWidth,
maxHeight:options.maxHeight,
minWidth:options.minWidth,
minHeight:options.minHeight,
start:function(){
(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments));},
resize:function(e,ui){
(options.autoResize&&self.size.apply(self));
(options.resize&&options.resize.apply(self.element[0],arguments));},
handles:resizeHandles,
stop:function(e,ui){
(options.autoResize&&self.size.apply(self));
(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));
$.ui.dialog.overlay.resize();}});
(options.resizable||uiDialog.resizable('disable'));}
this.createButtons(options.buttons);
this.isOpen=false;
(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());
(options.autoOpen&&this.open());},
setData:function(key,value){
(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));
switch(key){
case"buttons":
this.createButtons(value);
break;
case"draggable":
this.uiDialog.draggable(value?'enable':'disable');
break;
case"height":
this.uiDialog.height(value);
break;
case"position":
this.position(value);
break;
case"resizable":
(typeof value=='string'&&this.uiDialog.data('handles.resizable',value));
this.uiDialog.resizable(value?'enable':'disable');
break;
case"title":
$(".ui-dialog-title",this.uiDialogTitlebar).text(value);
break;
case"width":
this.uiDialog.width(value);
break;}
$.widget.prototype.setData.apply(this,arguments);},
position:function(pos){
var wnd=$(window),doc=$(document),
pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),
minTop=pTop;
if($.inArray(pos,['center','top','right','bottom','left'])>=0){
pos=[
pos=='right'||pos=='left'?pos:'center',
pos=='top'||pos=='bottom'?pos:'middle'];}
if(pos.constructor!=Array){
pos=['center','middle'];}
if(pos[0].constructor==Number){
pLeft+=pos[0];}else{
switch(pos[0]){
case'left':
pLeft+=0;
break;
case'right':
pLeft+=wnd.width()-this.uiDialog.width();
break;
default:
case'center':
pLeft+=(wnd.width()-this.uiDialog.width())/2;}}
if(pos[1].constructor==Number){
pTop+=pos[1];}else{
switch(pos[1]){
case'top':
pTop+=0;
break;
case'bottom':
pTop+=wnd.height()-this.uiDialog.height();
break;
default:
case'middle':
pTop+=(wnd.height()-this.uiDialog.height())/2;}}
pTop=Math.max(pTop,minTop);
this.uiDialog.css({top:pTop,left:pLeft});},
size:function(){
var container=this.uiDialogContainer,
titlebar=this.uiDialogTitlebar,
content=this.element,
tbMargin=parseInt(content.css('margin-top'),10)+parseInt(content.css('margin-bottom'),10),
lrMargin=parseInt(content.css('margin-left'),10)+parseInt(content.css('margin-right'),10);
content.height(container.height()-titlebar.outerHeight()-tbMargin);
content.width(container.width()-lrMargin);},
open:function(){
if(this.isOpen){return;}
this.overlay=this.options.modal?new $.ui.dialog.overlay(this):null;
(this.uiDialog.next().length>0)&&this.uiDialog.appendTo('body');
this.position(this.options.position);
this.uiDialog.show(this.options.show);
this.options.autoResize&&this.size();
this.moveToTop(true);
var openEV=null;
var openUI={
options:this.options};
this.uiDialogTitlebarClose.focus();
this.element.triggerHandler("dialogopen",[openEV,openUI],this.options.open);
this.isOpen=true;},
moveToTop:function(force){
if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);}
var maxZ=this.options.zIndex,options=this.options;
$('.ui-dialog:visible').each(function(){
maxZ=Math.max(maxZ,parseInt($(this).css('z-index'),10)||options.zIndex);});
(this.overlay&&this.overlay.$el.css('z-index',++maxZ));
this.uiDialog.css('z-index',++maxZ);
this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);},
close:function(){
(this.overlay&&this.overlay.destroy());
this.uiDialog.hide(this.options.hide);
var closeEV=null;
var closeUI={
options:this.options};
this.element.triggerHandler("dialogclose",[closeEV,closeUI],this.options.close);
$.ui.dialog.overlay.resize();
this.isOpen=false;},
destroy:function(){
(this.overlay&&this.overlay.destroy());
this.uiDialog.hide();
this.element.unbind('.dialog').removeData('dialog').removeClass('ui-dialog-content').hide().appendTo('body');
this.uiDialog.remove();},
createButtons:function(buttons){
var self=this,
hasButtons=false,
uiDialogButtonPane=this.uiDialogButtonPane;
uiDialogButtonPane.empty().hide();
$.each(buttons,function(){return!(hasButtons=true);});
if(hasButtons){
uiDialogButtonPane.show();
$.each(buttons,function(name,fn){
$('<button/>').text(name).click(function(){fn.apply(self.element[0],arguments);}).appendTo(uiDialogButtonPane);});}}});
$.extend($.ui.dialog,{
defaults:{
autoOpen:true,
autoResize:true,
bgiframe:false,
buttons:{},
closeOnEscape:true,
draggable:true,
height:200,
minHeight:100,
minWidth:150,
modal:false,
overlay:{},
position:'center',
resizable:true,
stack:true,
width:300,
zIndex:1000},
overlay:function(dialog){
this.$el=$.ui.dialog.overlay.create(dialog);}});
$.extend($.ui.dialog.overlay,{
instances:[],
events:$.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
function(e){return e+'.dialog-overlay';}).join(' '),
create:function(dialog){
if(this.instances.length===0){
setTimeout(function(){
$('a, :input').bind($.ui.dialog.overlay.events,function(){
var allow=false;
var $dialog=$(this).parents('.ui-dialog');
if($dialog.length){
var $overlays=$('.ui-dialog-overlay');
if($overlays.length){
var maxZ=parseInt($overlays.css('z-index'),10);
$overlays.each(function(){
maxZ=Math.max(maxZ,parseInt($(this).css('z-index'),10));});
allow=parseInt($dialog.css('z-index'),10)>maxZ;}else{
allow=true;}}
return allow;});},1);
$(document).bind('keydown.dialog-overlay',function(e){
var ESC=27;
(e.keyCode&&e.keyCode==ESC&&dialog.close());});
$(window).bind('resize.dialog-overlay',$.ui.dialog.overlay.resize);}
var $el=$('<div/>').appendTo(document.body).addClass('ui-dialog-overlay').css($.extend({
borderWidth:0,margin:0,padding:0,
position:'absolute',top:0,left:0,
width:this.width(),
height:this.height()},dialog.options.overlay));
(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());
this.instances.push($el);
return $el;},
destroy:function($el){
this.instances.splice($.inArray(this.instances,$el),1);
if(this.instances.length===0){
$('a, :input').add([document,window]).unbind('.dialog-overlay');}
$el.remove();},
height:function(){
if($.browser.msie&&$.browser.version<7){
var scrollHeight=Math.max(
document.documentElement.scrollHeight,
document.body.scrollHeight);
var offsetHeight=Math.max(
document.documentElement.offsetHeight,
document.body.offsetHeight);
if(scrollHeight<offsetHeight){
return $(window).height()+'px';}else{
return scrollHeight+'px';}}else{
return $(document).height()+'px';}},
width:function(){
if($.browser.msie&&$.browser.version<7){
var scrollWidth=Math.max(
document.documentElement.scrollWidth,
document.body.scrollWidth);
var offsetWidth=Math.max(
document.documentElement.offsetWidth,
document.body.offsetWidth);
if(scrollWidth<offsetWidth){
return $(window).width()+'px';}else{
return scrollWidth+'px';}}else{
return $(document).width()+'px';}},
resize:function(){
var $overlays=$([]);
$.each($.ui.dialog.overlay.instances,function(){
$overlays=$overlays.add(this);});
$overlays.css({
width:0,
height:0}).css({
width:$.ui.dialog.overlay.width(),
height:$.ui.dialog.overlay.height()});}});
$.extend($.ui.dialog.overlay.prototype,{
destroy:function(){
$.ui.dialog.overlay.destroy(this.$el);}});})(jQuery);
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);
(function(D){D.fn.extend({renderCalendar:function(P){var X=function(Y){return document.createElement(Y)};P=D.extend({},D.fn.datePicker.defaults,P);if(P.showHeader!=D.dpConst.SHOW_HEADER_NONE){var M=D(X("tr"));for(var S=Date.firstDayOfWeek;S<Date.firstDayOfWeek+7;S++){var H=S%7;var R=Date.dayNames[H];M.append(jQuery(X("th")).attr({scope:"col",abbr:R,title:R,"class":(H==0||H==6?"weekend":"weekday")}).html(P.showHeader==D.dpConst.SHOW_HEADER_SHORT?R.substr(0,1):R))}}var E=D(X("table")).attr({cellspacing:2,className:"jCalendar"}).append((P.showHeader!=D.dpConst.SHOW_HEADER_NONE?D(X("thead")).append(M):X("thead")));var F=D(X("tbody"));var U=(new Date()).zeroTime();var W=P.month==undefined?U.getMonth():P.month;var N=P.year||U.getFullYear();var K=new Date(N,W,1);var J=Date.firstDayOfWeek-K.getDay()+1;if(J>1){J-=7}var O=Math.ceil(((-1*J+1)+K.getDaysInMonth())/7);K.addDays(J-1);var V=function(){if(P.hoverClass){D(this).addClass(P.hoverClass)}};var G=function(){if(P.hoverClass){D(this).removeClass(P.hoverClass)}};var L=0;while(L++<O){var Q=jQuery(X("tr"));for(var S=0;S<7;S++){var I=K.getMonth()==W;var T=D(X("td")).text(K.getDate()+"").attr("className",(I?"current-month ":"other-month ")+(K.isWeekend()?"weekend ":"weekday ")+(I&&K.getTime()==U.getTime()?"today ":"")).hover(V,G);if(P.renderCallback){P.renderCallback(T,K,W,N)}Q.append(T);K.addDays(1)}F.append(Q)}E.append(F);return this.each(function(){D(this).empty().append(E)})},datePicker:function(E){if(!D.event._dpCache){D.event._dpCache=[]}E=D.extend({},D.fn.datePicker.defaults,E);return this.each(function(){var G=D(this);var I=true;if(!this._dpId){this._dpId=D.event.guid++;D.event._dpCache[this._dpId]=new A(this);I=false}if(E.inline){E.createButton=false;E.displayClose=false;E.closeOnSelect=false;G.empty()}var F=D.event._dpCache[this._dpId];F.init(E);if(!I&&E.createButton){F.button=D('<a href="#" class="dp-choose-date" title="'+D.dpText.TEXT_CHOOSE_DATE+'">'+D.dpText.TEXT_CHOOSE_DATE+"</a>").bind("click",function(){G.dpDisplay(this);this.blur();return false});G.after(F.button)}if(!I&&G.is(":text")){G.bind("dateSelected",function(K,J,L){this.value=J.asString();try{stepOne.IsStepOneComplete();}catch(Error){}try{supplierSignup.DateIncorporatedVaild();}catch(Error){}}).bind("change",function(){if(this.value!=""){var J=Date.fromString(this.value);if(J){F.setSelected(J,true,true)}}});if(E.clickInput){G.bind("click",function(){G.dpDisplay()})}var H=Date.fromString(this.value);if(this.value!=""&&H){F.setSelected(H,true,true)}}G.addClass("dp-applied")})},dpSetDisabled:function(E){return B.call(this,"setDisabled",E)},dpSetStartDate:function(E){return B.call(this,"setStartDate",E)},dpSetEndDate:function(E){return B.call(this,"setEndDate",E)},dpGetSelected:function(){var E=C(this[0]);if(E){return E.getSelected()}return null},dpSetSelected:function(G,F,E){if(F==undefined){F=true}if(E==undefined){E=true}return B.call(this,"setSelected",Date.fromString(G),F,E,true)},dpSetDisplayedMonth:function(E,F){return B.call(this,"setDisplayedMonth",Number(E),Number(F),true)},dpDisplay:function(E){return B.call(this,"display",E)},dpSetRenderCallback:function(E){return B.call(this,"setRenderCallback",E)},dpSetPosition:function(E,F){return B.call(this,"setPosition",E,F)},dpSetOffset:function(E,F){return B.call(this,"setOffset",E,F)},dpClose:function(){return B.call(this,"_closeCalendar",false,this[0])},_dpDestroy:function(){}});var B=function(G,F,E,I,H){return this.each(function(){var J=C(this);if(J){J[G](F,E,I,H)}})};function A(E){this.ele=E;this.displayedMonth=null;this.displayedYear=null;this.startDate=null;this.endDate=null;this.showYearNavigation=null;this.closeOnSelect=null;this.displayClose=null;this.selectMultiple=null;this.verticalPosition=null;this.horizontalPosition=null;this.verticalOffset=null;this.horizontalOffset=null;this.button=null;this.renderCallback=[];this.selectedDates={};this.inline=null;this.context="#dp-popup"}D.extend(A.prototype,{init:function(E){this.setStartDate(E.startDate);this.setEndDate(E.endDate);this.setDisplayedMonth(Number(E.month),Number(E.year));this.setRenderCallback(E.renderCallback);this.showYearNavigation=E.showYearNavigation;this.closeOnSelect=E.closeOnSelect;this.displayClose=E.displayClose;this.selectMultiple=E.selectMultiple;this.verticalPosition=E.verticalPosition;this.horizontalPosition=E.horizontalPosition;this.hoverClass=E.hoverClass;this.setOffset(E.verticalOffset,E.horizontalOffset);this.inline=E.inline;if(this.inline){this.context=this.ele;this.display()}},setStartDate:function(E){if(E){this.startDate=Date.fromString(E)}if(!this.startDate){this.startDate=(new Date()).zeroTime()}this.setDisplayedMonth(this.displayedMonth,this.displayedYear)},setEndDate:function(E){if(E){this.endDate=Date.fromString(E)}if(!this.endDate){this.endDate=(new Date("12/31/2999"))}if(this.endDate.getTime()<this.startDate.getTime()){this.endDate=this.startDate}this.setDisplayedMonth(this.displayedMonth,this.displayedYear)},setPosition:function(E,F){this.verticalPosition=E;this.horizontalPosition=F},setOffset:function(E,F){this.verticalOffset=parseInt(E)||0;this.horizontalOffset=parseInt(F)||0},setDisabled:function(E){$e=D(this.ele);$e[E?"addClass":"removeClass"]("dp-disabled");if(this.button){$but=D(this.button);$but[E?"addClass":"removeClass"]("dp-disabled");$but.attr("title",E?"":D.dpText.TEXT_CHOOSE_DATE)}if($e.is(":text")){$e.attr("disabled",E?"disabled":"")}},setDisplayedMonth:function(E,L,I){if(this.startDate==undefined||this.endDate==undefined){return}var H=new Date(this.startDate.getTime());H.setDate(1);var K=new Date(this.endDate.getTime());K.setDate(1);var G;if((!E&&!L)||(isNaN(E)&&isNaN(L))){G=new Date().zeroTime();G.setDate(1)}else{if(isNaN(E)){G=new Date(L,this.displayedMonth,1)}else{if(isNaN(L)){G=new Date(this.displayedYear,E,1)}else{G=new Date(L,E,1)}}}if(G.getTime()<H.getTime()){G=H}else{if(G.getTime()>K.getTime()){G=K}}var F=this.displayedMonth;var J=this.displayedYear;this.displayedMonth=G.getMonth();this.displayedYear=G.getFullYear();if(I&&(this.displayedMonth!=F||this.displayedYear!=J)){this._rerenderCalendar();D(this.ele).trigger("dpMonthChanged",[this.displayedMonth,this.displayedYear])}},setSelected:function(K,E,F,H){if(E==this.isSelected(K)){return}if(this.selectMultiple==false){this.selectedDates={};D("td.selected",this.context).removeClass("selected")}if(F&&this.displayedMonth!=K.getMonth()){this.setDisplayedMonth(K.getMonth(),K.getFullYear(),true)}this.selectedDates[K.toString()]=E;var I="td.";I+=K.getMonth()==this.displayedMonth?"current-month":"other-month";I+=':contains("'+K.getDate()+'")';var J;D(I,this.ele).each(function(){if(D(this).text()==K.getDate()){J=D(this);J[E?"addClass":"removeClass"]("selected")}});if(H){var G=this.isSelected(K);$e=D(this.ele);$e.trigger("dateSelected",[K,J,G]);$e.trigger("change")}},isSelected:function(E){return this.selectedDates[E.toString()]},getSelected:function(){var E=[];for(s in this.selectedDates){if(this.selectedDates[s]==true){E.push(Date.parse(s))}}return E},display:function(E){if(D(this.ele).is(".dp-disabled")){return}E=E||this.ele;var L=this;var H=D(E);var K=H.offset();var M;var N;var G;var I;if(L.inline){M=D(this.ele);N={id:"calendar-"+this.ele._dpId,className:"dp-popup dp-popup-inline"};I={}}else{M=D("body");N={id:"dp-popup",className:"dp-popup"};I={top:K.top+L.verticalOffset,left:K.left+L.horizontalOffset};var J=function(Q){var O=Q.target;var P=D("#dp-popup")[0];while(true){if(O==P){return true}else{if(O==document){L._closeCalendar();return false}else{O=D(O).parent()[0]}}}};this._checkMouse=J;this._closeCalendar(true)}M.append(D("<div></div>").attr(N).css(I).append(D("<h2></h2>"),D('<div class="dp-nav-prev"></div>').append(D('<a class="dp-nav-prev-year" href="#" title="'+D.dpText.TEXT_PREV_YEAR+'">&lt;&lt;</a>').bind("click",function(){return L._displayNewMonth.call(L,this,0,-1)}),D('<a class="dp-nav-prev-month" href="#" title="'+D.dpText.TEXT_PREV_MONTH+'">&lt;</a>').bind("click",function(){return L._displayNewMonth.call(L,this,-1,0)})),D('<div class="dp-nav-next"></div>').append(D('<a class="dp-nav-next-year" href="#" title="'+D.dpText.TEXT_NEXT_YEAR+'">&gt;&gt;</a>').bind("click",function(){return L._displayNewMonth.call(L,this,0,1)}),D('<a class="dp-nav-next-month" href="#" title="'+D.dpText.TEXT_NEXT_MONTH+'">&gt;</a>').bind("click",function(){return L._displayNewMonth.call(L,this,1,0)})),D("<div></div>").attr("className","dp-calendar")).bgIframe());var F=this.inline?D(".dp-popup",this.context):D("#dp-popup");if(this.showYearNavigation==false){D(".dp-nav-prev-year, .dp-nav-next-year",L.context).css("display","none")}if(this.displayClose){F.append(D('<a href="#" id="dp-close">'+D.dpText.TEXT_CLOSE+"</a>").bind("click",function(){L._closeCalendar();return false}))}L._renderCalendar();D(this.ele).trigger("dpDisplayed",F);if(!L.inline){if(this.verticalPosition==D.dpConst.POS_BOTTOM){F.css("top",K.top+H.height()-F.height()+L.verticalOffset)}if(this.horizontalPosition==D.dpConst.POS_RIGHT){F.css("left",K.left+H.width()-F.width()+L.horizontalOffset)}D(document).bind("mousedown",this._checkMouse)}},setRenderCallback:function(E){if(E==null){return}if(E&&typeof(E)=="function"){E=[E]}this.renderCallback=this.renderCallback.concat(E)},cellRender:function(J,E,H,G){var K=this.dpController;var I=new Date(E.getTime());J.bind("click",function(){var L=D(this);if(!L.is(".disabled")){K.setSelected(I,!L.is(".selected")||!K.selectMultiple,false,true);if(K.closeOnSelect){K._closeCalendar()}}});if(K.isSelected(I)){J.addClass("selected")}for(var F=0;F<K.renderCallback.length;F++){K.renderCallback[F].apply(this,arguments)}},_displayNewMonth:function(F,E,G){if(!D(F).is(".disabled")){this.setDisplayedMonth(this.displayedMonth+E,this.displayedYear+G,true)}F.blur();return false},_rerenderCalendar:function(){this._clearCalendar();this._renderCalendar()},_renderCalendar:function(){D("h2",this.context).html(Date.monthNames[this.displayedMonth]+" "+this.displayedYear);D(".dp-calendar",this.context).renderCalendar({month:this.displayedMonth,year:this.displayedYear,renderCallback:this.cellRender,dpController:this,hoverClass:this.hoverClass});if(this.displayedYear==this.startDate.getFullYear()&&this.displayedMonth==this.startDate.getMonth()){D(".dp-nav-prev-year",this.context).addClass("disabled");D(".dp-nav-prev-month",this.context).addClass("disabled");D(".dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())>20){H.addClass("disabled")}});var G=this.startDate.getDate();D(".dp-calendar td.current-month",this.context).each(function(){var H=D(this);if(Number(H.text())<G){H.addClass("disabled")}})}else{D(".dp-nav-prev-year",this.context).removeClass("disabled");D(".dp-nav-prev-month",this.context).removeClass("disabled");var G=this.startDate.getDate();if(G>20){var F=new Date(this.startDate.getTime());F.addMonths(1);if(this.displayedYear==F.getFullYear()&&this.displayedMonth==F.getMonth()){D("dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())<G){H.addClass("disabled")}})}}}if(this.displayedYear==this.endDate.getFullYear()&&this.displayedMonth==this.endDate.getMonth()){D(".dp-nav-next-year",this.context).addClass("disabled");D(".dp-nav-next-month",this.context).addClass("disabled");D(".dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())<14){H.addClass("disabled")}});var G=this.endDate.getDate();D(".dp-calendar td.current-month",this.context).each(function(){var H=D(this);if(Number(H.text())>G){H.addClass("disabled")}})}else{D(".dp-nav-next-year",this.context).removeClass("disabled");D(".dp-nav-next-month",this.context).removeClass("disabled");var G=this.endDate.getDate();if(G<13){var E=new Date(this.endDate.getTime());E.addMonths(-1);if(this.displayedYear==E.getFullYear()&&this.displayedMonth==E.getMonth()){D(".dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())>G){H.addClass("disabled")}})}}}},_closeCalendar:function(E,F){if(!F||F==this.ele){D(document).unbind("mousedown",this._checkMouse);this._clearCalendar();D("#dp-popup a").unbind();D("#dp-popup").empty().remove();if(!E){D(this.ele).trigger("dpClosed",[this.getSelected()])}}},_clearCalendar:function(){D(".dp-calendar td",this.context).unbind();D(".dp-calendar",this.context).empty()}});D.dpConst={SHOW_HEADER_NONE:0,SHOW_HEADER_SHORT:1,SHOW_HEADER_LONG:2,POS_TOP:0,POS_BOTTOM:1,POS_LEFT:0,POS_RIGHT:1};D.dpText={TEXT_PREV_YEAR:"Previous year",TEXT_PREV_MONTH:"Previous month",TEXT_NEXT_YEAR:"Next year",TEXT_NEXT_MONTH:"Next month",TEXT_CLOSE:"Close",TEXT_CHOOSE_DATE:$('#Hidden_Date').val()};D.dpVersion="$Id: jquery.datePicker.js 15 2008-12-17 04:40:18Z kelvin.luck $";D.fn.datePicker.defaults={month:undefined,year:undefined,showHeader:D.dpConst.SHOW_HEADER_SHORT,startDate:undefined,endDate:undefined,inline:false,renderCallback:null,createButton:true,showYearNavigation:true,closeOnSelect:true,displayClose:false,selectMultiple:false,clickInput:false,verticalPosition:D.dpConst.POS_TOP,horizontalPosition:D.dpConst.POS_LEFT,verticalOffset:0,horizontalOffset:0,hoverClass:"dp-hover"};function C(E){if(E._dpId){return D.event._dpCache[E._dpId]}return false}if(D.fn.bgIframe==undefined){D.fn.bgIframe=function(){return this}}D(window).bind("unload",function(){var F=D.event._dpCache||[];for(var E in F){D(F[E].ele)._dpDestroy()}})})(jQuery);
(function($){
var ajax=$.ajax;
var pendingRequests={};
var synced=[];
var syncedData=[];
$.ajax=function(settings){
settings=jQuery.extend(settings,jQuery.extend({},jQuery.ajaxSettings,settings));
var port=settings.port;
switch(settings.mode){
case"abort":
if(pendingRequests[port]){
pendingRequests[port].abort();}
return pendingRequests[port]=ajax.apply(this,arguments);
case"queue":
var _old=settings.complete;
settings.complete=function(){
if(_old)
_old.apply(this,arguments);
jQuery([ajax]).dequeue("ajax"+port);;};
jQuery([ajax]).queue("ajax"+port,function(){
ajax(settings);});
return;
case"sync":
var pos=synced.length;
synced[pos]={
error:settings.error,
success:settings.success,
complete:settings.complete,
done:false};
syncedData[pos]={
error:[],
success:[],
complete:[]};
settings.error=function(){syncedData[pos].error=arguments;};
settings.success=function(){syncedData[pos].success=arguments;};
settings.complete=function(){
syncedData[pos].complete=arguments;
synced[pos].done=true;
if(pos==0||!synced[pos-1])
for(var i=pos;i<synced.length&&synced[i].done;i++){
if(synced[i].error)synced[i].error.apply(jQuery,syncedData[i].error);
if(synced[i].success)synced[i].success.apply(jQuery,syncedData[i].success);
if(synced[i].complete)synced[i].complete.apply(jQuery,syncedData[i].complete);
synced[i]=null;
syncedData[i]=null;}};}
return ajax.apply(this,arguments);};})(jQuery);
var currentStep=1;
(function($){
function canAnimate(i,cur){
var canAnimate=true;
if(cur==undefined){
cur=-1;}
if(currentStep==undefined){
currentStep=1;}
switch(i){
case 0:
currentStep=1;
stepOne.ShowJourneyFinder();
try{
pageTracker._trackEvent('Wizard','Step One Clicked');}catch(Error){}
break;
case 1:
stepOne.ShowJourneyFinder();
if(document.getElementById('StepTwo').className=="StepTwo_Disabled"){
canAnimate=false;}else{
if(i==currentStep){
if(stepOne.IsStepOneComplete){
stepOne.JourneyType();
var loading="<div style='margin-left:220px;margin-top:60px;'><div class='table_loading'></div><div class='title' style='float:left;'>"+$('#HiddenLoading').val()+"</div></div>";
document.getElementById('SharedJourneyDeparture').innerHTML=loading;
document.getElementById('PrivateJourneyDeparture').innerHTML=loading;
document.getElementById('SharedJourneyReturn').innerHTML=loading;
document.getElementById('PrivateJourneyReturn').innerHTML=loading;
stepTwo.PreLoad();
setTimeout("stepTwo.Load();",1000);}}
if(cur!=i){
if(currentStep==2){
currentStep=1;
try{
pageTracker._trackEvent('Wizard','Step One Clicked');}catch(Error){}}else{
currentStep=2;
try{
pageTracker._trackEvent('Wizard','Step Two Clicked');}catch(Error){}}}}
break;
case 2:
stepOne.ShowJourneyFinder();
if(document.getElementById('StepThree').className=="StepThree_Disabled"){
canAnimate=false;}else{
if(i==currentStep||document.getElementById('StepFive').className=="StepFive"){
if(basketChanged!=null){
document.getElementById('SupplierAccordionHolder').innerHTML="<div style='margin-left:250px;margin-top:100px;margin-bottom:190px;'><div class='table_loading'></div><div class='title'>"+document.getElementById('Hidden_Calculating').value+"</div></div>";
setTimeout("basket.GetUserBasket();",1000);}}
if(cur!=i){
if(currentStep==3){
currentStep=2;
try{
pageTracker._trackEvent('Wizard','Step Two Clicked');}catch(Error){}}else{
currentStep=3;
try{
pageTracker._trackEvent('Wizard','Step Three Clicked');}catch(Error){}}}}
break;
case 3:
stepOne.ShowJourneyFinder();
if(document.getElementById('StepFour').className=="StepFour_Disabled"&&document.getElementById('StepFive').className=="StepFive_Disabled"){
canAnimate=false;}else{
if(cur!=i){
if(currentStep==4){
currentStep=3;
try{
pageTracker._trackEvent('Wizard','Step Three Clicked');}catch(Error){}}else{
currentStep=4;
try{
pageTracker._trackEvent('Wizard','Step Four Clicked');}catch(Error){}}}}
break;}
return canAnimate;};
$.fn.jFlow=function(options){
var opts=$.extend({},$.fn.jFlow.defaults,options);
var randNum=Math.floor(Math.random()*11);
var jFC=opts.controller;
var jFS=opts.slideWrapper;
var jSel=opts.selectedWrapper;
var cur=0;
var maxi=$(jFC).length;
var slide=function(dur,i){
$(opts.slides).children().css({
overflow:"hidden"});
$(opts.slides).animate({
marginLeft:"-"+(i*$(opts.slides).find(":first-child").width()+"px")},
opts.duration*(dur),
opts.easing,
function(){
$(opts.slides).children().css({
overflow:"auto"});
$(".temp_hide").show();});}
$(this).find(jFC).each(function(i){
$(this).click(function(){
if(canAnimate(i,cur)){
if($(opts.slides).is(":not(:animated)")){
$(jFC).removeClass(jSel);
$(this).addClass(jSel);
var dur=Math.abs(cur-i);
slide(dur,i);
cur=i;}}});});
$(opts.slides).before('<div id="'+jFS.substring(1,jFS.length)+'"></div>').appendTo(jFS);
$(opts.slides).find("div").each(function(){
$(this).before('<div class="jFlowSlideContainer"></div>').appendTo($(this).prev());});
$(jFC).eq(cur).addClass(jSel);
var resize=function(x){
$(jFS).css({
position:"relative",
width:opts.width,
overflow:"hidden"});
$(opts.slides).css({
position:"relative",
width:$(jFS).width()*$(jFC).length+"px",
overflow:"hidden"});
$(opts.slides).children().css({
position:"relative",
width:$(jFS).width()+"px","float":"left",
overflow:"auto"});
$(opts.slides).css({
marginLeft:"-"+(cur*$(opts.slides).find(":eq(0)").width()+"px")});}
resize();
$(window).resize(function(){
resize();});
$(opts.prev).click(function(){
if(canAnimate(cur)){
if($(opts.slides).is(":not(:animated)")){
var dur=1;
if(cur>0)
cur--;
else{
cur=maxi-1;
dur=cur;}
$(jFC).removeClass(jSel);
slide(dur,cur);
$(jFC).eq(cur).addClass(jSel);}}});
$(opts.next).click(function(){
if(canAnimate(cur+1)){
if($(opts.slides).is(":not(:animated)")){
var dur=1;
if(cur<maxi-1)
cur++;
else{
cur=0;
dur=maxi-1;}
$(jFC).removeClass(jSel);
slide(dur,cur);
$(jFC).eq(cur).addClass(jSel);}}});};
$.fn.jFlow.defaults={
controller:".jFlowControl",
slideWrapper:"#jFlowSlide",
selectedWrapper:"jFlowSelected",
easing:"swing",
duration:400,
width:"100%",
prev:".jFlowPrev",
next:".jFlowNext"};})(jQuery);
var magicCombo=function(){
return{
CreateDatePicker:function(table_id){
var input_id=table_id+"_input";
var button_id=table_id+"_button";
var hyperlink_id=table_id+"_hyper";
var td0_id=table_id+'_td0'
var td_id=table_id+'_td1'
var td2_id=table_id+'_td2'
var title='';
var width='width:93px';
var container="<table id=\""+table_id+"\" class=\"ddcombo_table\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody>"+"<tr>"+"<td id=\""+td0_id+"\" class=\"ddcombo_td0\"></td>"+"<td id=\""+td_id+"\" class=\"ddcombo_td1\" style=\""+width+";\">"+"<div class=\"ddcombo_div4\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";\" >"+"<input id=\""+input_id+"\"  value=\""+title+"\" disabled=\"disable\" class=\"date-pick\" title=\""+title+"\" value=\""+title+"\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; color: #555; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width:70px;height:21px;left:0px;\" />"+"</div>"+"</td>"+"<td id=\""+td2_id+"\" class=\"ddcombo_td0\"></td>"+"</tr>"+"</tbody></table>";
document.getElementById(table_id+'Holder').innerHTML=container;
magicCombo.bindHoverInput(td0_id,td_id,td2_id);},
CreateInputBox:function(table_id,width,password,validate){
var input_id=table_id+"_input";
var button_id=table_id+"_button";
var hyperlink_id=table_id+"_hyper";
var td0_id=table_id+'_td0'
var td_id=table_id+'_td1'
var td2_id=table_id+'_td2'
var title='';
var width='width:'+width+'px';
var type="";
if(password){
type="TYPE=password";}
var container="<table id=\""+table_id+"\" class=\"ddcombo_table\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody>"+"<tr>"+"<td id=\""+td0_id+"\" class=\"ddcombo_td0\"></td>"+"<td id=\""+td_id+"\" class=\"ddcombo_td1\" style=\""+width+";\">"+"<div class=\"ddcombo_div4\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";\" >"+"<input  id=\""+input_id+"\" "+type+" title=\""+title+"\" class=\"ddcombo_input1 ddcombo_input\" value=\""+title+"\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; color: #555; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";height:21px;left:0px;\" />"+"</div>"+"</td>"+"<td id=\""+td2_id+"\" class=\"ddcombo_td0\"></td>"+"</tr>"+"</tbody></table>";
document.getElementById(table_id+'Holder').innerHTML=container;
if(validate!=null){
$('#'+input_id).keyup(function(event){
eval(validate);});}
magicCombo.bindHoverInput(td0_id,td_id,td2_id);},
hoverImage:function(elementId,imageName){
try{
var mouseOverElement=document.getElementById(elementId);
mouseOverElement.style.backgroundImage="url(/images/jquery/"+imageName+")";}
catch(Error){}},
hoverClass:function(elementId,className){
try{
document.getElementById(elementId).className=className;}
catch(Error){}},
Clean:function(str){
if(!arguments.callee.re){
arguments.callee.re=[/["'"\b!#$?`~%^&*<>;]+/ig,/^-+|-+$/g];}
var newStr=str;
newStr=newStr.replace(arguments.callee.re[0],'').replace(arguments.callee.re[1],'');
if(newStr!=str){
return newStr;}},
bindHoverInput:function(td0_id,td_id,td2_id,isTd2,isSearch){
$('#'+td_id).mouseover(function(event){
magicCombo.hoverClass(td0_id,'ddcombo_td0_Over');
magicCombo.hoverImage(td_id,'inputBox_middle_over.gif');
if(isTd2){
magicCombo.hoverClass(td2_id,'ddcombo_td2_Over');}
else{
if(isSearch){
magicCombo.hoverClass(td2_id,'ddcombo_td01_Over');}else{
magicCombo.hoverClass(td2_id,'ddcombo_td0_Over');}}}).mouseout(function(event){
magicCombo.hoverClass(td0_id,'ddcombo_td0');
magicCombo.hoverImage(td_id,'inputBox_middle.gif');
if(isTd2){
magicCombo.hoverClass(td2_id,'ddcombo_td2');}
else{
if(isSearch){
magicCombo.hoverClass(td2_id,'ddcombo_td01');}else{
magicCombo.hoverClass(td2_id,'ddcombo_td0');}}});}}}();
(function($){
var INTERVAL_MS=23;
var interval=null;
var checklist=[];
$.elementReady=function(id,fn){
checklist.push({id:id,fn:fn});
if(!interval){
interval=setInterval(check,INTERVAL_MS);}
return this;};
function check(){
var docReady=$.isReady;
for(var i=checklist.length-1;0<=i;--i){
var el=document.getElementById(checklist[i].id);
if(el){
var fn=checklist[i].fn;
checklist[i]=checklist[checklist.length-1];
checklist.pop();
try{
fn.apply(el,[$]);}catch(Error){}}}
if(docReady){
clearInterval(interval);
interval=null;}};})(jQuery);;(function($){
$.fn.extend({
autocomplete:function(urlOrData,options){
var isUrl=typeof urlOrData=="string";
options=$.extend({},$.DDComboBox.defaults,{
url:isUrl?urlOrData:null,
data:isUrl?null:urlOrData,
delay:isUrl?$.DDComboBox.defaults.delay:10,
max:options&&!options.scroll?10:150,
button:false},options);
options.highlight=options.highlight||function(value){return value;};
options.formatMatch=options.formatMatch||options.formatItem;
return this.each(function(){
new $.DDComboBox.main(this,options);});},
ddcombo:function(options){
options=$.extend({},$.DDComboBox.defaults,options);
return this.each(function(){
new $.DDComboBox.main(this,options);});},
ddcombo_autocomplete:function(button,urlOrData,options){
var isUrl=typeof urlOrData=="string";
options=$.extend({},$.DDComboBox.defaults,{
url:isUrl?urlOrData:null,
data:isUrl?null:urlOrData,
delay:isUrl?options.delay:10,
max:options&&!options.scroll?10:150},options);
options.highlight=options.highlight||function(value){return value;};
options.formatMatch=options.formatMatch||options.formatItem;
return this.each(function(){
button.acbox=new $.DDComboBox(this,button,options);});},
ddcombo_result:function(handler){
return this.bind("result",handler);},
ddcombo_search:function(handler){
return this.trigger("search",[handler]);},
ddcombo_flushCache:function(){
return this.trigger("flushCache");},
ddcombo_setOptions:function(options){
return this.trigger("setOptions",[options]);},
ddcombo_unautocomplete:function(){
return this.trigger("unautocomplete");},
ddcombo_autocomplete_init:function(){
return this.trigger("flushCache");}});
$.DDComboBox=function(input,button,options){
var KEY={
UP:38,
DOWN:40,
DEL:46,
TAB:9,
RETURN:13,
ESC:27,
COMMA:188,
PAGEUP:33,
PAGEDOWN:34,
BACKSPACE:8,
SHIFT:16};
var $input=$(input).attr("ddcombo_autocomplete","off").addClass(options.inputClass);
var mouseOverButton=false;
var timeout;
var previousValue="";
var cache=$.DDComboBox.Cache(options);
var hasFocus=0;
var lastKeyPressCode;
var shift=false;
var config={
mouseDownOnSelect:false};
var select=$.DDComboBox.Select(options,input,selectCurrent,config);
$(button).ready(function(){
$.extend(options,arguments[1]);
cache.populate();
if(options.data!=null){
if(options.showAutocompleteOnInit){
showAutocomplete(false);}}}).mousedown(function(event){
event.preventDefault();
input.focus();
if(options.data!=null){
showAutocomplete(true);}}).mouseover(function(){
mouseOverButton=true;}).mouseout(function(){
mouseOverButton=false;});
$input.keyup(function(event){
switch(event.keyCode){
case KEY.SHIFT:
shift=false;
break;
default:
break;}});
$input.keydown(function(event){
lastKeyPressCode=event.keyCode;
switch(event.keyCode){
case KEY.UP:
event.preventDefault();
if(select.visible()){
select.prev();}else{
onChange(0,true);}
break;
case KEY.DOWN:
event.preventDefault();
if(select.visible()){
select.next();}else{
onChange(0,true);}
break;
case KEY.PAGEUP:
event.preventDefault();
if(select.visible()){
select.pageUp();}else{
onChange(0,true);}
break;
case KEY.PAGEDOWN:
event.preventDefault();
if(select.visible()){
select.pageDown();}else{
onChange(0,true);}
break;
case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:
case KEY.SHIFT:
shift=true;
break;
case KEY.TAB:
if(selectCurrent()){
if(!options.multiple)
$input.blur();
event.preventDefault();}
if(this.id=='ReturnMin_input'){
document.form.searchLanguages_input.focus();}
if(this.id=='searchLanguages_input'){
if(shift){
document.getElementById('searchLanguages_input').focus();}
else{}}
break;
case KEY.RETURN:
if(selectCurrent()){
if(!options.multiple)
$input.blur();
event.preventDefault();}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(timeout);
timeout=setTimeout(onChange,options.delay);
break;}}).keypress(function(){}).focus(function(){
input.style.color="#000000";
if(options.validate=="stepOne"){
try{
if(this.id=='searchOriginLocations_input'){
if(!geographical.GetFocusOriginLocation()){}}
else if(this.id=='searchDestinationLocations_input'){
if(!geographical.GetFocusDestinationLocation()){}}
if(input.value==options.defaultValue){
input.value="";}
stepOne.IsStepOneComplete();}catch(Error){}}
hasFocus++;}).blur(function(){
if(!input.value||!input.value.length){
input.value=options.defaultValue;
input.style.color="#000000";}
hasFocus=0;
if(!config.mouseDownOnSelect){
hideResults();}
if(options.validate=="stepOne"){
if(this.id=='searchOriginLocations_input'){
geographical.SetFocusOriginLocation(false);}else if(this.id=='searchDestinationLocations_input'){
geographical.SetFocusDestinationLocation(false);}}
if(options.validate=="onChange"){
var onChangeFunctionValue=options.onChangeFunction(input.value,false);}}).click(function(){
if(hasFocus++>1&&!select.visible()){}
hideResults();}).bind("search",function(){
var fn=(arguments.length>1)?arguments[1]:null;
function findValueCallback(q,data){
var result;
if(data&&data.length){
for(var i=0;i<data.length;i++){
if(data[i].result.toLowerCase()==q.toLowerCase()){
result=data[i];
break;}}}
if(typeof fn=="function")fn(result);
else $input.trigger("result",result&&[result.data,result.value]);}
$.each(trimWords($input.val()),function(i,value){
request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){
cache.flush();}).bind("setOptions",function(){
$.extend(options,arguments[1]);
if("data"in arguments[1]){
cache.populate();}}).bind("unautocomplete",function(){
select.unbind();
$input.unbind();});
function showAutocomplete(show){
if(select.visible()){
hideResultsNow();}else{
onChange(true,true,show);}}
function selectCurrent(){
var selected=select.selected();
if(!selected)
return false;
var v=selected.result;
previousValue=v;
if(options.multiple){
var words=trimWords($input.val());
if(words.length>1){
v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
v+=options.multipleSeparator;}
$input.val(v);
hideResultsNow();
$input.trigger("result",[selected.data,selected.value]);
return true;}
function onChange(isAutoCompleteButton,skipPrevCheck,show){
if(lastKeyPressCode==KEY.DEL){
select.hide();
return;}
var currentValue=$input.val();
if(!skipPrevCheck&&currentValue==previousValue){
return;}
previousValue=currentValue;
if(isAutoCompleteButton==true){
currentValue="";}else{
currentValue=lastWord(currentValue);}
if(currentValue.length>=options.minChars){
if(show==undefined){
$('#'+options.onLoading).show();}
if(!options.matchCase)
currentValue=currentValue.toLowerCase();
request(currentValue,receiveData,hideResultsNow,isAutoCompleteButton,show);}
else{
stopLoading();
select.hide();}
var onChangeFunctionValue=options.onChangeFunction(currentValue,true,show);};
function trimWords(value){
if(!value){
return[""];}
var words=value.split(options.multipleSeparator);
var result=[];
$.each(words,function(i,value){
if($.trim(value))
result[i]=$.trim(value);});
return result;}
function lastWord(value){
if(!options.multiple)
return value;
var words=trimWords(value);
return words[words.length-1];}
function autoFill(q,sValue){
if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){
try{
$input.val($input.val()+sValue.substring(lastWord(previousValue).length));}catch(Error){}
$.DDComboBox.Selection(input,previousValue.length,previousValue.length+sValue.length);}};
function hideResults(){
clearTimeout(timeout);
timeout=setTimeout(hideResultsNow,100);};
function hideResultsNow(){
select.hide();
clearTimeout(timeout);
stopLoading();
if(options.mustMatch){
$input.ddcombo_search(
function(result){
if(!result){
$input.val("");}});}};
function receiveData(q,data,isAutoCompleteButton,show){
try{
if(data&&data.length){
select.display(data,q,isAutoCompleteButton);
if(show==null){
show=true;}
if(show){
select.show();}else{
select.hide();}}else{
hideResultsNow();}}catch(Error){
alert(Error.message);}
stopLoading();};
function request(term,success,failure,isAutoCompleteButton,show){
if(!options.matchCase)
term=term.toLowerCase();
var data=cache.load(term);
if(data&&data.length){
success(term,data,isAutoCompleteButton,show);}else if((typeof options.url=="string")&&(options.url.length>0)){
var extraParams={
timestamp:+new Date()};
$.each(options.extraParams,function(key,param){
extraParams[key]=typeof param=="function"?param():param;});
$.ajax({
mode:"abort",
port:input.name,
dataType:options.dataType,
url:options.url,
success:function(data){
var parsed=options.parse&&options.parse(data)||parse(data);
cache.add(term,parsed);
success(term,parsed,isAutoCompleteButton,show);},
data:$.extend({
q:lastWord(term),
limit:options.max},extraParams)});}else{
select.emptyList();
failure(term);}};
function parse(data){
var parsed=[];
var rows=data.split("\n");
for(var i=0;i<rows.length;i++){
var row=$.trim(rows[i]);
if(row){
row=row.split("|");
parsed[parsed.length]={
data:row,
value:row[0],
result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
return parsed;};
function stopLoading(){
$('#'+options.onLoading).hide();};};
$.DDComboBox.main=function(obj,options){
var table_id=options.name.toString();
var input_id=table_id+"_input";
var button_id=table_id+"_button";
var hyperlink_id=table_id+"_hyper";
var td0_id=table_id+'_td0'
var td_id=table_id+'_td1'
var td2_id=table_id+'_td2'
var title=options.defaultValue;
var width='width:'+options.width+'px';
if(options.button==true){
var container="<table id=\""+table_id+"\" class=\"ddcombo_table\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" ><tbody>"+"<tr>"+"<td id=\""+td0_id+"\" class=\"ddcombo_td0\"></td>"+"<td id=\""+td_id+"\" class=\"ddcombo_td1\" style=\""+width+";\">"+"<div class=\"ddcombo_div4\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";\" >"+"<input id=\""+input_id+"\" autocomplete=\"off\" class=\"ddcombo_input1 ddcombo_input\" value=\""+title+"\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; color: #000000; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";height:20px;\ ddcombo_autocomplete=\"off\"/>"+"</div>"+"</td>"+"<td id=\""+button_id+"\" class=\"ddcombo_td2\"align=\"left\" valign=\"top\""+" onmousedown=\"magicCombo.hoverClass('"+button_id+"','ddcombo_td2_Down');\" "+" onmouseup=\"magicCombo.hoverClass('"+button_id+"','ddcombo_td2');\"></td>"+"</tr>"+"</tbody></table>";
obj.innerHTML=container;
var button=document.getElementById(button_id);
$.elementReady(input_id,function(){
$(this).ddcombo_autocomplete(button,options["data"],options);});
magicCombo.bindHoverInput(td0_id,td_id,td2_id,true);}else{
var container="<table id=\""+table_id+"\" class=\"ddcombo_table\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" ><tbody>"+"<tr>"+"<td id=\""+td0_id+"\" class=\"ddcombo_td0\"></td>"+"<td id=\""+td_id+"\" class=\"ddcombo_td1\" style=\""+width+";\">"+"<div class=\"ddcombo_div4\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";\" >"+"<input id=\""+input_id+"\" autocomplete=\"off\" class=\"ddcombo_input1 ddcombo_input\" value=\""+title+"\" style=\"background: transparent url(/images/jquery/transparent_pixel.gif) repeat scroll 0% 0%; color: #000000; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; "+width+";height:20px;\ ddcombo_autocomplete=\"off\"/>"+"</div>"+"</td>"+"<td id=\""+td2_id+"\" class=\"ddcombo_td01\"></td>"+"</tr>"+"</tbody></table>";
obj.innerHTML=container;
var input=document.getElementById(input_id);
$.elementReady(input_id,function(){
new $.DDComboBox(input,input,options);});
try{
magicCombo.bindHoverInput(td0_id,td_id,td2_id,false,true);}catch(Error){}}
$('#'+input_id).keyup(function(){
$('#'+input_id).val(magicCombo.Clean($('#'+input_id).val()));});}
$.DDComboBox.defaults={
inputClass:"ddcombo_input",
resultsClass:"ddcombo_results",
loadingClass:"ddcombo_loading",
minChars:0,
delay:100,
matchCase:false,
matchSubset:true,
matchContains:false,
cacheLength:10,
max:246,
mustMatch:false,
extraParams:{},
selectFirst:true,
formatItem:function(row){return row[0];},
formatMatch:null,
autoFill:false,
width:50,
multiple:false,
button:true,
onLoading:"wizzard_container_loading",
onChangeFunction:function(){return false;},
multipleSeparator:", ",
highlight:function(value,term){
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},
scroll:true,
scrollHeight:180,
validate:"none"};
$.DDComboBox.Cache=function(options){
var data={};
var length=0;
function matchSubset(s,sub){
if(!options.matchCase)
s=s.toString().toLowerCase();
var i=s.toString().indexOf(sub);
if(i==-1)return false;
return i==0||options.matchContains;};
function add(q,value){
if(length>options.cacheLength){
flush();}
if(!data[q]){
length++;}
data[q]=value;}
function populate(){
if(!options.data)return false;
var stMatchSets={},
nullData=0;
if(!options.url)options.cacheLength=1;
stMatchSets[""]=[];
for(var i=0,ol=options.data.length;i<ol;i++){
var rawValue=options.data[i];
rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;
var value=options.formatMatch(rawValue,i+1,options.data.length);
if(value===false)
continue;
var firstChar=value.charAt(0).toLowerCase();
if(!stMatchSets[firstChar])
stMatchSets[firstChar]=[];
var row={
value:value,
data:rawValue,
result:options.formatResult&&options.formatResult(rawValue)||value};
stMatchSets[firstChar].push(row);
if(nullData++<options.max){
stMatchSets[""].push(row);}};
$.each(stMatchSets,function(i,value){
options.cacheLength++;
add(i,value);});}
setTimeout(populate,25);
function flush(){
data={};
length=0;}
return{
flush:flush,
add:add,
populate:populate,
load:function(q){
if(!options.cacheLength||!length)
return null;
if(!options.url&&options.matchContains){
var csub=[];
for(var k in data){
if(k.length>0){
var c=data[k];
$.each(c,function(i,x){
if(matchSubset(x.value,q)){
csub.push(x);}});}}
return csub;}else
if(data[q]){
return data[q];}else
if(options.matchSubset){
for(var i=q.length-1;i>=options.minChars;i--){
var c=data[q.substr(0,i)];
if(c){
var csub=[];
$.each(c,function(i,x){
if(matchSubset(x.value,q)){
csub[csub.length]=x;}});
return csub;}}}
return null;}};};
$.DDComboBox.Select=function(options,input,select,config){
var CLASSES={
ACTIVE:"ddcombo_over"};
var listItems,
active=-1,
data,
term="",
needsInit=true,
element,
list;
function init(){
if(!needsInit)
return;
element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);
list=$("<ul>").appendTo(element).mouseover(function(event){
if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){
active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));
$(target(event)).addClass(CLASSES.ACTIVE);}}).blur(function(){
hide();}).click(function(event){
$(target(event)).addClass(CLASSES.ACTIVE);
select();
return false;}).mousedown(function(){
config.mouseDownOnSelect=true;
input.focus();}).scroll(function(){
config.mouseDownOnSelect=false;
input.focus();});
if(options.width>0)
element.css("width",options.width+10);
needsInit=false;}
function target(event){
var element=event.target;
while(element&&element.tagName!="LI")
element=element.parentNode;
if(!element)
return[];
return element;}
function moveSelect(step){
listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);
movePosition(step);
var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);
if(options.scroll){
var offset=0;
listItems.slice(0,active).each(function(){
offset+=this.offsetHeight;});
if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){
list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){
list.scrollTop(offset);}}};
function movePosition(step){
active+=step;
if(active<0){
active=listItems.size()-1;}else if(active>=listItems.size()){
active=0;}}
function limitNumberOfItems(available){
return options.max&&options.max<available?options.max:available;}
function fillList(isAutoCompleteButton){
list.empty();
var max=limitNumberOfItems(data.length);
for(var i=0;i<max;i++){
if(!data[i])
continue;
var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);
if(formatted===false)
continue;
var li=$("<li>").html(options.highlight(formatted,term)).addClass(i%2==0?"ddcombo_event":"ddcombo_odd").appendTo(list)[0];
$.data(li,"ddcombo_data",data[i]);}
listItems=list.find("li");
if(options.selectFirst){
listItems.slice(0,1).addClass(CLASSES.ACTIVE);
active=0;}
list.bgiframe();}
return{
display:function(d,q,isAutoCompleteButton){
init();
data=d;
term=q;
fillList(isAutoCompleteButton);},
next:function(){
moveSelect(1);},
prev:function(){
moveSelect(-1);},
pageUp:function(){
if(active!=0&&active-8<0){
moveSelect(-active);}else{
moveSelect(-8);}},
pageDown:function(){
if(active!=listItems.size()-1&&active+8>listItems.size()){
moveSelect(listItems.size()-1-active);}else{
moveSelect(8);}},
hide:function(){
element&&element.hide();
active=-1;},
visible:function(){
return element&&element.is(":visible");},
current:function(){
return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},
show:function(){
var offset=$(input).offset();
if(options.button==true){
element.css({
width:typeof options.width=="string"||options.width>0?options.width+18:$(input).width()+18,
top:offset.top+input.offsetHeight+options.offsetTop,
left:(offset.left+options.offsetLeft)}).show();}else{
element.css({
width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),
top:offset.top+input.offsetHeight+options.offsetTop,
left:(offset.left+options.offsetLeft)}).show();}
if(options.scroll){
list.scrollTop(0);
list.css({
maxHeight:options.scrollHeight,
overflow:'auto'});
if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){
var listHeight=0;
listItems.each(function(){
listHeight+=this.offsetHeight;});
var scrollbarsVisible=listHeight>options.scrollHeight;
list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);
if(!scrollbarsVisible){
listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},
selected:function(){
var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
return selected&&selected.length&&$.data(selected[0],"ddcombo_data");},
emptyList:function(){
list&&list.empty();},
unbind:function(){
element&&element.remove();}};};
$.DDComboBox.Selection=function(field,start,end){
if(field.createTextRange){
var selRange=field.createTextRange();
selRange.collapse(true);
selRange.moveStart("character",start);
selRange.moveEnd("character",end);
selRange.select();}else if(field.setSelectionRange){
field.setSelectionRange(start,end);}else{
if(field.selectionStart){
field.selectionStart=start;
field.selectionEnd=end;}}
field.focus();};})(jQuery);
var stepOne=function(){
var stepOneComplete=false;
var journeyTypeSelected=false;
var NumberOfSeats=null;
var DepartureDate=null;
var DepartureHours='00';
var DepartureMinutes='00';
var ReturnDate=null;
var ReturnHours='00';
var ReturnMinutes='00';
function _seats(){
return[['1','1'],['2','2'],['3','3'],['4','4'],['5','5'],['6','06'],['7','7'],['8','8'],['9','9'],['10','10'],['11','11'],['12','12'],['13','13'],['14','14'],['15','15'],['16','16'],['17','17'],['18','18'],['19','19'],['20','20'],['21','21'],['22','22'],['23','23']];}
function _hours(){
return[['01','01'],['02','02'],['03','03'],['04','04'],['05','05'],['06','06'],['07','07'],['08','08'],['09','09'],['10','10'],['11','11'],['12','12'],['13','13'],['14','14'],['15','15'],['16','16'],['17','17'],['18','18'],['19','19'],['20','20'],['21','21'],['22','22'],['23','23']];}
function _minutes(){
return[['00','00'],['15','15'],['30','30'],['45','45']];}
function checkRequestedJourney(){
if($("#HiddenRequestedJourneyDepartureDate").val()!=''){
var DepartureDateTime=new Date($("#HiddenRequestedJourneyDepartureDate").val());
$("#DepartureDatePicker_input").val(DepartureDateTime.asString());
var dh=DepartureDateTime.getHours();
if(dh<=9){
dh='0'+dh;}
$("#DepartureHour_input").val(dh);
var dm=DepartureDateTime.getMinutes();
if(dm<=9){
dm='0'+dm;}
$("#DepartureMin_input").val(dm);}
if($("#HiddenRequestedJourneyReturnDate").val()!=''){
var ReturnDateTime=new Date($("#HiddenRequestedJourneyReturnDate").val());
$("#ReturnDatePicker_input").val(ReturnDateTime.asString());
var rh=ReturnDateTime.getHours();
if(rh<=9){
rh='0'+rh;}
$("#ReturnHour_input").val(rh);
var rm=ReturnDateTime.getMinutes();
if(rm<=9){
rm='0'+rm;}
$("#ReturnMin_input").val(rm);}else{
$("#ReturnDatePicker_input").val('');}
if($("#HiddenRequestedJourneyIsPrivate").val()!=''){
if($("#HiddenRequestedJourneyIsPrivate").val()=='True'){
document.form.journeyType[0].checked=true;}else{
document.form.journeyType[1].checked=true;}
stepOne.JourneyType();}
if($("#HiddenRequestedJourneySeats").val()!=''){
$("#Seats_input").val($("#HiddenRequestedJourneySeats").val());}}
function disableSteps(){
document.getElementById('StepOne').className="StepOne";
document.getElementById('StepTwo').className="StepTwo_Disabled";
document.getElementById('StepThree').className="StepThree_Disabled";
document.getElementById('StepFour').className="StepFour_Disabled";
document.getElementById('StepFive').className="StepFive_Disabled";};
function enableStepTwo(){
document.getElementById('StepTwo').className="StepTwo";
document.getElementById('go').style.visibility="visible";};
function disableStepTwo(){
document.getElementById('StepTwo').className="StepTwo_Disabled";
document.getElementById('go').style.visibility="visible";
document.getElementById('go').style.visibility="hidden";};
function initJFlow(){
document.getElementById('main_container').style.display="block";
$("#button_list").jFlow({
slides:"#step_container_slider",
controller:".jFlowControl",
slideWrapper:"#jFlowSlide",
selectedWrapper:"jFlowSelected",
width:"640px",
duration:500,
prev:".jFlowPrev",
next:".jFlowNext"});};
function _getMin(){
var time=new Date()
if(time.getMinutes()<10){
return"0"+time.getMinutes();}else{
return time.getMinutes();}}
function _getHour(){
var time=new Date()
return time.getHours()}
function _createDepartureHour(store){
var languageCombo=$(".DepartureHourHolder").ddcombo(
{
minChars:0,
max:246,
offsetTop:0,
offsetLeft:-1,
name:'DepartureHour',
width:25,
defaultValue:_getHour(),
disabled:true,
validate:"stepOne",
data:store});
$('#DepartureHour_input').keyup(function(){
stepOne.IsStepOneComplete();});};
function _createDepartureMin(store){
var languageCombo=$(".DepartureMinHolder").ddcombo(
{
minChars:0,
max:246,
offsetTop:1,
offsetLeft:-1,
name:'DepartureMin',
width:25,
defaultValue:_getMin(),
disabled:true,
validate:"stepOne",
onChangeFunction:function(value){
stepOne.IsStepOneComplete();},
data:store});
$('#DepartureMin_input').keyup(function(){
stepOne.IsStepOneComplete();});};
function _createNoSeats(store){
var languageCombo=$(".SeatsHolder").ddcombo(
{
minChars:0,
max:120,
offsetTop:1,
offsetLeft:-1,
name:'Seats',
width:25,
defaultValue:'',
validate:"stepOne",
onChangeFunction:function(value){
stepOne.IsSeatValid();
stepOne.IsStepOneComplete();},
data:store});
$("#Seats_input").ddcombo_result(function(event,data,formatted){
NumberOfSeats=data[1];
stepOne.IsSeatValid();
stepOne.IsStepOneComplete();});};
function _createReturnHour(store){
var languageCombo=$(".ReturnHourHolder").ddcombo(
{
minChars:0,
max:120,
offsetTop:1,
offsetLeft:-1,
name:'ReturnHour',
width:25,
defaultValue:_getHour(),
validate:"stepOne",
onChangeFunction:function(value){
stepOne.IsStepOneComplete();},
data:store});
$('#ReturnHour_input').keyup(function(){
stepOne.IsStepOneComplete();});};
function _createReturnMin(store){
var languageCombo=$(".ReturnMinHolder").ddcombo(
{
minChars:0,
max:120,
offsetTop:1,
offsetLeft:-1,
name:'ReturnMin',
width:25,
defaultValue:_getMin(),
validate:"stepOne",
onChangeFunction:function(value){
stepOne.IsStepOneComplete();},
data:store});
$('#ReturnMin_input').keyup(function(){
stepOne.IsStepOneComplete();});};
function _createTooltip(hiddenId,divId){
$('#'+divId).mouseover(function(event){
try{Tip(document.getElementById(hiddenId).value,BALLOON,true,ABOVE,true,CENTERMOUSE,true,OFFSETX,0,PADDING,8);}catch(error){}}).mouseout(function(event){
try{UnTip();}catch(error){}});}
return{
mouseOver:function(mouseOverClass){
if(document.getElementById(mouseOverClass).className!=mouseOverClass.toString()+"_Disabled"){
document.getElementById(mouseOverClass).className=mouseOverClass.toString()+"_Over";}},
mouseOut:function(mouseOutClass){
if(document.getElementById(mouseOutClass).className!=mouseOutClass.toString()+"_Disabled"){
document.getElementById(mouseOutClass).className=mouseOutClass.toString();}},
init:function(){
initJFlow();
settings={
tl:{radius:10},
tr:{radius:10},
bl:{radius:10},
br:{radius:10},
antiAlias:true,
autoPad:false,
validTags:["div"]}
settings2={
tl:{radius:5},
tr:{radius:5},
bl:{radius:5},
br:{radius:5},
antiAlias:true,
autoPad:false,
validTags:["div"]}
var myWizardObject=new curvyCorners(settings,"wizard_container");
var myStepsObject=new curvyCorners(settings,"steps_container");
var myStepContainerObject=new curvyCorners(settings,"step_container");
var myColBorder=new curvyCorners(settings2,"ColBorder");
var myTabs=new curvyCorners(settings2,"tab-contaner");
var myGateway=new curvyCorners(settings2,"connectionToPaymentGateway-holder");
var myJourneys=new curvyCorners(settings2,"accordion-holder");
myWizardObject.applyCornersToAll();
myStepsObject.applyCornersToAll();
myStepContainerObject.applyCornersToAll();
myColBorder.applyCornersToAll();
myTabs.applyCornersToAll();
myGateway.applyCornersToAll();
myJourneys.applyCornersToAll();
magicCombo.CreateDatePicker('ReturnDatePicker');
magicCombo.CreateDatePicker('DepartureDatePicker');
magicCombo.CreateInputBox('EmailAddress',200,false);
magicCombo.CreateInputBox('Password',200,true);
magicCombo.CreateInputBox('FirstNameRegister',200,false);
magicCombo.CreateInputBox('LastNameRegister',200,false);
magicCombo.CreateInputBox('EmailRegister',200,false);
magicCombo.CreateInputBox('PasswordRegister',200,true);
magicCombo.CreateInputBox('PasswordConfirmRegister',200,true);
Date.firstDayOfWeek=7;
Date.format='mm/dd/yyyy';
$('.date-pick').datePicker();
_createNoSeats(_seats());
_createDepartureHour(_hours());
_createDepartureMin(_minutes());
_createReturnHour(_hours());
_createReturnMin(_minutes());
disableSteps();
$(function(){
var dialogOpts={
hide:true,
overlay:{opacity:0.5,background:"black"},
modal:false,
autoOpen:false,
resizable:"disable",
height:200,
width:450,
title:document.getElementById('loginmessage').innerHTML,
draggable:true};
$("#dialogLogin").dialog(dialogOpts);});
$(function(){
var dialogOpts={
hide:true,
overlay:{opacity:0.5,background:"black"},
modal:false,
resizable:"disable",
height:230,
width:450,
autoOpen:false,
draggable:true};
$("#dialogRegister").dialog(dialogOpts);});
$('#StepOne').mouseover(function(event){
stepOne.mouseOver('StepOne');}).mouseout(function(event){
stepOne.mouseOut('StepOne');});
$('#StepTwo').mouseover(function(event){
stepOne.mouseOver('StepTwo');}).mouseout(function(event){
stepOne.mouseOut('StepTwo');});
$('#StepThree').mouseover(function(event){
stepOne.mouseOver('StepThree');}).mouseout(function(event){
stepOne.mouseOut('StepThree');});
$('#StepFour').mouseover(function(event){
stepOne.mouseOver('StepFour');}).mouseout(function(event){
stepOne.mouseOut('StepFour');});
$('#StepFive').mouseover(function(event){
stepOne.mouseOver('StepFive');}).mouseout(function(event){
stepOne.mouseOut('StepFive');}).click(function(event){
if(document.getElementById('StepFive').className!='StepFive_Disabled'){
$(".jFlowControl").eq(3).click();}});
$('#step4back').click(function(event){
if(document.getElementById('StepThree').className!='StepThree_Disabled'){
$(".jFlowControl").eq(2).click();}else{
$(".jFlowControl").eq(1).click();}});
$('#journeyFinderLink').click(function(event){
stepOne.ShowJourneyFinder();});
$('#bookingsLink').click(function(event){
stepOne.ShowBookings();});
$('#requestedJourneysLink').click(function(event){
stepOne.ShowRequestedJourneys();});
$('#registerLink').click(function(event){
securityCheck.NowRegister();});
$('#loginLink').click(function(event){
securityCheck.NowLogin();});
$('#logoutLink').click(function(event){
securityCheck.Logout();});
$('#basketLink').click(function(event){
basket.GoToStep3();});
$('#private').click(function(event){
stepOne.JourneyType();});
$('#shared').click(function(event){
stepOne.JourneyType();});
$('#sharedDoorToDoor').click(function(event){
stepOne.JourneyType();});
$('#currencyCalculator').click(function(event){
currency.ShowCurrency();});
$('#loginNow').click(function(event){
securityCheck.Login();});
$('#registerdialog').click(function(event){
securityCheck.NowRegister();});
$('#forgottonpassword').click(function(event){
securityCheck.ForgottonPassword();});
$('#registerLoginButton').click(function(event){
securityCheck.NowLogin();});
$('#registerNow').click(function(event){
securityCheck.Register();});
_createTooltip('Hidden_originCountries_Tooltip','originCountriesQuestion');
_createTooltip('Hidden_searchOriginLocations_Tooltip','searchOriginLocationsQuesion');
_createTooltip('Hidden_destinationCountries_Tooltip','destinationCountryQuestion');
_createTooltip('Hidden_searchDestinationLocations_Tooltip','destinationLocationQuestion');
_createTooltip('Hidden_Seats_Tooltip','SeatsQuestion');
_createTooltip('Hidden_PrivateJourney_Tooltip','PrivateTabQuestion');
_createTooltip('Hidden_SharedJourney_Tooltip','SharedTabQuestion');
$('#wizzard_container_loading').hide();
checkRequestedJourney();
stepOneComplete=true;},
IsstepOneComplete:function(){
return stepOneComplete;},
IsPageReady:function(){
if(stepOne.IsstepOneComplete()==true&&language.IsLanguageComplete()==true&&geographical.IsGeographicalComplete()==true){
try{
var version="";
version=document.getElementById('HiddenVersion').value;
var resourcehandler="/resourcehandler.ashx?v="+version+"&fileSet=Wizzard_Step_Two_Scripts&type=application/x-javascript"
if(version==""){
$('#container-1').show();
$('#container-1 ul').tabs();
$('#container-1 ul').tabs("disable",1);
$('#container-2 ul').tabs("enable",1);
$('#container-3 ul').tabs("enable",1);
requestJourney.GetDialogTranslations();
stepThree.GetStepThreeTranslations();}else{
$.getScript(resourcehandler,function(){
$(function(){
$('#container-1').show();
$('#container-1 ul').tabs();
$('#container-1 ul').tabs("disable",1);
$('#container-2 ul').tabs("enable",1);
$('#container-3 ul').tabs("enable",1);
requestJourney.GetDialogTranslations();
stepThree.GetStepThreeTranslations();});});}
document.getElementById('steps_container').removeChild(document.getElementById('steps_container_loading'));
document.getElementById('steps_container_holder').style.visibility="visible";
document.getElementById('main_container').style.visibility="visible";
document.getElementById("loading-mask").style.visibility="hidden";
stepOne.IsStepOneComplete();}catch(Error){}}else{
setTimeout("stepOne.IsPageReady()",333);}},
IsStepOneComplete:function(moveToStepTwo){
var seatvaild=stepOne.IsSeatValid();
var geographicalvalid=geographical.IsLocationSelectionComplete();
var departuredate=stepOne.IsDepatureDateVaild();
if(seatvaild&&journeyTypeSelected&&geographicalvalid&&departuredate){
enableStepTwo();}else{
disableStepTwo();}},
JourneyType:function(){
journeyTypeSelected=true;
document.getElementById('JourneyTypesNumber').className="numbersComplete";
try{
$('#container-1 ul').tabs("select",0);
if(document.form.journeyType[0].checked){
$('#container-2 ul').tabs("select",0);
$('#container-3 ul').tabs("select",0);}else{
$('#container-2 ul').tabs("select",1);
$('#container-3 ul').tabs("select",1);}}catch(Error){}
stepOne.IsStepOneComplete();},
IsSeatValid:function(){
var isValid=false;
var temp=Number(document.getElementById('Seats_input').value).toString();
if(temp=='NaN'){
document.getElementById('SeatsNumber').className="numbersError";}else if(temp>0){
isValid=true;
NumberOfSeats=temp;
document.getElementById('SeatsNumber').className="numbersComplete";}
return isValid;},
IsDepatureDateVaild:function(){
var ReturnDateVaild=stepOne.IsReturnDateVaild();
var DepartureDateVaild=false;
DepartureDate=document.getElementById('DepartureDatePicker_input').value;
if(DepartureDate!=''){
if(new Date(DepartureDate)>new Date()){
var ReturnDate=document.getElementById('ReturnDatePicker_input').value;
if(ReturnDate!=''){
if(Date(DepartureDate)>Date(ReturnDate)){
document.getElementById('DepartureDateNumber').className="numbersError";
document.getElementById('ReturnDateNumber').className="numbersError";}
else{
document.getElementById('DepartureDateNumber').className="numbersComplete";
if(ReturnDateVaild){
document.getElementById('ReturnDateNumber').className="numbersComplete";}
DepartureDateVaild=true;}}
else{
document.getElementById('ReturnDateNumber').className="numbers";
document.getElementById('DepartureDateNumber').className="numbersComplete";
DepartureDateVaild=true;}}else{
document.getElementById('DepartureDateNumber').className="numbersError";
DepartureDateVaild=false;}}else{
document.getElementById('DepartureDateNumber').className="numbers";}
var departureHours=Number(stepOne.DepartureHours()).toString();
var departureMins=Number(stepOne.DepartureMinutes()).toString();
if((departureHours=='NaN')||(departureHours>23)||(departureHours<0)||(departureMins=='NaN')||(departureMins>59)||(departureMins<0)){
document.getElementById('DepartureDateNumber').className="numbersError";
DepartureDateVaild=false;}
return DepartureDateVaild;},
IsReturnDateVaild:function(){
var ReturnDateVaild=false;
ReturnDate=document.getElementById('ReturnDatePicker_input').value;
if(ReturnDate!=''){
if(new Date(ReturnDate)>new Date()){
ReturnDateVaild=true;}else{
document.getElementById('ReturnDateNumber').className="numbersError";
DepartureDateVaild=false;}}
var returnHours=Number(stepOne.ReturnHours()).toString();
var returnMins=Number(stepOne.ReturnMinutes()).toString();
if((returnHours=='NaN')||(returnHours>23)||(returnHours<0)||(returnMins=='NaN')||(returnMins>59)||(returnMins<0)){
document.getElementById('ReturnDateNumber').className="numbersError";
ReturnDateVaild=false;}else{
document.getElementById('ReturnDateNumber').className="numbers";}
if(ReturnDateVaild){
document.getElementById('ReturnDateNumber').className="numbersComplete";}
return ReturnDateVaild;},
NumberOfSeats:function(){
var seats=0;
try{
seats=parseInt(document.getElementById('Seats_input').value);}catch(Error){
alert("Seats : "+Error.message);}
return seats;},
DepartureDate:function(){
return DepartureDate;},
DepartureHours:function(){
var departureHours=parseInt($('#DepartureHour_input').val());
if(departureHours!=0&&departureHours<=9){
return departureHours='0'+departureHours;}else{
if($('#DepartureHour_input').val()=='0'){
return $('#DepartureHour_input').val()+'0';}else{
return $('#DepartureHour_input').val();}}},
DepartureMinutes:function(){
var departureMinutes=parseInt($('#DepartureMin_input').val());
if(departureMinutes!=0&&departureMinutes<=9){
return departureMinutes='0'+departureMinutes;}else{
if($('#DepartureMin_input').val()=='0'){
return $('#DepartureMin_input').val()+'0';}else{
return $('#DepartureMin_input').val();}}},
ReturnDate:function(){
return ReturnDate;},
ReturnHours:function(){
var returnHours=parseInt($('#ReturnHour_input').val());
if(returnHours!=0&&returnHours<=9){
return returnHours='0'+returnHours;}else{
if($('#ReturnHour_input').val()=='0'){
return $('#ReturnHour_input').val()+'0';}else{
return $('#ReturnHour_input').val();}}},
ReturnMinutes:function(){
var returnMinutes=parseInt($('#ReturnMin_input').val());
if(returnMinutes!=0&&returnMinutes<=9){
return returnMinutes='0'+returnMinutes;}else{
if($('#ReturnMin_input').val()=='0'){
return $('#ReturnMin_input').val()+'0';}else{
return $('#ReturnMin_input').val();}}},
ShowJourneyFinder:function(){
$('#iframeLoadingHolder').remove();
$('.navigaiton_current').removeClass('navigaiton_current').addClass('navigaiton_title');
$('#journeyFinderLink').toggleClass('navigaiton_current');
$('#step_container_slider').show();
$('iframe#iframeHolder').remove();},
ShowRequestedJourneys:function(){
$('.navigaiton_current').removeClass('navigaiton_current').addClass('navigaiton_title');
$('#requestedJourneysLink').toggleClass('navigaiton_current');
stepOne.AddIFrameControl();
$('iframe#iframeHolder').attr('src','/requestedjourney/requestedjourneys.aspx?language='+language.getLanguage()+'&NoCache='+Date()+'_'+Math.floor(Math.random()*11)).load(function(){
$('iframe#iframeHolder').show();
$('#iframeLoadingHolder').remove();});},
ShowBookings:function(){
$('.navigaiton_current').removeClass('navigaiton_current').addClass('navigaiton_title');
$('#bookingsLink').toggleClass('navigaiton_current');
stepOne.AddIFrameControl();
$('iframe#iframeHolder').attr('src','/booking/bookings.aspx?language='+language.getLanguage()+'&NoCache='+Date()+'_'+Math.floor(Math.random()*11)).load(function(){
$('iframe#iframeHolder').show();
$('#iframeLoadingHolder').remove();});},
ShowBooking:function(transactionId){
stepOne.AddIFrameControl();
var user=parent.securityCheck.GetUser();
$('iframe#iframeHolder').attr('src','/booking/booking.aspx?TransactionId='+transactionId+'&UserId='+user.id+'&language='+language.getLanguage()+'&NoCache='+Date()+'_'+Math.floor(Math.random()*11)).load(function(){
$('iframe#iframeHolder').show();
$('#iframeLoadingHolder').remove();});},
AddIFrameControl:function(){
$('iframe#iframeHolder').remove();
$('#step_container').append('<div id="iframeLoadingHolder" style="height:384px"><div id="iframeLoading" style="margin-left:270px;margin-top:150px;"><div class="table_loading"></div><div class="title">'
+$('#HiddenLoading').val()
+'</div></div></div><IFRAME id="iframeHolder" width="99%" frameborder="0" scrolling="no" height="384px" >');
$('#step_container_slider').hide();
$('iframe#iframeHolder').hide();},
TrackEvent:function(category,action,data){
try{
pageTracker._trackEvent(category,action,data);}catch(Error){}}};}();
function stopRKey(evt){
var evt=(evt)?evt:((event)?event:null);
var node=(evt.target)?evt.target:((evt.srcElement)?evt.srcElement:null);
if((evt.keyCode==13)&&(node.type=="text")){return false;}}
document.onkeypress=stopRKey;
var securityCheck=function(){
var user=null;
var _delagate=null;
var _quickRegister=true;
function validateEmail(email){
var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(reg.test(email)==false){
return false;}
else{
return true;}};
function showLoginHolder(){
document.getElementById('warningLoginHolder').style.height="";
document.getElementById('loginwarning').style.visibility="visible";
document.getElementById('loginwarning').style.backgroundImage="url(/images/small_blue_loading.gif)";};
function showRegisterHolder(){
document.getElementById('warningRegisterHolder').style.height="";
document.getElementById('registerwarning').style.visibility="visible";
document.getElementById('registerwarning').style.backgroundImage="url(/images/small_blue_loading.gif)";};
return{
Init:function(){
if($('#HiddenUserJSON').val()!=''){
securityCheck.onLogin($('#HiddenUserJSON').val());}
$('#EmailAddress_input').keyup(function(){
$('#EmailAddress_input').val(magicCombo.Clean($('#EmailAddress_input').val()));});
$('#FirstNameRegister_input').keyup(function(){
$('#FirstNameRegister_input').val(magicCombo.Clean($('#FirstNameRegister_input').val()));});
$('#LastNameRegister_input').keyup(function(){
$('#LastNameRegister_input').val(magicCombo.Clean($('#LastNameRegister_input').val()));});
$('#EmailRegister_input').keyup(function(){
$('#EmailRegister_input').val(magicCombo.Clean($('#EmailRegister_input').val()));});
$('#EmailRegister_input').keyup(function(){
$('#EmailRegister_input').val(magicCombo.Clean($('#EmailRegister_input').val()));});},
ShowLogin:function(delagate,quickRegister){
$('#loginloading').hide();
_quickRegister=quickRegister==null?true:false;
document.getElementById('loginwarning').style.visibility="hidden";
document.getElementById('loginwarningmessage').style.visibility="hidden";
document.getElementById('warningLoginHolder').style.height="0px";
document.getElementById('warningLoginHolder').style.visibility="hidden";
$("#dialogLogin").dialog("open");
_delagate=delagate;
try{
pageTracker._trackEvent('Wizard','Login','Open');}catch(Error){}},
ShowRegister:function(delagate){
$('#FirstNameRegister_input').val('');
$('#LastNameRegister_input').val('');
$('#EmailRegister_input').val('');
$('#PasswordRegister_input').val('');
$('#PasswordConfirmRegister_input').val('');
$('#registerWarningMessage').html('');
$('#registerloading').hide();
document.getElementById('warningRegisterHolder').style.visibility="hidden";
document.getElementById('warningRegisterHolder').style.height="0px";
document.getElementById('registerwarning').style.visibility="hidden";
var dialogOpts=null;
if(user==null){
if(!_quickRegister){
billingAddress.ShowBillingAddress();
dialogOpts={
height:450,
width:450,
title:$('#registerbuttonmessage').html()};}else{
billingAddress.RemoveBillingAddress();
dialogOpts={
height:300,
width:450,
title:$('#registerbuttonmessage').html()};}
document.getElementById('registerLoginButton').style.visibility="visible";
document.getElementById('registrationHolder').style.visibility="visible";
document.getElementById('registrationHolder').style.display="block";}else{
billingAddress.ShowBillingAddress();
dialogOpts={
height:270,
width:450,
title:$('#registerbuttonmessage').html()};
document.getElementById('registrationHolder').style.visibility="hidden";
document.getElementById('registrationHolder').style.display="none";
document.getElementById('registerLoginButton').style.visibility="hidden";}
$("#dialogRegister").dialog(dialogOpts);
$("#dialogRegister").dialog("open");
_delagate=delagate;
try{
pageTracker._trackEvent('Wizard','Register','Open');}catch(Error){}},
Login:function(){
var email=$('#EmailAddress_input').val();
var password=$('#Password_input').val();
if(email==""&&password==""){
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:'allFields',language:language.getLanguage()},securityCheck.onLogin);
$('#loginloading').show();}else{
if(validateEmail(email)){
$.post("/services/wizzardhandler.ashx",{action:"login",e:email,p:password,language:language.getLanguage()},securityCheck.onLogin);
$('#loginloading').show();}else{
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:'emailNotVaild',language:language.getLanguage()},securityCheck.onLogin);
$('#loginloading').show();}}},
Register:function(){
document.getElementById('warningRegisterHolder').style.height="0px";
document.getElementById('registerwarning').style.visibility="hidden";
$('#registerWarningMessage').html('');
var userFirstName=$('#FirstNameRegister_input').val();
var userLastName=$('#LastNameRegister_input').val();
var email=$('#EmailRegister_input').val();
var password=$('#PasswordRegister_input').val();
var confirm=$('#PasswordConfirmRegister_input').val();
if(userFirstName==""||userLastName==""||email==""||password==""||confirm==""){
if(user!=null){
var addressJSON=billingAddress.VailidateBillingAddress();
if(addressJSON!=null){
if(addressJSON!=""){
addressJSON=serialize(addressJSON);}else{
addressJSON="''";}
$.post("/services/wizzardhandler.ashx",{action:"registeraddress",uid:user.id,language:language.getLanguage(),a:addressJSON},securityCheck.onRegister);
$('#registerloading').show();}}else{
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:'allFields',language:language.getLanguage()},securityCheck.onError);
$('#registerloading').show();}}else{
if(password==confirm){
if(validateEmail(email)){
var addressJSON="''";
if(!_quickRegister){
addressJSON=billingAddress.VailidateBillingAddress();}
if(addressJSON!=null){
if(addressJSON!="''"){
addressJSON=serialize(addressJSON);}
$.post("/services/wizzardhandler.ashx",{action:"register",fn:userFirstName,ln:userLastName,e:email,p:password,language:language.getLanguage(),a:addressJSON},securityCheck.onRegister);
$('#registerloading').show();}}else{
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:'emailNotVaild',language:language.getLanguage()},securityCheck.onError);
$('#registerloading').show();}}else{
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:'passwordsDoNotMatch',language:language.getLanguage()},securityCheck.onError);
$('#registerloading').show();}}},
Logout:function(){
$('#requestedJourneysLink').hide();
$('#bookingsLink').hide();
$('#requestedJourneySeperator').hide();
$('#bookingsSeperator').hide();
$('#logoutLink').hide();
$('#registerLink').show();
$('#loginLink').show();
$('#registerSeperator').show();
$.post("/services/wizzardhandler.ashx",{action:"logout"});
user=null;
_delagate=null;
try{
pageTracker._trackEvent('Wizard','Logout','Clicked');}catch(Error){}},
ForgottonPassword:function(){
var email=$('#EmailAddress_input').val();
if(validateEmail(email)){
$.post("/services/wizzardhandler.ashx",{action:"forgotemail",e:email,language:language.getLanguage()},securityCheck.onLogin);}else{
$.post("/services/wizzardhandler.ashx",{action:"elements",elements:'emailNotVaild',language:language.getLanguage()},securityCheck.onLogin);}
try{
pageTracker._trackEvent('Wizard','Login','Fogotten Password',email);}catch(Error){}},
onError:function(returnData){
try{
var data=json_parse(returnData);
if(data){
if(data[0].pageElementAlias){
document.getElementById('warningRegisterHolder').style.height="";
document.getElementById('warningRegisterHolder').style.visibility="visible";
document.getElementById('registerwarning').style.visibility="visible";
$('#registerWarningMessage').html(data[0].shortDescription);
alert(data[0].shortDescription);
try{
pageTracker._trackEvent('Wizard','Register','Error',data[0].shortDescription);}catch(Error){}}}
$('#registerloading').hide();
$('#loginloading').hide();}catch(Error){
alert(Error.message);
try{
pageTracker._trackEvent('Wizard','Register','Error',Error.message);}catch(Error){}}},
onLogin:function(returnData){
$('#loginloading').hide();
if(returnData!=''){
var data=json_parse(returnData);
if(data){
if(data[0].pageElementAlias){
document.getElementById('loginwarning').style.backgroundImage="url(/images/ecommerce_icons/ecommerce_icons_all.gif)";
document.getElementById('loginwarning').style.backgroundPosition="-241px 0px";
document.getElementById('loginwarning').style.visibility="visible";
$('#loginwarning').show();
document.getElementById('loginwarningmessage').style.visibility="visible";
$('#loginwarningmessage').html(data[0].shortDescription);
alert(data[0].shortDescription);
try{
pageTracker._trackEvent('Wizard','Login','Error',data[0].shortDescription);}catch(Error){}}else if(data[0].id){
user=data[0];
$('#warningLoginHolder').height(0);
$('#loginwarning').hide();
$('#EmailAddress_input').val('');
$('#Password_input').val('');
$('#loginwarningmessage').html('');
$("#dialogLogin").dialog("close");
$('#requestedJourneysLink').show();
$('#bookingsLink').show();
$('#requestedJourneySeperator').show();
$('#bookingsSeperator').show();
securityCheck.LoggedIn();
try{
pageTracker._trackEvent('Wizard','Login','Success',user.id);}catch(Error){}
try{
var tempDelagate=_delagate;
_delagate=null;
eval(tempDelagate);}catch(Error){
alert(Error.message);
try{
pageTracker._trackEvent('Wizard','Login','Error',Error.message);}catch(Error){}
_delagate=null;}}}}else{
document.getElementById('loginwarning').style.visibility="visible";}},
onRegister:function(returnData){
$('#registerloading').hide();
if(returnData!=''){
var data=json_parse(returnData);
if(data){
if(data[0].pageElementAlias){
document.getElementById('loginwarning').style.backgroundImage="url(/images/ecommerce_icons/ecommerce_icons_all.gif)";
document.getElementById('loginwarning').style.backgroundPosition="-241px 0px";
document.getElementById('registerwarning').style.visibility="visible";
document.getElementById('registerWarningMessage').style.visibility="visible";
document.getElementById('registerWarningMessage').innerHTML=data[0].shortDescription;
alert(data[0].shortDescription);
try{
pageTracker._trackEvent('Wizard','Register','Error',data[0].shortDescription);}catch(Error){}}else if(data[0].id){
user=data[0];
document.getElementById('warningRegisterHolder').style.height="0px";
document.getElementById('registerwarning').style.visibility="hidden";
$('#FirstNameRegister_input').val('');
$('#LastNameRegister_input').val('');
$('#EmailRegister_input').val('');
$('#PasswordRegister_input').val('');
$('#PasswordConfirmRegister_input').val('');
$('#registerWarningMessage').html('');
$('#requestedJourneysLink').show();
$('#bookingsLink').show();
$('#requestedJourneySeperator').show();
$('#bookingsSeperator').show();
$("#dialogRegister").dialog("close");
securityCheck.LoggedIn();
try{
pageTracker._trackEvent('Wizard','Register','Success',user.id);}catch(Error){}
try{
var tempDelagate=_delagate;
_delagate=null;
eval(tempDelagate);}catch(Error){
alert(Error.message);
try{
pageTracker._trackEvent('Wizard','Register','Error',Error.message);}catch(Error){}
_delagate=null;}}}}else{
document.getElementById('registerwarning').style.visibility="visible";}},
LoggedIn:function(){
$('#registerLink').hide();
$('#loginLink').hide();
$('#registerSeperator').hide();
$('#logoutLink').show();},
NowRegister:function(){
document.getElementById('warningLoginHolder').style.height="0px";
document.getElementById('loginwarning').style.visibility="hidden";
$('#EmailAddress_input').val('');
$('#Password_input').val('');
$('#loginwarningmessage').html('');
$("#dialogLogin").dialog("close");
securityCheck.ShowRegister(_delagate);},
NowLogin:function(){
$("#dialogRegister").dialog("close");
securityCheck.ShowLogin(_delagate);},
GetUser:function(){
return user;}};}();
var geographical=function(){
var journeycountries=null;
var paymentcountries=null;
var comboDestinationCountries;
var comboOriginCountries;
var selectedOriginCountryId=$('#HiddenCountryAId').val()!=''?$('#HiddenCountryAId').val():null;
var selectedOriginLocationId=$('#HiddenLocationAId').val()!=''?$('#HiddenLocationAId').val():null;
var selectedOriginLocation=$('#HiddenLocationAAddress').val()!=''?$('#HiddenLocationAAddress').val():null;
if(selectedOriginLocation!=null){
selectedOriginLocation+=$('#HiddenLocationACity').val()!=''?', '+$('#HiddenLocationACity').val():'';}
var selectedOriginLocationTimezoneId=$('#HiddenLocationATZ').val()!=''?$('#HiddenLocationATZ').val():null;
var focusOriginLocation=false;
var selectedJsonOriginLocation=$('#HiddenLocationAJSON').val()!=''?json_parse($('#HiddenLocationAJSON').val()):null;
var selectedDestinationCountryId=$('#HiddenCountryBId').val()!=''?$('#HiddenCountryBId').val():null;;
var selectedDestinationLocationId=$('#HiddenLocationBId').val()!=''?$('#HiddenLocationBId').val():null;
var selectedDestinationLocation=$('#HiddenLocationBAddress').val()!=''?$('#HiddenLocationBAddress').val():null;
if(selectedDestinationLocation!=null){
selectedDestinationLocation+=$('#HiddenLocationBCity').val()!=''?', '+$('#HiddenLocationBCity').val():'';}
var selectedDestinationLocationTimezoneId=$('#HiddenLocationBTZ').val()!=''?$('#HiddenLocationBTZ').val():null;
var focusDestinationLocation=false;
var selectedJsonDestinationLocation=$('#HiddenLocationBJSON').val()!=''?json_parse($('#HiddenLocationBJSON').val()):null;
var searchOriginLocations;
var searchDestinationLocations;
var geographicalComplete=false;
function returnValue(row){
var returnValue=row.addressLineOne
if(row.addressLineTwo!='')
returnValue+=', '+row.addressLineTwo;
if(row.suburb!=null)
returnValue+=', '+row.suburb;
if(row.city!=null)
returnValue+=', '+row.city;
return returnValue;};
function format(row){
var searchformat=row.addressLineOne
if(row.addressLineTwo!='')
searchformat+=', '+row.addressLineTwo;
if(row.suburb!=null)
searchformat+=', '+row.suburb;
if(row.city!=null)
searchformat+='<br>'+row.city;
if(row.region!=null){
if(row.city!=null)
searchformat+=',';
searchformat+=' '+row.region}
searchformat+='<br>'+row.locationType
return searchformat;}
function _createOriginLocations(){
if(document.getElementById('searchOriginLocationsHolder').childNodes.length>1){
document.getElementById('searchOriginLocationsHolder').removeChild(document.getElementById('searchOriginLocations'));}
if(selectedOriginCountryId!=null){
$(".searchOriginLocationsHolder").autocomplete('/services/ihambadata.ashx?queryType=locations&countryId='+selectedOriginCountryId+'&lang='+language.getLanguage(),{
multiple:false,
minChars:3,
max:246,
width:241,
offsetTop:0,
offsetLeft:-1,
name:'searchOriginLocations',
defaultValue:'',
defaultValue:selectedOriginLocation!=null?selectedOriginLocation:'',
validate:"stepOne",
onChangeFunction:function(value){
selectedOriginLocationId=0;
selectedOriginLocationTimezoneId="";
selectedJsonOriginLocation=null;
stepOne.IsStepOneComplete();},
parse:function(data){
return $.map(json_parse(data),function(row){
return{
data:row,
value:row.value,
result:returnValue(row)}});},
formatItem:function(row){
return format(row);}});
$("#searchOriginLocations_input").ddcombo_result(function(event,data,formatted){
selectedOriginLocationId=data.value;
selectedOriginLocationTimezoneId=data.timezoneId;
selectedJsonOriginLocation=data;
focusOriginLocation=true;
stepOne.IsStepOneComplete();
stepOne.TrackEvent('Wizard','From Location',returnValue(data));});}else{
$(".searchOriginLocationsHolder").autocomplete(null,{
multiple:false,
minChars:3,
max:246,
width:241,
offsetTop:0,
offsetLeft:-1,
name:'searchOriginLocations',
validate:"stepOne",
defaultValue:selectedOriginLocation!=null?selectedOriginLocation:document.getElementById('Hidden_PleaseSelectACountryFirst').value});
document.getElementById('searchOriginLocations_input').disabled="disable";}}
function _createDestinationLocations(){
if(document.getElementById('searchDestinationLocationsHolder').childNodes.length>1){
document.getElementById('searchDestinationLocationsHolder').removeChild(document.getElementById('searchDestinationLocations'));}
if(selectedDestinationCountryId!=null){
$(".searchDestinationLocationsHolder").autocomplete('/services/ihambadata.ashx?queryType=locations&countryId='+selectedDestinationCountryId+'&lang='+language.getLanguage(),{
multiple:false,
minChars:3,
max:246,
width:241,
offsetTop:0,
offsetLeft:-1,
name:'searchDestinationLocations',
defaultValue:'',
defaultValue:selectedDestinationLocation!=null?selectedDestinationLocation:'',
validate:"stepOne",
onChangeFunction:function(value){
selectedDestinationLocationId=0;
selectedDestinationLocationTimezoneId="";
selectedJsonDestinationLocation=null;
stepOne.IsStepOneComplete();},
parse:function(data){
return $.map(json_parse(data),function(row){
return{
data:row,
value:row.value,
result:returnValue(row)}});},
formatItem:function(row){
return format(row);}});
$("#searchDestinationLocations_input").ddcombo_result(function(event,data,formatted){
selectedDestinationLocationId=data.value;
selectedDestinationLocationTimezoneId=data.timezoneId
selectedJsonDestinationLocation=data;
focusDestinationLocation=true;
stepOne.IsStepOneComplete();
stepOne.TrackEvent('Wizard','To Location',returnValue(data));});}else{
$(".searchDestinationLocationsHolder").autocomplete(null,{
multiple:false,
minChars:3,
max:246,
width:241,
offsetTop:0,
offsetLeft:-1,
name:'searchDestinationLocations',
validate:"stepOne",
defaultValue:selectedDestinationLocation!=null?selectedDestinationLocation:document.getElementById('Hidden_PleaseSelectACountryFirst').value});
document.getElementById('searchDestinationLocations_input').disabled="disable";}};
function _createDestinationCountries(store){
var countryName=document.getElementById('Hidden_destinationCountries').value;
for(var i=0,ol=store.length;i<ol;i++){
var rawValue=store[i];
if(rawValue[1]==selectedDestinationCountryId){
countryName=rawValue[0];
break;}}
var languageCombo=$(".destinationCountriesHolder").ddcombo(
{
minChars:0,
max:246,
offsetTop:0,
offsetLeft:-1,
name:'destinationCountries',
width:241,
defaultValue:countryName,
validate:"stepOne",
showAutocompleteOnInit:true,
data:store});
$("#destinationCountries_input").ddcombo_result(function(event,data,formatted){
selectedDestinationCountryId=data[1];
_createDestinationLocations();
stepOne.IsStepOneComplete();});};
function _createOriginCountries(store){
var countryName=document.getElementById('Hidden_originCountries').value;
for(var i=0,ol=store.length;i<ol;i++){
var rawValue=store[i];
if(rawValue[1]==selectedOriginCountryId){
countryName=rawValue[0];
break;}}
var languageCombo=$(".originCountriesHolder").ddcombo(
{
minChars:0,
max:246,
offsetTop:0,
offsetLeft:-1,
name:'originCountries',
width:241,
defaultValue:countryName,
validate:"stepOne",
showAutocompleteOnInit:true,
data:store});
$("#originCountries_input").ddcombo_result(function(event,data,formatted){
selectedOriginCountryId=data[1];
_createOriginLocations();
stepOne.IsStepOneComplete();});};
return{
initGeographical:function(){
$.get("/services/wizzardhandler.ashx",{action:"journeycountries",language:language.getLanguage()},geographical.onJourneyCountriesReturn);
return(true);},
onJourneyCountriesReturn:function(result){
journeycountries=eval(result);
_createDestinationCountries(journeycountries);
_createOriginCountries(journeycountries);
_createOriginLocations();
_createDestinationLocations();
geographicalComplete=true;
$.get("/services/wizzardhandler.ashx",{action:"paymentcountries",language:language.getLanguage()},geographical.onPaymentCountriesReturn);},
onPaymentCountriesReturn:function(result){
paymentcountries=eval(result);},
IsGeographicalComplete:function(){
return geographicalComplete;},
IsLocationSelectionComplete:function(){
var Origin=false;
var Destination=false;
if(selectedOriginCountryId!=null){
document.getElementById('originCountriesHolderNumber').className="numbersComplete";
if(selectedOriginLocationId!=null||
(document.getElementById('searchOriginLocations_input').value.length>3&&$.trim($('#searchOriginLocations_input').val())!=$.trim($('#Hidden_searchOriginLocations').val()))){
document.getElementById('searchOriginLocationsHolderNumber').className="numbersComplete";
Origin=true;}else{
document.getElementById('searchOriginLocationsHolderNumber').className="numbers";
Origin=false;}}else{
document.getElementById('originCountriesHolderNumber').className="numbers";}
if(selectedDestinationCountryId!=null){
document.getElementById('destinationCountriesHolderNumber').className="numbersComplete";
if(selectedDestinationLocationId!=null||(document.getElementById('searchDestinationLocations_input').value.length>3&&$.trim($('#searchDestinationLocations_input').val())!=$.trim($('#Hidden_searchDestinationLocations').val()))){
document.getElementById('searchDestinationLocationsHolderNumber').className="numbersComplete";
if(Origin&&($.trim($('#searchDestinationLocations_input').val())!=$.trim($('#searchOriginLocations_input').val()))){
Destination=true;}
else{
document.getElementById('searchDestinationLocationsHolderNumber').className="numbersError";
document.getElementById('searchOriginLocationsHolderNumber').className="numbersError";}}else{
document.getElementById('searchDestinationLocationsHolderNumber').className="numbers";
Destination=false;}}else{
document.getElementById('destinationCountriesHolderNumber').className="numbers";}
if(Origin&&Destination){
return true;}else{
return false;}},
GetSelectedOriginLocationId:function(){
return parseInt(selectedOriginLocationId);},
GetSelectedOriginLocationTimezoneId:function(){
return selectedOriginLocationTimezoneId;},
GetSelectedDestinationLocationId:function(){
return parseInt(selectedDestinationLocationId);},
GetSelectedDestinationLocationTimezoneId:function(){
return selectedDestinationLocationTimezoneId;},
SetOriginCoutry:function(countryId){
selectedOriginCountryId=countryId;
_createOriginCountries(journeycountries);},
SetDestinationCoutry:function(countryId){
selectedDestinationCountryId=countryId;
_createDestinationCountries(journeycountries);},
SetSelectedOriginLocation:function(locationId,Address,timezoneId){
selectedOriginLocationId=locationId;
selectedOriginLocation=Address;
selectedOriginLocationTimezoneId=timezoneId;
_createOriginLocations();},
SetSelectedDestinationLocation:function(locationId,Address,timezoneId){
selectedDestinationLocationId=locationId;
selectedDestinationLocation=Address;
selectedDestinationLocationTimezoneId=timezoneId;
_createDestinationLocations();},
SetSelectedOriginLocationId:function(value){
selectedOriginLocationId=value;},
SetSelectedDestinationLocationId:function(value){
selectedDestinationLocationId=value;},
SetFocusOriginLocation:function(value){
focusOriginLocation=value;},
GetFocusOriginLocation:function(){
return focusOriginLocation;},
SetFocusDestinationLocation:function(value){
focusDestinationLocation=value;},
GetFocusDestinationLocation:function(){
return focusDestinationLocation;},
GetJourneyCountries:function(){
return journeycountries;},
GetPaymentCountries:function(){
return paymentcountries;},
GetSelectedDestinationCountryId:function(){
return parseInt(selectedDestinationCountryId);},
GetSelectedOriginCountryId:function(){
return parseInt(selectedOriginCountryId);},
GetSelectedJsonDestinationLocation:function(){
return selectedJsonDestinationLocation;},
GetSelectedJsonOriginLocation:function(){
return selectedJsonOriginLocation;}};}();
var language=function(){
var currentlanguageISO2=$('#HiddenBrowserLanguage').val();
var currentLangugeName;
var comboLanguages;
var languageComplete=false;
function _createLanguages(store){
for(var i=0,ol=store.length;i<ol;i++){
var rawValue=store[i];
if(rawValue[1]==currentlanguageISO2){
currentLangugeName=rawValue[0];
break;}}
var languageCombo=$(".searchLanguagesHolder").ddcombo(
{
minChars:0,
max:246,
width:175,
offsetTop:0,
offsetLeft:-1,
button:true,
name:'searchLanguages',
defaultValue:currentLangugeName,
showAutocompleteOnInit:true,
data:store});
$("#searchLanguages_input").ddcombo_result(function(event,data,formatted){
currentlanguageISO2=data[1];
currentLangugeName=data[0];
_getPageElements();
var sitemap=new Array();
sitemap=$("#sitemap").attr("href").split('/');
sitemap[sitemap.length-1]=currentlanguageISO2;
$("#sitemap").attr("href",sitemap.join('/'));
var termsandconditions=new Array();
termsandconditions=$("#termsandconditions").attr("href").split('/');
termsandconditions[termsandconditions.length-1]=currentlanguageISO2;
$("#termsandconditions").attr("href",termsandconditions.join('/'));});};
function _requiredPageElements(){
return pageElementAlias=$('#HiddenPageElementAlias').val();};
function _getPageElements(){
$.get("/services/wizzardhandler.ashx",{action:"elements",elements:_requiredPageElements(),language:currentlanguageISO2},language.onPageElementsReturn);};
function _setPageElements(pageElements){
if(pageElements!=''&&pageElements!=null){
var data=json_parse(pageElements);
if(data){
for(i=0;i<data.length;i++){
try{
switch(data[i].pageElementAlias){
case"StepOneTitle":
$('#StepOneTitle').html(data[i].shortDescription);
break;
case"StepTwoTitle":
$('#StepTwoTitle').html(data[i].shortDescription);
break;
case"StepThreeTitle":
$('#StepThreeTitle').html(data[i].shortDescription);
break;
case"StepFourTitle":
$('#StepFourTitle').html(data[i].shortDescription);
$('#HiddenFieldStepFourTitle').val(data[i].shortDescription);
break;
case"StepOneStapLine":
$('#StepOneStapLine').html(data[i].shortDescription);
break;
case"StepOneColOneTitle":
$('#StepOneColOneTitle').html(data[i].shortDescription);
break;
case"StepOneColTwoTitle":
$('#StepOneColTwoTitle').html(data[i].shortDescription);
break;
case"StepOneColOneLiveSearch":
$('#StepOneColOneLiveSearch').html(data[i].shortDescription);
break;
case"StepOneColTwoLiveSearch":
$('#StepOneColTwoLiveSearch').html(data[i].shortDescription);
break;
case"AddYourTravelDetails":
$('#AddYourTravelDetails').html(data[i].shortDescription);
break;
case"Seats":
$('#Seats').html(data[i].shortDescription);
$('#Hidden_Seats_Tooltip').val(data[i].longDescription);
break;
case"Departure":
$('#DepartureDate').html(data[i].shortDescription);
$('#HiddenDeparture').val(data[i].shortDescription);
break;
case"Return":
$('#ReturnDate').html(data[i].shortDescription);
$('#HiddenReturn').val(data[i].shortDescription);
break;
case"Date":
$('#Hidden_Date').val(data[i].shortDescription);
break;
case"SelectYourOriginCountry":
$('#LeavingCountry').html(data[i].shortDescription);
$('#Hidden_originCountries_Tooltip').val(data[i].longDescription);
break;
case"SelectYourDestinationCountry":
$('#GoingCountry').html(data[i].shortDescription);
$('#Hidden_destinationCountries_Tooltip').val(data[i].longDescription);
break;
case"TypeYourOriginLocationHere":
$('#Hidden_searchDestinationLocations').val(data[i].shortDescription);
$('#Hidden_searchDestinationLocations_Tooltip').val(data[i].longDescription);
break;
case"TypeYourDestinationLocationHere":
$('#Hidden_searchOriginLocations').val(data[i].shortDescription);
$('#Hidden_searchOriginLocations_Tooltip').val(data[i].longDescription);
break;
case"PleaseSelectACountryFirst":
$('#Hidden_PleaseSelectACountryFirst').val(data[i].shortDescription);
break;
case"Date":
$('#Hidden_Date').val(data[i].shortDescription);
break;
case"Hours":
$('#Hidden_DepartureHour_Tooltip').val(data[i].shortDescription);
$('#Hidden_ReturnHour_Tooltip').val(data[i].shortDescription);
break;
case"Minutes":
$('#Hidden_DepartureMin_Tooltip').val(data[i].shortDescription);
$('#Hidden_ReturnMin_Tooltip').val(data[i].shortDescription);
break;
case"PrivateJourney":
$('#privateTab').html(data[i].shortDescription);
$('#privateJourney').html(data[i].shortDescription);
$('#Hidden_PrivateJourney_Tooltip').val(data[i].longDescription);
break;
case"SharedJourney":
$('#Hidden_SharedJourney_Tooltip').val(data[i].longDescription);
break;
case"SharedTimetabled":
$('#sharedJourney').html(data[i].shortDescription);
$('#sharedTab').html(data[i].shortDescription);
break;
case"SharedJourneyDoorToDoor":
$('#sharedJourneyDoorToDoor').html(data[i].shortDescription);
break;
case"Email":
$('#emailAddressRegister').html(data[i].shortDescription+" :");
$('#emailAddress').html(data[i].shortDescription+" :");
break;
case"Password":
$('#password').html(data[i].shortDescription+" :");
$('#passwordRegister').html(data[i].shortDescription+" :");
break;
case"Register":
$('#registerdialog').html(data[i].shortDescription);
$('#registerLink').html(data[i].shortDescription);
document.getElementById('dialogRegister').title(data[i].shortDescription);
$('#registerbuttonmessage').html(data[i].shortDescription);
break;
case"forgotpassword":
$('#forgottonpassword').html(data[i].shortDescription);
break;
case"Name":
$('#nameRegister').html(data[i].shortDescription+" :");
break;
case"ConfirmPassword":
$('#passwordRegisterConfirm').html(data[i].shortDescription+" :");
break;
case"Logout":
$('#logoutLink').html(data[i].shortDescription);
break;
case"Login":
$('#loginLink').html(data[i].shortDescription);
$('#dialogLogin').title(data[i].shortDescription);
$('#loginmessage').html(data[i].shortDescription);
$('#registerLoginButton').html(data[i].shortDescription);
break;
case"CurrencyCalculator":
$('#currencyCalculator').html(data[i].shortDescription);
break;
case"MyBasket":
$('#MyBasket').html(data[i].shortDescription+" :");
$('#basketLink').html(data[i].shortDescription);
break;
case"SelectYourJourney":
$('#title_step_strapline').html(data[i].shortDescription);
break;
case"BillingAddressTitle":
$('#billingAddressTitleShort').html(data[i].shortDescription);
break;
case"Country":
$('#dialogBillingCountryShort').html(data[i].shortDescription+" :");
break;
case"TownCity":
$('#dialogBillingCityShort').html(data[i].shortDescription+" :");
break;
case"Address":
$('#dialogBillingAddressShort').html(data[i].shortDescription+" :");
break;
case"Enter":
$('#HiddenEnter').val(data[i].shortDescription);
break;
case"Postcode":
$('#dialogBillingPostcodeShort').html(data[i].shortDescription+" :");
break;
case"Payment":
$('#StepFourStrapLine').html(data[i].shortDescription);
$('#HiddenFieldStepFourStrapLine').val(data[i].shortDescription);
break;
case"ConnectingToMoneybookers":
$('#ConnectingToMoneybookers').html(data[i].shortDescription);
break;
case"YourPersonalDetails":
$('#YourPersonalDetails').html(data[i].shortDescription);
break;
case"JourneyFinder":
$('#journeyFinderLink').html(data[i].shortDescription);
break;
case"MyRequestedJourneys":
$('#requestedJourneysLink').html(data[i].shortDescription);
break;
case"MyBookings":
$('#bookingsLink').html(data[i].shortDescription);
break;}}catch(Error){}}}}};
return{
initlanguages:function(){
$.get("/services/wizzardhandler.ashx",{action:"languages"},language.onlanguageReturn);
try{
if(languageComplete){
requestJourney.GetDialogTranslations();
stepThree.GetStepThreeTranslations();}}catch(Error){}
return(true);},
onlanguageReturn:function(result){
var languages=eval(result);
_createLanguages(languages);
languageComplete=true;},
getLanguage:function(){
return currentlanguageISO2;},
onPageElementsReturn:function(pageElements){
_setPageElements(pageElements);},
getPageElements:function(){
_getPageElements();},
IsLanguageComplete:function(){
return languageComplete;}};}();;jQuery.preloadCssImages=function(settings){
settings=jQuery.extend({
statusTextEl:null,
statusBarEl:null,
errorDelay:999,
simultaneousCacheLoading:2},settings);
var allImgs=[],
loaded=0,
imgUrls=[],
thisSheetRules,
errorTimer;
function onImgComplete(){
clearTimeout(errorTimer);
if(imgUrls&&imgUrls.length&&imgUrls[loaded]){
loaded++;
if(settings.statusTextEl){
var nowloading=(imgUrls[loaded])?'Now Loading: <span>'+imgUrls[loaded].split('/')[imgUrls[loaded].split('/').length-1]:'Loading complete';
jQuery(settings.statusTextEl).html('<span class="numLoaded">'+loaded+'</span> of <span class="numTotal">'+imgUrls.length+'</span> loaded (<span class="percentLoaded">'+(loaded/imgUrls.length*100).toFixed(0)+'%</span>) <span class="currentImg">'+nowloading+'</span></span>');}
if(settings.statusBarEl){
var barWidth=jQuery(settings.statusBarEl).width();
jQuery(settings.statusBarEl).css('background-position',-(barWidth-(barWidth*loaded/imgUrls.length).toFixed(0))+'px 50%');}
loadImgs();}}
function loadImgs(){
if(imgUrls&&imgUrls.length&&imgUrls[loaded]){
var img=new Image();
img.src=imgUrls[loaded];
if(!img.complete){
jQuery(img).bind('error load onreadystatechange',onImgComplete);}else{
onImgComplete();}
errorTimer=setTimeout(onImgComplete,settings.errorDelay);}}
function parseCSS(sheets,urls){
var w3cImport=false,
imported=[],
importedSrc=[],
baseURL;
var sheetIndex=sheets.length;
while(sheetIndex--){
var cssPile='';
if(urls&&urls[sheetIndex]){
baseURL=urls[sheetIndex];}else{
var csshref=(sheets[sheetIndex].href)?sheets[sheetIndex].href:'window.location.href';
var baseURLarr=csshref.split('/');
baseURLarr.pop();
baseURL=baseURLarr.join('/');
if(baseURL){
baseURL+='/';}}
if(sheets[sheetIndex].cssRules||sheets[sheetIndex].rules){
thisSheetRules=(sheets[sheetIndex].cssRules)?
sheets[sheetIndex].cssRules:
sheets[sheetIndex].rules;
var ruleIndex=thisSheetRules.length;
while(ruleIndex--){
if(thisSheetRules[ruleIndex].style&&thisSheetRules[ruleIndex].style.cssText){
var text=thisSheetRules[ruleIndex].style.cssText;
if(text.toLowerCase().indexOf('url')!=-1){
cssPile+=text;}}else if(thisSheetRules[ruleIndex].styleSheet){
imported.push(thisSheetRules[ruleIndex].styleSheet);
w3cImport=true;}}}
var tmpImage=cssPile.match(/[^\("]+\.(gif|jpg|jpeg|png)/g);
if(tmpImage){
var i=tmpImage.length;
while(i--){
var imgSrc=(tmpImage[i].charAt(0)=='/'||tmpImage[i].match('://'))?
tmpImage[i]:
baseURL+tmpImage[i];
if(jQuery.inArray(imgSrc,imgUrls)==-1){
imgUrls.push(imgSrc);}}}
if(!w3cImport&&sheets[sheetIndex].imports&&sheets[sheetIndex].imports.length){
for(var iImport=0,importLen=sheets[sheetIndex].imports.length;iImport<importLen;iImport++){
var iHref=sheets[sheetIndex].imports[iImport].href;
iHref=iHref.split('/');
iHref.pop();
iHref=iHref.join('/');
if(iHref){
iHref+='/';}
var iSrc=(iHref.charAt(0)=='/'||iHref.match('://'))?
iHref:
baseURL+iHref;
importedSrc.push(iSrc);
imported.push(sheets[sheetIndex].imports[iImport]);}}}
if(imported.length){
parseCSS(imported,importedSrc);
return false;}
var downloads=settings.simultaneousCacheLoading;
while(downloads--){
setTimeout(loadImgs,downloads);}}
parseCSS(document.styleSheets);
return imgUrls;};