muruca_widgets 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +12 -0
- data/generators/colorbox/colorbox_generator.rb +21 -0
- data/generators/colorbox/templates/README +10 -0
- data/generators/colorbox/templates/_colorbox.html.erb +10 -0
- data/generators/colorbox/templates/colorbox/colorbox.css +62 -0
- data/generators/colorbox/templates/colorbox/images/border.png +0 -0
- data/generators/colorbox/templates/colorbox/images/controls.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderBottomCenter.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderBottomLeft.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderBottomRight.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderMiddleLeft.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderMiddleRight.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderTopCenter.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderTopLeft.png +0 -0
- data/generators/colorbox/templates/colorbox/images/internet_explorer/borderTopRight.png +0 -0
- data/generators/colorbox/templates/colorbox/images/loading.gif +0 -0
- data/generators/colorbox/templates/colorbox/images/loading_background.png +0 -0
- data/generators/colorbox/templates/colorbox/images/overlay.png +0 -0
- data/generators/colorbox/templates/jquery-1.3.2.min.js +19 -0
- data/generators/colorbox/templates/jquery.colorbox.js +698 -0
- data/generators/generator_helpers.rb +17 -0
- data/generators/iip_viewer/iip_viewer_generator.rb +18 -0
- data/generators/iip_viewer/templates/README +8 -0
- data/generators/iip_viewer/templates/_iip_flash_viewer.html.erb +14 -0
- data/generators/iip_viewer/templates/fliipish.swf +0 -0
- data/generators/iip_viewer/templates/iip_flashclient.js +24 -0
- data/generators/iip_viewer/templates/iip_helper.rb +24 -0
- data/generators/iip_viewer/templates/swfobject.js +8 -0
- data/generators/ipod_dropdown/ipod_dropdown_generator.rb +24 -0
- data/generators/ipod_dropdown/templates/README +8 -0
- data/generators/ipod_dropdown/templates/_ipod_dropdown.html.erb +25 -0
- data/generators/ipod_dropdown/templates/fg.menu.js +645 -0
- data/generators/ipod_dropdown/templates/ipod-menu/fg.menu.css +129 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_217bc0_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_2e83ff_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_469bdd_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_6da8d5_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/images/ui-icons_f9bd01_256x240.png +0 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.accordion.css +9 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.all.css +2 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.base.css +1 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.core.css +37 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.datepicker.css +62 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.dialog.css +13 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.progressbar.css +4 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.resizable.css +13 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.slider.css +17 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.tabs.css +11 -0
- data/generators/ipod_dropdown/templates/ipod-menu/theme/ui.theme.css +247 -0
- data/generators/ipod_dropdown/templates/ipod_dropdown_helper.rb +52 -0
- data/generators/ipod_dropdown/templates/jquery-1.3.2.min.js +19 -0
- data/generators/simile_timeline/simile_timeline_generator.rb +24 -0
- data/generators/simile_timeline/templates/README +8 -0
- data/generators/simile_timeline/templates/_timeline.html.erb +7 -0
- data/generators/simile_timeline/templates/_timeline_include.html.erb +6 -0
- data/generators/simile_timeline/templates/timeline.js +82 -0
- data/generators/simile_timeline/templates/timeline_ajax/content/history.html +7 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-arrow-point-down.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-arrow-point-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-arrow-point-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-arrow-point-up.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-bottom-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-bottom-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-bottom.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-top-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-top-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/bubble-top.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/close-button.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/copy.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-bottom-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-bottom-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-top-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/images/message-top-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_ajax/scripts/signal.js +43 -0
- data/generators/simile_timeline/templates/timeline_ajax/simile-ajax-api.js +212 -0
- data/generators/simile_timeline/templates/timeline_ajax/simile-ajax-bundle.js +2623 -0
- data/generators/simile_timeline/templates/timeline_ajax/styles/graphics-ie6.css +77 -0
- data/generators/simile_timeline/templates/timeline_ajax/styles/graphics.css +171 -0
- data/generators/simile_timeline/templates/timeline_helper.rb +36 -0
- data/generators/simile_timeline/templates/timeline_js/images/blue-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-bottom-arrow.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-bottom-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-bottom-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-bottom.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-left-arrow.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-right-arrow.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-top-arrow.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-top-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-top-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/bubble-top.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/close-button.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/copyright-vertical.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/copyright.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dark-blue-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dark-green-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dark-red-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dull-blue-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dull-green-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/dull-red-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/gray-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/green-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-bottom-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-bottom-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-top-left.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/message-top-right.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/progress-running.gif +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/red-circle.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/images/top-bubble.png +0 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/cs/labellers.js +30 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/cs/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/de/labellers.js +27 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/de/timeline.js +8 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/en/labellers.js +12 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/en/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/es/labellers.js +8 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/es/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/fr/labellers.js +8 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/fr/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/it/labellers.js +8 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/it/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/nl/labellers.js +11 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/nl/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/ru/labellers.js +10 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/ru/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/se/labellers.js +12 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/se/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/tr/labellers.js +8 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/tr/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/vi/labellers.js +26 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/vi/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/zh/labellers.js +27 -0
- data/generators/simile_timeline/templates/timeline_js/scripts/l10n/zh/timeline.js +9 -0
- data/generators/simile_timeline/templates/timeline_js/timeline-api.js +280 -0
- data/generators/simile_timeline/templates/timeline_js/timeline-bundle.css +229 -0
- data/generators/simile_timeline/templates/timeline_js/timeline-bundle.js +2835 -0
- data/lib/muruca_widgets.rb +1 -0
- data/lib/timeline.rb +63 -0
- data/lib/timeline_source.rb +211 -0
- data/test/muruca_widgets_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- metadata +213 -0
@@ -0,0 +1,2623 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
/* jquery-1.2.6.min.js */
|
4
|
+
(function(){var _jQuery=window.jQuery,_$=window.$;
|
5
|
+
var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);
|
6
|
+
};
|
7
|
+
var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;
|
8
|
+
jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;
|
9
|
+
if(selector.nodeType){this[0]=selector;
|
10
|
+
this.length=1;
|
11
|
+
return this;
|
12
|
+
}if(typeof selector=="string"){var match=quickExpr.exec(selector);
|
13
|
+
if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);
|
14
|
+
}else{var elem=document.getElementById(match[3]);
|
15
|
+
if(elem){if(elem.id!=match[3]){return jQuery().find(selector);
|
16
|
+
}return jQuery(elem);
|
17
|
+
}selector=[];
|
18
|
+
}}else{return jQuery(context).find(selector);
|
19
|
+
}}else{if(jQuery.isFunction(selector)){return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);
|
20
|
+
}}return this.setArray(jQuery.makeArray(selector));
|
21
|
+
},jquery:"1.2.6",size:function(){return this.length;
|
22
|
+
},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];
|
23
|
+
},pushStack:function(elems){var ret=jQuery(elems);
|
24
|
+
ret.prevObject=this;
|
25
|
+
return ret;
|
26
|
+
},setArray:function(elems){this.length=0;
|
27
|
+
Array.prototype.push.apply(this,elems);
|
28
|
+
return this;
|
29
|
+
},each:function(callback,args){return jQuery.each(this,callback,args);
|
30
|
+
},index:function(elem){var ret=-1;
|
31
|
+
return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);
|
32
|
+
},attr:function(name,value,type){var options=name;
|
33
|
+
if(name.constructor==String){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name);
|
34
|
+
}else{options={};
|
35
|
+
options[name]=value;
|
36
|
+
}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));
|
37
|
+
}});
|
38
|
+
},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined;
|
39
|
+
}return this.attr(key,value,"curCSS");
|
40
|
+
},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));
|
41
|
+
}var ret="";
|
42
|
+
jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);
|
43
|
+
}});
|
44
|
+
});
|
45
|
+
return ret;
|
46
|
+
},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;
|
47
|
+
while(elem.firstChild){elem=elem.firstChild;
|
48
|
+
}return elem;
|
49
|
+
}).append(this);
|
50
|
+
}return this;
|
51
|
+
},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);
|
52
|
+
});
|
53
|
+
},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);
|
54
|
+
});
|
55
|
+
},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem);
|
56
|
+
}});
|
57
|
+
},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild);
|
58
|
+
}});
|
59
|
+
},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);
|
60
|
+
});
|
61
|
+
},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);
|
62
|
+
});
|
63
|
+
},end:function(){return this.prevObject||jQuery([]);
|
64
|
+
},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);
|
65
|
+
});
|
66
|
+
return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);
|
67
|
+
},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");
|
68
|
+
container.appendChild(clone);
|
69
|
+
return jQuery.clean([container.innerHTML])[0];
|
70
|
+
}else{return this.cloneNode(true);
|
71
|
+
}});
|
72
|
+
var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null;
|
73
|
+
}});
|
74
|
+
if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return ;
|
75
|
+
}var events=jQuery.data(this,"events");
|
76
|
+
for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);
|
77
|
+
}}});
|
78
|
+
}return ret;
|
79
|
+
},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);
|
80
|
+
})||jQuery.multiFilter(selector,this));
|
81
|
+
},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true));
|
82
|
+
}else{selector=jQuery.multiFilter(selector,this);
|
83
|
+
}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;
|
84
|
+
return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;
|
85
|
+
});
|
86
|
+
},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=="string"?jQuery(selector):jQuery.makeArray(selector))));
|
87
|
+
},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0;
|
88
|
+
},hasClass:function(selector){return this.is("."+selector);
|
89
|
+
},val:function(value){if(value==undefined){if(this.length){var elem=this[0];
|
90
|
+
if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";
|
91
|
+
if(index<0){return null;
|
92
|
+
}for(var i=one?index:0,max=one?index+1:options.length;
|
93
|
+
i<max;
|
94
|
+
i++){var option=options[i];
|
95
|
+
if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;
|
96
|
+
if(one){return value;
|
97
|
+
}values.push(value);
|
98
|
+
}}return values;
|
99
|
+
}else{return(this[0].value||"").replace(/\r/g,"");
|
100
|
+
}}return undefined;
|
101
|
+
}if(value.constructor==Number){value+="";
|
102
|
+
}return this.each(function(){if(this.nodeType!=1){return ;
|
103
|
+
}if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);
|
104
|
+
}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);
|
105
|
+
jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);
|
106
|
+
});
|
107
|
+
if(!values.length){this.selectedIndex=-1;
|
108
|
+
}}else{this.value=value;
|
109
|
+
}}});
|
110
|
+
},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);
|
111
|
+
},replaceWith:function(value){return this.after(value).remove();
|
112
|
+
},eq:function(i){return this.slice(i,i+1);
|
113
|
+
},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));
|
114
|
+
},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);
|
115
|
+
}));
|
116
|
+
},andSelf:function(){return this.add(this.prevObject);
|
117
|
+
},data:function(key,value){var parts=key.split(".");
|
118
|
+
parts[1]=parts[1]?"."+parts[1]:"";
|
119
|
+
if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);
|
120
|
+
if(data===undefined&&this.length){data=jQuery.data(this[0],key);
|
121
|
+
}return data===undefined&&parts[1]?this.data(parts[0]):data;
|
122
|
+
}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);
|
123
|
+
});
|
124
|
+
}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);
|
125
|
+
});
|
126
|
+
},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;
|
127
|
+
return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);
|
128
|
+
if(reverse){elems.reverse();
|
129
|
+
}}var obj=this;
|
130
|
+
if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));
|
131
|
+
}var scripts=jQuery([]);
|
132
|
+
jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;
|
133
|
+
if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);
|
134
|
+
}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove());
|
135
|
+
}callback.call(obj,elem);
|
136
|
+
}});
|
137
|
+
scripts.each(evalScript);
|
138
|
+
});
|
139
|
+
}};
|
140
|
+
jQuery.fn.init.prototype=jQuery.fn;
|
141
|
+
function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});
|
142
|
+
}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");
|
143
|
+
}if(elem.parentNode){elem.parentNode.removeChild(elem);
|
144
|
+
}}function now(){return +new Date;
|
145
|
+
}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;
|
146
|
+
if(target.constructor==Boolean){deep=target;
|
147
|
+
target=arguments[1]||{};
|
148
|
+
i=2;
|
149
|
+
}if(typeof target!="object"&&typeof target!="function"){target={};
|
150
|
+
}if(length==i){target=this;
|
151
|
+
--i;
|
152
|
+
}for(;
|
153
|
+
i<length;
|
154
|
+
i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];
|
155
|
+
if(target===copy){continue;
|
156
|
+
}if(deep&©&&typeof copy=="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);
|
157
|
+
}else{if(copy!==undefined){target[name]=copy;
|
158
|
+
}}}}}return target;
|
159
|
+
};
|
160
|
+
var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};
|
161
|
+
jQuery.extend({noConflict:function(deep){window.$=_$;
|
162
|
+
if(deep){window.jQuery=_jQuery;
|
163
|
+
}return jQuery;
|
164
|
+
},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");
|
165
|
+
},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;
|
166
|
+
},globalEval:function(data){data=jQuery.trim(data);
|
167
|
+
if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");
|
168
|
+
script.type="text/javascript";
|
169
|
+
if(jQuery.browser.msie){script.text=data;
|
170
|
+
}else{script.appendChild(document.createTextNode(data));
|
171
|
+
}head.insertBefore(script,head.firstChild);
|
172
|
+
head.removeChild(script);
|
173
|
+
}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();
|
174
|
+
},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;
|
175
|
+
var id=elem[expando];
|
176
|
+
if(!id){id=elem[expando]=++uuid;
|
177
|
+
}if(name&&!jQuery.cache[id]){jQuery.cache[id]={};
|
178
|
+
}if(data!==undefined){jQuery.cache[id][name]=data;
|
179
|
+
}return name?jQuery.cache[id][name]:id;
|
180
|
+
},removeData:function(elem,name){elem=elem==window?windowData:elem;
|
181
|
+
var id=elem[expando];
|
182
|
+
if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];
|
183
|
+
name="";
|
184
|
+
for(name in jQuery.cache[id]){break;
|
185
|
+
}if(!name){jQuery.removeData(elem);
|
186
|
+
}}}else{try{delete elem[expando];
|
187
|
+
}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando);
|
188
|
+
}}delete jQuery.cache[id];
|
189
|
+
}},each:function(object,callback,args){var name,i=0,length=object.length;
|
190
|
+
if(args){if(length==undefined){for(name in object){if(callback.apply(object[name],args)===false){break;
|
191
|
+
}}}else{for(;
|
192
|
+
i<length;
|
193
|
+
){if(callback.apply(object[i++],args)===false){break;
|
194
|
+
}}}}else{if(length==undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break;
|
195
|
+
}}}else{for(var value=object[0];
|
196
|
+
i<length&&callback.call(value,i,value)!==false;
|
197
|
+
value=object[++i]){}}}return object;
|
198
|
+
},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i);
|
199
|
+
}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;
|
200
|
+
},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;
|
201
|
+
}});
|
202
|
+
},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);
|
203
|
+
}).join(" "):"";
|
204
|
+
}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;
|
205
|
+
}},swap:function(elem,options,callback){var old={};
|
206
|
+
for(var name in options){old[name]=elem.style[name];
|
207
|
+
elem.style[name]=options[name];
|
208
|
+
}callback.call(elem);
|
209
|
+
for(var name in options){elem.style[name]=old[name];
|
210
|
+
}},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"];
|
211
|
+
function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;
|
212
|
+
var padding=0,border=0;
|
213
|
+
jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;
|
214
|
+
border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;
|
215
|
+
});
|
216
|
+
val-=Math.round(padding+border);
|
217
|
+
}if(jQuery(elem).is(":visible")){getWH();
|
218
|
+
}else{jQuery.swap(elem,props,getWH);
|
219
|
+
}return Math.max(0,val);
|
220
|
+
}return jQuery.curCSS(elem,name,force);
|
221
|
+
},curCSS:function(elem,name,force){var ret,style=elem.style;
|
222
|
+
function color(elem){if(!jQuery.browser.safari){return false;
|
223
|
+
}var ret=defaultView.getComputedStyle(elem,null);
|
224
|
+
return !ret||ret.getPropertyValue("color")=="";
|
225
|
+
}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");
|
226
|
+
return ret==""?"1":ret;
|
227
|
+
}if(jQuery.browser.opera&&name=="display"){var save=style.outline;
|
228
|
+
style.outline="0 solid black";
|
229
|
+
style.outline=save;
|
230
|
+
}if(name.match(/float/i)){name=styleFloat;
|
231
|
+
}if(!force&&style&&style[name]){ret=style[name];
|
232
|
+
}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float";
|
233
|
+
}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();
|
234
|
+
var computedStyle=defaultView.getComputedStyle(elem,null);
|
235
|
+
if(computedStyle&&!color(elem)){ret=computedStyle.getPropertyValue(name);
|
236
|
+
}else{var swap=[],stack=[],a=elem,i=0;
|
237
|
+
for(;
|
238
|
+
a&&color(a);
|
239
|
+
a=a.parentNode){stack.unshift(a);
|
240
|
+
}for(;
|
241
|
+
i<stack.length;
|
242
|
+
i++){if(color(stack[i])){swap[i]=stack[i].style.display;
|
243
|
+
stack[i].style.display="block";
|
244
|
+
}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";
|
245
|
+
for(i=0;
|
246
|
+
i<swap.length;
|
247
|
+
i++){if(swap[i]!=null){stack[i].style.display=swap[i];
|
248
|
+
}}}if(name=="opacity"&&ret==""){ret="1";
|
249
|
+
}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();
|
250
|
+
});
|
251
|
+
ret=elem.currentStyle[name]||elem.currentStyle[camelCase];
|
252
|
+
if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;
|
253
|
+
elem.runtimeStyle.left=elem.currentStyle.left;
|
254
|
+
style.left=ret||0;
|
255
|
+
ret=style.pixelLeft+"px";
|
256
|
+
style.left=left;
|
257
|
+
elem.runtimeStyle.left=rsLeft;
|
258
|
+
}}}}return ret;
|
259
|
+
},clean:function(elems,context){var ret=[];
|
260
|
+
context=context||document;
|
261
|
+
if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;
|
262
|
+
}jQuery.each(elems,function(i,elem){if(!elem){return ;
|
263
|
+
}if(elem.constructor==Number){elem+="";
|
264
|
+
}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+">";
|
265
|
+
});
|
266
|
+
var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");
|
267
|
+
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,"",""];
|
268
|
+
div.innerHTML=wrap[1]+elem+wrap[2];
|
269
|
+
while(wrap[0]--){div=div.lastChild;
|
270
|
+
}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:[];
|
271
|
+
for(var j=tbody.length-1;
|
272
|
+
j>=0;
|
273
|
+
--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);
|
274
|
+
}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);
|
275
|
+
}}elem=jQuery.makeArray(div.childNodes);
|
276
|
+
}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return ;
|
277
|
+
}if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem);
|
278
|
+
}else{ret=jQuery.merge(ret,elem);
|
279
|
+
}});
|
280
|
+
return ret;
|
281
|
+
},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;
|
282
|
+
}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;
|
283
|
+
name=notxml&&jQuery.props[name]||name;
|
284
|
+
if(elem.tagName){var special=/href|src|style/.test(name);
|
285
|
+
if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex;
|
286
|
+
}if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed";
|
287
|
+
}elem[name]=value;
|
288
|
+
}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;
|
289
|
+
}return elem[name];
|
290
|
+
}if(msie&¬xml&&name=="style"){return jQuery.attr(elem.style,"cssText",value);
|
291
|
+
}if(set){elem.setAttribute(name,""+value);
|
292
|
+
}var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);
|
293
|
+
return attr===null?undefined:attr;
|
294
|
+
}if(msie&&name=="opacity"){if(set){elem.zoom=1;
|
295
|
+
elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")");
|
296
|
+
}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";
|
297
|
+
}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();
|
298
|
+
});
|
299
|
+
if(set){elem[name]=value;
|
300
|
+
}return elem[name];
|
301
|
+
},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");
|
302
|
+
},makeArray:function(array){var ret=[];
|
303
|
+
if(array!=null){var i=array.length;
|
304
|
+
if(i==null||array.split||array.setInterval||array.call){ret[0]=array;
|
305
|
+
}else{while(i){ret[--i]=array[i];
|
306
|
+
}}}return ret;
|
307
|
+
},inArray:function(elem,array){for(var i=0,length=array.length;
|
308
|
+
i<length;
|
309
|
+
i++){if(array[i]===elem){return i;
|
310
|
+
}}return -1;
|
311
|
+
},merge:function(first,second){var i=0,elem,pos=first.length;
|
312
|
+
if(jQuery.browser.msie){while(elem=second[i++]){if(elem.nodeType!=8){first[pos++]=elem;
|
313
|
+
}}}else{while(elem=second[i++]){first[pos++]=elem;
|
314
|
+
}}return first;
|
315
|
+
},unique:function(array){var ret=[],done={};
|
316
|
+
try{for(var i=0,length=array.length;
|
317
|
+
i<length;
|
318
|
+
i++){var id=jQuery.data(array[i]);
|
319
|
+
if(!done[id]){done[id]=true;
|
320
|
+
ret.push(array[i]);
|
321
|
+
}}}catch(e){ret=array;
|
322
|
+
}return ret;
|
323
|
+
},grep:function(elems,callback,inv){var ret=[];
|
324
|
+
for(var i=0,length=elems.length;
|
325
|
+
i<length;
|
326
|
+
i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i]);
|
327
|
+
}}return ret;
|
328
|
+
},map:function(elems,callback){var ret=[];
|
329
|
+
for(var i=0,length=elems.length;
|
330
|
+
i<length;
|
331
|
+
i++){var value=callback(elems[i],i);
|
332
|
+
if(value!=null){ret[ret.length]=value;
|
333
|
+
}}return ret.concat.apply([],ret);
|
334
|
+
}});
|
335
|
+
var userAgent=navigator.userAgent.toLowerCase();
|
336
|
+
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)};
|
337
|
+
var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";
|
338
|
+
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"}});
|
339
|
+
jQuery.each({parent:function(elem){return elem.parentNode;
|
340
|
+
},parents:function(elem){return jQuery.dir(elem,"parentNode");
|
341
|
+
},next:function(elem){return jQuery.nth(elem,2,"nextSibling");
|
342
|
+
},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");
|
343
|
+
},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");
|
344
|
+
},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");
|
345
|
+
},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);
|
346
|
+
},children:function(elem){return jQuery.sibling(elem.firstChild);
|
347
|
+
},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);
|
348
|
+
}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);
|
349
|
+
if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret);
|
350
|
+
}return this.pushStack(jQuery.unique(ret));
|
351
|
+
};
|
352
|
+
});
|
353
|
+
jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;
|
354
|
+
return this.each(function(){for(var i=0,length=args.length;
|
355
|
+
i<length;
|
356
|
+
i++){jQuery(args[i])[original](this);
|
357
|
+
}});
|
358
|
+
};
|
359
|
+
});
|
360
|
+
jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");
|
361
|
+
if(this.nodeType==1){this.removeAttribute(name);
|
362
|
+
}},addClass:function(classNames){jQuery.className.add(this,classNames);
|
363
|
+
},removeClass:function(classNames){jQuery.className.remove(this,classNames);
|
364
|
+
},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);
|
365
|
+
},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);
|
366
|
+
jQuery.removeData(this);
|
367
|
+
});
|
368
|
+
if(this.parentNode){this.parentNode.removeChild(this);
|
369
|
+
}}},empty:function(){jQuery(">*",this).remove();
|
370
|
+
while(this.firstChild){this.removeChild(this.firstChild);
|
371
|
+
}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);
|
372
|
+
};
|
373
|
+
});
|
374
|
+
jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();
|
375
|
+
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");
|
376
|
+
};
|
377
|
+
});
|
378
|
+
function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;
|
379
|
+
}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+"*)");
|
380
|
+
jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);
|
381
|
+
},"#":function(a,i,m){return a.getAttribute("id")==m[2];
|
382
|
+
},":":{lt:function(a,i,m){return i<m[3]-0;
|
383
|
+
},gt:function(a,i,m){return i>m[3]-0;
|
384
|
+
},nth:function(a,i,m){return m[3]-0==i;
|
385
|
+
},eq:function(a,i,m){return m[3]-0==i;
|
386
|
+
},first:function(a,i){return i==0;
|
387
|
+
},last:function(a,i,m,r){return i==r.length-1;
|
388
|
+
},even:function(a,i){return i%2==0;
|
389
|
+
},odd:function(a,i){return i%2;
|
390
|
+
},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;
|
391
|
+
},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;
|
392
|
+
},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");
|
393
|
+
},parent:function(a){return a.firstChild;
|
394
|
+
},empty:function(a){return !a.firstChild;
|
395
|
+
},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;
|
396
|
+
},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";
|
397
|
+
},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";
|
398
|
+
},enabled:function(a){return !a.disabled;
|
399
|
+
},disabled:function(a){return a.disabled;
|
400
|
+
},checked:function(a){return a.checked;
|
401
|
+
},selected:function(a){return a.selected||jQuery.attr(a,"selected");
|
402
|
+
},text:function(a){return"text"==a.type;
|
403
|
+
},radio:function(a){return"radio"==a.type;
|
404
|
+
},checkbox:function(a){return"checkbox"==a.type;
|
405
|
+
},file:function(a){return"file"==a.type;
|
406
|
+
},password:function(a){return"password"==a.type;
|
407
|
+
},submit:function(a){return"submit"==a.type;
|
408
|
+
},image:function(a){return"image"==a.type;
|
409
|
+
},reset:function(a){return"reset"==a.type;
|
410
|
+
},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");
|
411
|
+
},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);
|
412
|
+
},has:function(a,i,m){return jQuery.find(m[3],a).length;
|
413
|
+
},header:function(a){return/h\d/i.test(a.nodeName);
|
414
|
+
},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;
|
415
|
+
}).length;
|
416
|
+
}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];
|
417
|
+
while(expr&&expr!=old){old=expr;
|
418
|
+
var f=jQuery.filter(expr,elems,not);
|
419
|
+
expr=f.t.replace(/^\s*,\s*/,"");
|
420
|
+
cur=not?elems=f.r:jQuery.merge(cur,f.r);
|
421
|
+
}return cur;
|
422
|
+
},find:function(t,context){if(typeof t!="string"){return[t];
|
423
|
+
}if(context&&context.nodeType!=1&&context.nodeType!=9){return[];
|
424
|
+
}context=context||document;
|
425
|
+
var ret=[context],done=[],last,nodeName;
|
426
|
+
while(t&&last!=t){var r=[];
|
427
|
+
last=t;
|
428
|
+
t=jQuery.trim(t);
|
429
|
+
var foundToken=false,re=quickChild,m=re.exec(t);
|
430
|
+
if(m){nodeName=m[1].toUpperCase();
|
431
|
+
for(var i=0;
|
432
|
+
ret[i];
|
433
|
+
i++){for(var c=ret[i].firstChild;
|
434
|
+
c;
|
435
|
+
c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c);
|
436
|
+
}}}ret=r;
|
437
|
+
t=t.replace(re,"");
|
438
|
+
if(t.indexOf(" ")==0){continue;
|
439
|
+
}foundToken=true;
|
440
|
+
}else{re=/^([>+~])\s*(\w*)/i;
|
441
|
+
if((m=re.exec(t))!=null){r=[];
|
442
|
+
var merge={};
|
443
|
+
nodeName=m[2].toUpperCase();
|
444
|
+
m=m[1];
|
445
|
+
for(var j=0,rl=ret.length;
|
446
|
+
j<rl;
|
447
|
+
j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;
|
448
|
+
for(;
|
449
|
+
n;
|
450
|
+
n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);
|
451
|
+
if(m=="~"&&merge[id]){break;
|
452
|
+
}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true;
|
453
|
+
}r.push(n);
|
454
|
+
}if(m=="+"){break;
|
455
|
+
}}}}ret=r;
|
456
|
+
t=jQuery.trim(t.replace(re,""));
|
457
|
+
foundToken=true;
|
458
|
+
}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift();
|
459
|
+
}done=jQuery.merge(done,ret);
|
460
|
+
r=ret=[context];
|
461
|
+
t=" "+t.substr(1,t.length);
|
462
|
+
}else{var re2=quickID;
|
463
|
+
var m=re2.exec(t);
|
464
|
+
if(m){m=[0,m[2],m[3],m[1]];
|
465
|
+
}else{re2=quickClass;
|
466
|
+
m=re2.exec(t);
|
467
|
+
}m[2]=m[2].replace(/\\/g,"");
|
468
|
+
var elem=ret[ret.length-1];
|
469
|
+
if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);
|
470
|
+
if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0];
|
471
|
+
}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];
|
472
|
+
}else{for(var i=0;
|
473
|
+
ret[i];
|
474
|
+
i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];
|
475
|
+
if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param";
|
476
|
+
}r=jQuery.merge(r,ret[i].getElementsByTagName(tag));
|
477
|
+
}if(m[1]=="."){r=jQuery.classFilter(r,m[2]);
|
478
|
+
}if(m[1]=="#"){var tmp=[];
|
479
|
+
for(var i=0;
|
480
|
+
r[i];
|
481
|
+
i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];
|
482
|
+
break;
|
483
|
+
}}r=tmp;
|
484
|
+
}ret=r;
|
485
|
+
}t=t.replace(re2,"");
|
486
|
+
}}if(t){var val=jQuery.filter(t,r);
|
487
|
+
ret=r=val.r;
|
488
|
+
t=jQuery.trim(val.t);
|
489
|
+
}}if(t){ret=[];
|
490
|
+
}if(ret&&context==ret[0]){ret.shift();
|
491
|
+
}done=jQuery.merge(done,ret);
|
492
|
+
return done;
|
493
|
+
},classFilter:function(r,m,not){m=" "+m+" ";
|
494
|
+
var tmp=[];
|
495
|
+
for(var i=0;
|
496
|
+
r[i];
|
497
|
+
i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;
|
498
|
+
if(!not&&pass||not&&!pass){tmp.push(r[i]);
|
499
|
+
}}return tmp;
|
500
|
+
},filter:function(t,r,not){var last;
|
501
|
+
while(t&&t!=last){last=t;
|
502
|
+
var p=jQuery.parse,m;
|
503
|
+
for(var i=0;
|
504
|
+
p[i];
|
505
|
+
i++){m=p[i].exec(t);
|
506
|
+
if(m){t=t.substring(m[0].length);
|
507
|
+
m[2]=m[2].replace(/\\/g,"");
|
508
|
+
break;
|
509
|
+
}}if(!m){break;
|
510
|
+
}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);
|
511
|
+
}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not);
|
512
|
+
}else{if(m[1]=="["){var tmp=[],type=m[3];
|
513
|
+
for(var i=0,rl=r.length;
|
514
|
+
i<rl;
|
515
|
+
i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];
|
516
|
+
if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||"";
|
517
|
+
}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);
|
518
|
+
}}r=tmp;
|
519
|
+
}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;
|
520
|
+
for(var i=0,rl=r.length;
|
521
|
+
i<rl;
|
522
|
+
i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);
|
523
|
+
if(!merge[id]){var c=1;
|
524
|
+
for(var n=parentNode.firstChild;
|
525
|
+
n;
|
526
|
+
n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++;
|
527
|
+
}}merge[id]=true;
|
528
|
+
}var add=false;
|
529
|
+
if(first==0){if(node.nodeIndex==last){add=true;
|
530
|
+
}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true;
|
531
|
+
}}if(add^not){tmp.push(node);
|
532
|
+
}}r=tmp;
|
533
|
+
}else{var fn=jQuery.expr[m[1]];
|
534
|
+
if(typeof fn=="object"){fn=fn[m[2]];
|
535
|
+
}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}");
|
536
|
+
}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);
|
537
|
+
},not);
|
538
|
+
}}}}}return{r:r,t:t};
|
539
|
+
},dir:function(elem,dir){var matched=[],cur=elem[dir];
|
540
|
+
while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur);
|
541
|
+
}cur=cur[dir];
|
542
|
+
}return matched;
|
543
|
+
},nth:function(cur,result,dir,elem){result=result||1;
|
544
|
+
var num=0;
|
545
|
+
for(;
|
546
|
+
cur;
|
547
|
+
cur=cur[dir]){if(cur.nodeType==1&&++num==result){break;
|
548
|
+
}}return cur;
|
549
|
+
},sibling:function(n,elem){var r=[];
|
550
|
+
for(;
|
551
|
+
n;
|
552
|
+
n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n);
|
553
|
+
}}return r;
|
554
|
+
}});
|
555
|
+
jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return ;
|
556
|
+
}if(jQuery.browser.msie&&elem.setInterval){elem=window;
|
557
|
+
}if(!handler.guid){handler.guid=this.guid++;
|
558
|
+
}if(data!=undefined){var fn=handler;
|
559
|
+
handler=this.proxy(fn,function(){return fn.apply(this,arguments);
|
560
|
+
});
|
561
|
+
handler.data=data;
|
562
|
+
}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);
|
563
|
+
}});
|
564
|
+
handle.elem=elem;
|
565
|
+
jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");
|
566
|
+
type=parts[0];
|
567
|
+
handler.type=parts[1];
|
568
|
+
var handlers=events[type];
|
569
|
+
if(!handlers){handlers=events[type]={};
|
570
|
+
if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false);
|
571
|
+
}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle);
|
572
|
+
}}}}handlers[handler.guid]=handler;
|
573
|
+
jQuery.event.global[type]=true;
|
574
|
+
});
|
575
|
+
elem=null;
|
576
|
+
},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return ;
|
577
|
+
}var events=jQuery.data(elem,"events"),ret,index;
|
578
|
+
if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""));
|
579
|
+
}}else{if(types.type){handler=types.handler;
|
580
|
+
types=types.type;
|
581
|
+
}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");
|
582
|
+
type=parts[0];
|
583
|
+
if(events[type]){if(handler){delete events[type][handler.guid];
|
584
|
+
}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler];
|
585
|
+
}}}for(ret in events[type]){break;
|
586
|
+
}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);
|
587
|
+
}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"));
|
588
|
+
}}}ret=null;
|
589
|
+
delete events[type];
|
590
|
+
}}});
|
591
|
+
}for(ret in events){break;
|
592
|
+
}if(!ret){var handle=jQuery.data(elem,"handle");
|
593
|
+
if(handle){handle.elem=null;
|
594
|
+
}jQuery.removeData(elem,"events");
|
595
|
+
jQuery.removeData(elem,"handle");
|
596
|
+
}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);
|
597
|
+
if(type.indexOf("!")>=0){type=type.slice(0,-1);
|
598
|
+
var exclusive=true;
|
599
|
+
}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data);
|
600
|
+
}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined;
|
601
|
+
}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;
|
602
|
+
if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});
|
603
|
+
data[0][expando]=true;
|
604
|
+
}data[0].type=type;
|
605
|
+
if(exclusive){data[0].exclusive=true;
|
606
|
+
}var handle=jQuery.data(elem,"handle");
|
607
|
+
if(handle){val=handle.apply(elem,data);
|
608
|
+
}if((!fn||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false;
|
609
|
+
}if(event){data.shift();
|
610
|
+
}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));
|
611
|
+
if(ret!==undefined){val=ret;
|
612
|
+
}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;
|
613
|
+
try{elem[type]();
|
614
|
+
}catch(e){}}this.triggered=false;
|
615
|
+
}return val;
|
616
|
+
},handle:function(event){var val,ret,namespace,all,handlers;
|
617
|
+
event=arguments[0]=jQuery.event.fix(event||window.event);
|
618
|
+
namespace=event.type.split(".");
|
619
|
+
event.type=namespace[0];
|
620
|
+
namespace=namespace[1];
|
621
|
+
all=!namespace&&!event.exclusive;
|
622
|
+
handlers=(jQuery.data(this,"events")||{})[event.type];
|
623
|
+
for(var j in handlers){var handler=handlers[j];
|
624
|
+
if(all||handler.type==namespace){event.handler=handler;
|
625
|
+
event.data=handler.data;
|
626
|
+
ret=handler.apply(this,arguments);
|
627
|
+
if(val!==false){val=ret;
|
628
|
+
}if(ret===false){event.preventDefault();
|
629
|
+
event.stopPropagation();
|
630
|
+
}}}return val;
|
631
|
+
},fix:function(event){if(event[expando]==true){return event;
|
632
|
+
}var originalEvent=event;
|
633
|
+
event={originalEvent:originalEvent};
|
634
|
+
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(" ");
|
635
|
+
for(var i=props.length;
|
636
|
+
i;
|
637
|
+
i--){event[props[i]]=originalEvent[props[i]];
|
638
|
+
}event[expando]=true;
|
639
|
+
event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault();
|
640
|
+
}originalEvent.returnValue=false;
|
641
|
+
};
|
642
|
+
event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation();
|
643
|
+
}originalEvent.cancelBubble=true;
|
644
|
+
};
|
645
|
+
event.timeStamp=event.timeStamp||now();
|
646
|
+
if(!event.target){event.target=event.srcElement||document;
|
647
|
+
}if(event.target.nodeType==3){event.target=event.target.parentNode;
|
648
|
+
}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;
|
649
|
+
}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;
|
650
|
+
event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);
|
651
|
+
event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);
|
652
|
+
}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;
|
653
|
+
}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;
|
654
|
+
}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));
|
655
|
+
}return event;
|
656
|
+
},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;
|
657
|
+
return proxy;
|
658
|
+
},special:{ready:{setup:function(){bindReady();
|
659
|
+
return ;
|
660
|
+
},teardown:function(){return ;
|
661
|
+
}},mouseenter:{setup:function(){if(jQuery.browser.msie){return false;
|
662
|
+
}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);
|
663
|
+
return true;
|
664
|
+
},teardown:function(){if(jQuery.browser.msie){return false;
|
665
|
+
}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);
|
666
|
+
return true;
|
667
|
+
},handler:function(event){if(withinElement(event,this)){return true;
|
668
|
+
}event.type="mouseenter";
|
669
|
+
return jQuery.event.handle.apply(this,arguments);
|
670
|
+
}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false;
|
671
|
+
}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);
|
672
|
+
return true;
|
673
|
+
},teardown:function(){if(jQuery.browser.msie){return false;
|
674
|
+
}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);
|
675
|
+
return true;
|
676
|
+
},handler:function(event){if(withinElement(event,this)){return true;
|
677
|
+
}event.type="mouseleave";
|
678
|
+
return jQuery.event.handle.apply(this,arguments);
|
679
|
+
}}}};
|
680
|
+
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);
|
681
|
+
});
|
682
|
+
},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);
|
683
|
+
return(fn||data).apply(this,arguments);
|
684
|
+
});
|
685
|
+
return this.each(function(){jQuery.event.add(this,type,one,fn&&data);
|
686
|
+
});
|
687
|
+
},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);
|
688
|
+
});
|
689
|
+
},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);
|
690
|
+
});
|
691
|
+
},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);
|
692
|
+
},toggle:function(fn){var args=arguments,i=1;
|
693
|
+
while(i<args.length){jQuery.event.proxy(fn,args[i++]);
|
694
|
+
}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;
|
695
|
+
event.preventDefault();
|
696
|
+
return args[this.lastToggle++].apply(this,arguments)||false;
|
697
|
+
}));
|
698
|
+
},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut);
|
699
|
+
},ready:function(fn){bindReady();
|
700
|
+
if(jQuery.isReady){fn.call(document,jQuery);
|
701
|
+
}else{jQuery.readyList.push(function(){return fn.call(this,jQuery);
|
702
|
+
});
|
703
|
+
}return this;
|
704
|
+
}});
|
705
|
+
jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;
|
706
|
+
if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);
|
707
|
+
});
|
708
|
+
jQuery.readyList=null;
|
709
|
+
}jQuery(document).triggerHandler("ready");
|
710
|
+
}}});
|
711
|
+
var readyBound=false;
|
712
|
+
function bindReady(){if(readyBound){return ;
|
713
|
+
}readyBound=true;
|
714
|
+
if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false);
|
715
|
+
}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return ;
|
716
|
+
}try{document.documentElement.doScroll("left");
|
717
|
+
}catch(error){setTimeout(arguments.callee,0);
|
718
|
+
return ;
|
719
|
+
}jQuery.ready();
|
720
|
+
})();
|
721
|
+
}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return ;
|
722
|
+
}for(var i=0;
|
723
|
+
i<document.styleSheets.length;
|
724
|
+
i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);
|
725
|
+
return ;
|
726
|
+
}}jQuery.ready();
|
727
|
+
},false);
|
728
|
+
}if(jQuery.browser.safari){var numStyles;
|
729
|
+
(function(){if(jQuery.isReady){return ;
|
730
|
+
}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);
|
731
|
+
return ;
|
732
|
+
}if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length;
|
733
|
+
}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);
|
734
|
+
return ;
|
735
|
+
}jQuery.ready();
|
736
|
+
})();
|
737
|
+
}jQuery.event.add(window,"load",jQuery.ready);
|
738
|
+
}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);
|
739
|
+
};
|
740
|
+
});
|
741
|
+
var withinElement=function(event,elem){var parent=event.relatedTarget;
|
742
|
+
while(parent&&parent!=elem){try{parent=parent.parentNode;
|
743
|
+
}catch(error){parent=elem;
|
744
|
+
}}return parent==elem;
|
745
|
+
};
|
746
|
+
jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();
|
747
|
+
});
|
748
|
+
jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!="string"){return this._load(url);
|
749
|
+
}var off=url.indexOf(" ");
|
750
|
+
if(off>=0){var selector=url.slice(off,url.length);
|
751
|
+
url=url.slice(0,off);
|
752
|
+
}callback=callback||function(){};
|
753
|
+
var type="GET";
|
754
|
+
if(params){if(jQuery.isFunction(params)){callback=params;
|
755
|
+
params=null;
|
756
|
+
}else{params=jQuery.param(params);
|
757
|
+
type="POST";
|
758
|
+
}}var self=this;
|
759
|
+
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);
|
760
|
+
}self.each(callback,[res.responseText,status,res]);
|
761
|
+
}});
|
762
|
+
return this;
|
763
|
+
},serialize:function(){return jQuery.param(this.serializeArray());
|
764
|
+
},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;
|
765
|
+
}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));
|
766
|
+
}).map(function(i,elem){var val=jQuery(this).val();
|
767
|
+
return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};
|
768
|
+
}):{name:elem.name,value:val};
|
769
|
+
}).get();
|
770
|
+
}});
|
771
|
+
jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);
|
772
|
+
};
|
773
|
+
});
|
774
|
+
var jsc=now();
|
775
|
+
jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;
|
776
|
+
data=null;
|
777
|
+
}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});
|
778
|
+
},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");
|
779
|
+
},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");
|
780
|
+
},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;
|
781
|
+
data={};
|
782
|
+
}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});
|
783
|
+
},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);
|
784
|
+
},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));
|
785
|
+
var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();
|
786
|
+
if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data);
|
787
|
+
}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";
|
788
|
+
}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";
|
789
|
+
}}s.dataType="json";
|
790
|
+
}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;
|
791
|
+
if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");
|
792
|
+
}s.url=s.url.replace(jsre,"="+jsonp+"$1");
|
793
|
+
s.dataType="script";
|
794
|
+
window[jsonp]=function(tmp){data=tmp;
|
795
|
+
success();
|
796
|
+
complete();
|
797
|
+
window[jsonp]=undefined;
|
798
|
+
try{delete window[jsonp];
|
799
|
+
}catch(e){}if(head){head.removeChild(script);
|
800
|
+
}};
|
801
|
+
}if(s.dataType=="script"&&s.cache==null){s.cache=false;
|
802
|
+
}if(s.cache===false&&type=="GET"){var ts=now();
|
803
|
+
var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");
|
804
|
+
s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");
|
805
|
+
}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;
|
806
|
+
s.data=null;
|
807
|
+
}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");
|
808
|
+
}var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;
|
809
|
+
if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];
|
810
|
+
var script=document.createElement("script");
|
811
|
+
script.src=s.url;
|
812
|
+
if(s.scriptCharset){script.charset=s.scriptCharset;
|
813
|
+
}if(!jsonp){var done=false;
|
814
|
+
script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;
|
815
|
+
success();
|
816
|
+
complete();
|
817
|
+
head.removeChild(script);
|
818
|
+
}};
|
819
|
+
}head.appendChild(script);
|
820
|
+
return undefined;
|
821
|
+
}var requestDone=false;
|
822
|
+
var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();
|
823
|
+
if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);
|
824
|
+
}else{xhr.open(type,s.url,s.async);
|
825
|
+
}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType);
|
826
|
+
}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");
|
827
|
+
}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
|
828
|
+
xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);
|
829
|
+
}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;
|
830
|
+
xhr.abort();
|
831
|
+
return false;
|
832
|
+
}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s]);
|
833
|
+
}var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;
|
834
|
+
if(ival){clearInterval(ival);
|
835
|
+
ival=null;
|
836
|
+
}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";
|
837
|
+
if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);
|
838
|
+
}catch(e){status="parsererror";
|
839
|
+
}}if(status=="success"){var modRes;
|
840
|
+
try{modRes=xhr.getResponseHeader("Last-Modified");
|
841
|
+
}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes;
|
842
|
+
}if(!jsonp){success();
|
843
|
+
}}else{jQuery.handleError(s,xhr,status);
|
844
|
+
}complete();
|
845
|
+
if(s.async){xhr=null;
|
846
|
+
}}};
|
847
|
+
if(s.async){var ival=setInterval(onreadystatechange,13);
|
848
|
+
if(s.timeout>0){setTimeout(function(){if(xhr){xhr.abort();
|
849
|
+
if(!requestDone){onreadystatechange("timeout");
|
850
|
+
}}},s.timeout);
|
851
|
+
}}try{xhr.send(s.data);
|
852
|
+
}catch(e){jQuery.handleError(s,xhr,null,e);
|
853
|
+
}if(!s.async){onreadystatechange();
|
854
|
+
}function success(){if(s.success){s.success(data,status);
|
855
|
+
}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s]);
|
856
|
+
}}function complete(){if(s.complete){s.complete(xhr,status);
|
857
|
+
}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s]);
|
858
|
+
}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");
|
859
|
+
}}return xhr;
|
860
|
+
},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e);
|
861
|
+
}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e]);
|
862
|
+
}},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;
|
863
|
+
}catch(e){}return false;
|
864
|
+
},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");
|
865
|
+
return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;
|
866
|
+
}catch(e){}return false;
|
867
|
+
},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;
|
868
|
+
if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror";
|
869
|
+
}if(filter){data=filter(data,type);
|
870
|
+
}if(type=="script"){jQuery.globalEval(data);
|
871
|
+
}if(type=="json"){data=eval("("+data+")");
|
872
|
+
}return data;
|
873
|
+
},param:function(a){var s=[];
|
874
|
+
if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));
|
875
|
+
});
|
876
|
+
}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));
|
877
|
+
});
|
878
|
+
}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));
|
879
|
+
}}}return s.join("&").replace(/%20/g,"+");
|
880
|
+
}});
|
881
|
+
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||"";
|
882
|
+
if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");
|
883
|
+
this.style.display=elem.css("display");
|
884
|
+
if(this.style.display=="none"){this.style.display="block";
|
885
|
+
}elem.remove();
|
886
|
+
}}).end();
|
887
|
+
},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");
|
888
|
+
this.style.display="none";
|
889
|
+
}).end();
|
890
|
+
},_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"]();
|
891
|
+
});
|
892
|
+
},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);
|
893
|
+
},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);
|
894
|
+
},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);
|
895
|
+
},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);
|
896
|
+
},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);
|
897
|
+
},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);
|
898
|
+
},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);
|
899
|
+
return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false;
|
900
|
+
}var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;
|
901
|
+
for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this);
|
902
|
+
}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");
|
903
|
+
opt.overflow=this.style.overflow;
|
904
|
+
}}if(opt.overflow!=null){this.style.overflow="hidden";
|
905
|
+
}opt.curAnim=jQuery.extend({},prop);
|
906
|
+
jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);
|
907
|
+
if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop);
|
908
|
+
}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;
|
909
|
+
if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";
|
910
|
+
if(unit!="px"){self.style[name]=(end||1)+unit;
|
911
|
+
start=((end||1)/e.cur(true))*start;
|
912
|
+
self.style[name]=start+unit;
|
913
|
+
}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start;
|
914
|
+
}e.custom(start,end,unit);
|
915
|
+
}else{e.custom(start,val,"");
|
916
|
+
}}});
|
917
|
+
return true;
|
918
|
+
});
|
919
|
+
},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;
|
920
|
+
type="fx";
|
921
|
+
}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type);
|
922
|
+
}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn);
|
923
|
+
}else{queue(this,type).push(fn);
|
924
|
+
if(queue(this,type).length==1){fn.call(this);
|
925
|
+
}}});
|
926
|
+
},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;
|
927
|
+
if(clearQueue){this.queue([]);
|
928
|
+
}this.each(function(){for(var i=timers.length-1;
|
929
|
+
i>=0;
|
930
|
+
i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true);
|
931
|
+
}timers.splice(i,1);
|
932
|
+
}}});
|
933
|
+
if(!gotoEnd){this.dequeue();
|
934
|
+
}return this;
|
935
|
+
}});
|
936
|
+
var queue=function(elem,type,array){if(elem){type=type||"fx";
|
937
|
+
var q=jQuery.data(elem,type+"queue");
|
938
|
+
if(!q||array){q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));
|
939
|
+
}}return q;
|
940
|
+
};
|
941
|
+
jQuery.fn.dequeue=function(type){type=type||"fx";
|
942
|
+
return this.each(function(){var q=queue(this,type);
|
943
|
+
q.shift();
|
944
|
+
if(q.length){q[0].call(this);
|
945
|
+
}});
|
946
|
+
};
|
947
|
+
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};
|
948
|
+
opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;
|
949
|
+
opt.old=opt.complete;
|
950
|
+
opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();
|
951
|
+
}if(jQuery.isFunction(opt.old)){opt.old.call(this);
|
952
|
+
}};
|
953
|
+
return opt;
|
954
|
+
},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;
|
955
|
+
},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;
|
956
|
+
}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;
|
957
|
+
this.elem=elem;
|
958
|
+
this.prop=prop;
|
959
|
+
if(!options.orig){options.orig={};
|
960
|
+
}}});
|
961
|
+
jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);
|
962
|
+
}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);
|
963
|
+
if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block";
|
964
|
+
}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop];
|
965
|
+
}var r=parseFloat(jQuery.css(this.elem,this.prop,force));
|
966
|
+
return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;
|
967
|
+
},custom:function(from,to,unit){this.startTime=now();
|
968
|
+
this.start=from;
|
969
|
+
this.end=to;
|
970
|
+
this.unit=unit||this.unit||"px";
|
971
|
+
this.now=this.start;
|
972
|
+
this.pos=this.state=0;
|
973
|
+
this.update();
|
974
|
+
var self=this;
|
975
|
+
function t(gotoEnd){return self.step(gotoEnd);
|
976
|
+
}t.elem=this.elem;
|
977
|
+
jQuery.timers.push(t);
|
978
|
+
if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;
|
979
|
+
for(var i=0;
|
980
|
+
i<timers.length;
|
981
|
+
i++){if(!timers[i]()){timers.splice(i--,1);
|
982
|
+
}}if(!timers.length){clearInterval(jQuery.timerId);
|
983
|
+
jQuery.timerId=null;
|
984
|
+
}},13);
|
985
|
+
}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);
|
986
|
+
this.options.show=true;
|
987
|
+
this.custom(0,this.cur());
|
988
|
+
if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px";
|
989
|
+
}jQuery(this.elem).show();
|
990
|
+
},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);
|
991
|
+
this.options.hide=true;
|
992
|
+
this.custom(this.cur(),0);
|
993
|
+
},step:function(gotoEnd){var t=now();
|
994
|
+
if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;
|
995
|
+
this.pos=this.state=1;
|
996
|
+
this.update();
|
997
|
+
this.options.curAnim[this.prop]=true;
|
998
|
+
var done=true;
|
999
|
+
for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;
|
1000
|
+
}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;
|
1001
|
+
this.elem.style.display=this.options.display;
|
1002
|
+
if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block";
|
1003
|
+
}}if(this.options.hide){this.elem.style.display="none";
|
1004
|
+
}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p]);
|
1005
|
+
}}}if(done){this.options.complete.call(this.elem);
|
1006
|
+
}return false;
|
1007
|
+
}else{var n=t-this.startTime;
|
1008
|
+
this.state=n/this.options.duration;
|
1009
|
+
this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);
|
1010
|
+
this.now=this.start+((this.end-this.start)*this.pos);
|
1011
|
+
this.update();
|
1012
|
+
}return true;
|
1013
|
+
}};
|
1014
|
+
jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;
|
1015
|
+
},scrollTop:function(fx){fx.elem.scrollTop=fx.now;
|
1016
|
+
},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);
|
1017
|
+
},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;
|
1018
|
+
}}});
|
1019
|
+
jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;
|
1020
|
+
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";
|
1021
|
+
if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();
|
1022
|
+
add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));
|
1023
|
+
add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);
|
1024
|
+
}else{add(elem.offsetLeft,elem.offsetTop);
|
1025
|
+
while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);
|
1026
|
+
if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent);
|
1027
|
+
}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true;
|
1028
|
+
}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;
|
1029
|
+
offsetParent=offsetParent.offsetParent;
|
1030
|
+
}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop);
|
1031
|
+
}if(mozilla&&css(parent,"overflow")!="visible"){border(parent);
|
1032
|
+
}parent=parent.parentNode;
|
1033
|
+
}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop);
|
1034
|
+
}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));
|
1035
|
+
}}results={top:top,left:left};
|
1036
|
+
}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));
|
1037
|
+
}function add(l,t){left+=parseInt(l,10)||0;
|
1038
|
+
top+=parseInt(t,10)||0;
|
1039
|
+
}return results;
|
1040
|
+
};
|
1041
|
+
jQuery.fn.extend({position:function(){var left=0,top=0,results;
|
1042
|
+
if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();
|
1043
|
+
offset.top-=num(this,"marginTop");
|
1044
|
+
offset.left-=num(this,"marginLeft");
|
1045
|
+
parentOffset.top+=num(offsetParent,"borderTopWidth");
|
1046
|
+
parentOffset.left+=num(offsetParent,"borderLeftWidth");
|
1047
|
+
results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};
|
1048
|
+
}return results;
|
1049
|
+
},offsetParent:function(){var offsetParent=this[0].offsetParent;
|
1050
|
+
while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;
|
1051
|
+
}return jQuery(offsetParent);
|
1052
|
+
}});
|
1053
|
+
jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;
|
1054
|
+
jQuery.fn[method]=function(val){if(!this[0]){return ;
|
1055
|
+
}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;
|
1056
|
+
}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];
|
1057
|
+
};
|
1058
|
+
});
|
1059
|
+
jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";
|
1060
|
+
jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);
|
1061
|
+
};
|
1062
|
+
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);
|
1063
|
+
};
|
1064
|
+
});
|
1065
|
+
})();
|
1066
|
+
|
1067
|
+
|
1068
|
+
/* platform.js */
|
1069
|
+
SimileAjax.version="pre 2.3.0";
|
1070
|
+
SimileAjax.jQuery=jQuery.noConflict(true);
|
1071
|
+
if(typeof window["$"]=="undefined"){window.$=SimileAjax.jQuery;
|
1072
|
+
}SimileAjax.Platform.os={isMac:false,isWin:false,isWin32:false,isUnix:false};
|
1073
|
+
SimileAjax.Platform.browser={isIE:false,isNetscape:false,isMozilla:false,isFirefox:false,isOpera:false,isSafari:false,majorVersion:0,minorVersion:0};
|
1074
|
+
(function(){var C=navigator.appName.toLowerCase();
|
1075
|
+
var A=navigator.userAgent.toLowerCase();
|
1076
|
+
SimileAjax.Platform.os.isMac=(A.indexOf("mac")!=-1);
|
1077
|
+
SimileAjax.Platform.os.isWin=(A.indexOf("win")!=-1);
|
1078
|
+
SimileAjax.Platform.os.isWin32=SimileAjax.Platform.isWin&&(A.indexOf("95")!=-1||A.indexOf("98")!=-1||A.indexOf("nt")!=-1||A.indexOf("win32")!=-1||A.indexOf("32bit")!=-1);
|
1079
|
+
SimileAjax.Platform.os.isUnix=(A.indexOf("x11")!=-1);
|
1080
|
+
SimileAjax.Platform.browser.isIE=(C.indexOf("microsoft")!=-1);
|
1081
|
+
SimileAjax.Platform.browser.isNetscape=(C.indexOf("netscape")!=-1);
|
1082
|
+
SimileAjax.Platform.browser.isMozilla=(A.indexOf("mozilla")!=-1);
|
1083
|
+
SimileAjax.Platform.browser.isFirefox=(A.indexOf("firefox")!=-1);
|
1084
|
+
SimileAjax.Platform.browser.isOpera=(C.indexOf("opera")!=-1);
|
1085
|
+
SimileAjax.Platform.browser.isSafari=(C.indexOf("safari")!=-1);
|
1086
|
+
var E=function(G){var F=G.split(".");
|
1087
|
+
SimileAjax.Platform.browser.majorVersion=parseInt(F[0]);
|
1088
|
+
SimileAjax.Platform.browser.minorVersion=parseInt(F[1]);
|
1089
|
+
};
|
1090
|
+
var B=function(H,G,I){var F=H.indexOf(G,I);
|
1091
|
+
return F>=0?F:H.length;
|
1092
|
+
};
|
1093
|
+
if(SimileAjax.Platform.browser.isMozilla){var D=A.indexOf("mozilla/");
|
1094
|
+
if(D>=0){E(A.substring(D+8,B(A," ",D)));
|
1095
|
+
}}if(SimileAjax.Platform.browser.isIE){var D=A.indexOf("msie ");
|
1096
|
+
if(D>=0){E(A.substring(D+5,B(A,";",D)));
|
1097
|
+
}}if(SimileAjax.Platform.browser.isNetscape){var D=A.indexOf("rv:");
|
1098
|
+
if(D>=0){E(A.substring(D+3,B(A,")",D)));
|
1099
|
+
}}if(SimileAjax.Platform.browser.isFirefox){var D=A.indexOf("firefox/");
|
1100
|
+
if(D>=0){E(A.substring(D+8,B(A," ",D)));
|
1101
|
+
}}if(!("localeCompare" in String.prototype)){String.prototype.localeCompare=function(F){if(this<F){return -1;
|
1102
|
+
}else{if(this>F){return 1;
|
1103
|
+
}else{return 0;
|
1104
|
+
}}};
|
1105
|
+
}})();
|
1106
|
+
SimileAjax.Platform.getDefaultLocale=function(){return SimileAjax.Platform.clientLocale;
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
|
1110
|
+
/* ajax.js */
|
1111
|
+
SimileAjax.ListenerQueue=function(A){this._listeners=[];
|
1112
|
+
this._wildcardHandlerName=A;
|
1113
|
+
};
|
1114
|
+
SimileAjax.ListenerQueue.prototype.add=function(A){this._listeners.push(A);
|
1115
|
+
};
|
1116
|
+
SimileAjax.ListenerQueue.prototype.remove=function(C){var A=this._listeners;
|
1117
|
+
for(var B=0;
|
1118
|
+
B<A.length;
|
1119
|
+
B++){if(A[B]==C){A.splice(B,1);
|
1120
|
+
break;
|
1121
|
+
}}};
|
1122
|
+
SimileAjax.ListenerQueue.prototype.fire=function(C,B){var A=[].concat(this._listeners);
|
1123
|
+
for(var D=0;
|
1124
|
+
D<A.length;
|
1125
|
+
D++){var E=A[D];
|
1126
|
+
if(C in E){try{E[C].apply(E,B);
|
1127
|
+
}catch(F){SimileAjax.Debug.exception("Error firing event of name "+C,F);
|
1128
|
+
}}else{if(this._wildcardHandlerName!=null&&this._wildcardHandlerName in E){try{E[this._wildcardHandlerName].apply(E,[C]);
|
1129
|
+
}catch(F){SimileAjax.Debug.exception("Error firing event of name "+C+" to wildcard handler",F);
|
1130
|
+
}}}}};
|
1131
|
+
|
1132
|
+
|
1133
|
+
/* data-structure.js */
|
1134
|
+
SimileAjax.Set=function(A){this._hash={};
|
1135
|
+
this._count=0;
|
1136
|
+
if(A instanceof Array){for(var B=0;
|
1137
|
+
B<A.length;
|
1138
|
+
B++){this.add(A[B]);
|
1139
|
+
}}else{if(A instanceof SimileAjax.Set){this.addSet(A);
|
1140
|
+
}}};
|
1141
|
+
SimileAjax.Set.prototype.add=function(A){if(!(A in this._hash)){this._hash[A]=true;
|
1142
|
+
this._count++;
|
1143
|
+
return true;
|
1144
|
+
}return false;
|
1145
|
+
};
|
1146
|
+
SimileAjax.Set.prototype.addSet=function(B){for(var A in B._hash){this.add(A);
|
1147
|
+
}};
|
1148
|
+
SimileAjax.Set.prototype.remove=function(A){if(A in this._hash){delete this._hash[A];
|
1149
|
+
this._count--;
|
1150
|
+
return true;
|
1151
|
+
}return false;
|
1152
|
+
};
|
1153
|
+
SimileAjax.Set.prototype.removeSet=function(B){for(var A in B._hash){this.remove(A);
|
1154
|
+
}};
|
1155
|
+
SimileAjax.Set.prototype.retainSet=function(B){for(var A in this._hash){if(!B.contains(A)){delete this._hash[A];
|
1156
|
+
this._count--;
|
1157
|
+
}}};
|
1158
|
+
SimileAjax.Set.prototype.contains=function(A){return(A in this._hash);
|
1159
|
+
};
|
1160
|
+
SimileAjax.Set.prototype.size=function(){return this._count;
|
1161
|
+
};
|
1162
|
+
SimileAjax.Set.prototype.toArray=function(){var A=[];
|
1163
|
+
for(var B in this._hash){A.push(B);
|
1164
|
+
}return A;
|
1165
|
+
};
|
1166
|
+
SimileAjax.Set.prototype.visit=function(A){for(var B in this._hash){if(A(B)==true){break;
|
1167
|
+
}}};
|
1168
|
+
SimileAjax.SortedArray=function(B,A){this._a=(A instanceof Array)?A:[];
|
1169
|
+
this._compare=B;
|
1170
|
+
};
|
1171
|
+
SimileAjax.SortedArray.prototype.add=function(C){var A=this;
|
1172
|
+
var B=this.find(function(D){return A._compare(D,C);
|
1173
|
+
});
|
1174
|
+
if(B<this._a.length){this._a.splice(B,0,C);
|
1175
|
+
}else{this._a.push(C);
|
1176
|
+
}};
|
1177
|
+
SimileAjax.SortedArray.prototype.remove=function(C){var A=this;
|
1178
|
+
var B=this.find(function(D){return A._compare(D,C);
|
1179
|
+
});
|
1180
|
+
while(B<this._a.length&&this._compare(this._a[B],C)==0){if(this._a[B]==C){this._a.splice(B,1);
|
1181
|
+
return true;
|
1182
|
+
}else{B++;
|
1183
|
+
}}return false;
|
1184
|
+
};
|
1185
|
+
SimileAjax.SortedArray.prototype.removeAll=function(){this._a=[];
|
1186
|
+
};
|
1187
|
+
SimileAjax.SortedArray.prototype.elementAt=function(A){return this._a[A];
|
1188
|
+
};
|
1189
|
+
SimileAjax.SortedArray.prototype.length=function(){return this._a.length;
|
1190
|
+
};
|
1191
|
+
SimileAjax.SortedArray.prototype.find=function(D){var B=0;
|
1192
|
+
var A=this._a.length;
|
1193
|
+
while(B<A){var C=Math.floor((B+A)/2);
|
1194
|
+
var E=D(this._a[C]);
|
1195
|
+
if(C==B){return E<0?B+1:B;
|
1196
|
+
}else{if(E<0){B=C;
|
1197
|
+
}else{A=C;
|
1198
|
+
}}}return B;
|
1199
|
+
};
|
1200
|
+
SimileAjax.SortedArray.prototype.getFirst=function(){return(this._a.length>0)?this._a[0]:null;
|
1201
|
+
};
|
1202
|
+
SimileAjax.SortedArray.prototype.getLast=function(){return(this._a.length>0)?this._a[this._a.length-1]:null;
|
1203
|
+
};
|
1204
|
+
SimileAjax.EventIndex=function(B){var A=this;
|
1205
|
+
this._unit=(B!=null)?B:SimileAjax.NativeDateUnit;
|
1206
|
+
this._events=new SimileAjax.SortedArray(function(C,D){return A._unit.compare(C.getStart(),D.getStart());
|
1207
|
+
});
|
1208
|
+
this._idToEvent={};
|
1209
|
+
this._indexed=true;
|
1210
|
+
};
|
1211
|
+
SimileAjax.EventIndex.prototype.getUnit=function(){return this._unit;
|
1212
|
+
};
|
1213
|
+
SimileAjax.EventIndex.prototype.getEvent=function(A){return this._idToEvent[A];
|
1214
|
+
};
|
1215
|
+
SimileAjax.EventIndex.prototype.add=function(A){this._events.add(A);
|
1216
|
+
this._idToEvent[A.getID()]=A;
|
1217
|
+
this._indexed=false;
|
1218
|
+
};
|
1219
|
+
SimileAjax.EventIndex.prototype.removeAll=function(){this._events.removeAll();
|
1220
|
+
this._idToEvent={};
|
1221
|
+
this._indexed=false;
|
1222
|
+
};
|
1223
|
+
SimileAjax.EventIndex.prototype.getCount=function(){return this._events.length();
|
1224
|
+
};
|
1225
|
+
SimileAjax.EventIndex.prototype.getIterator=function(A,B){if(!this._indexed){this._index();
|
1226
|
+
}return new SimileAjax.EventIndex._Iterator(this._events,A,B,this._unit);
|
1227
|
+
};
|
1228
|
+
SimileAjax.EventIndex.prototype.getReverseIterator=function(A,B){if(!this._indexed){this._index();
|
1229
|
+
}return new SimileAjax.EventIndex._ReverseIterator(this._events,A,B,this._unit);
|
1230
|
+
};
|
1231
|
+
SimileAjax.EventIndex.prototype.getAllIterator=function(){return new SimileAjax.EventIndex._AllIterator(this._events);
|
1232
|
+
};
|
1233
|
+
SimileAjax.EventIndex.prototype.getEarliestDate=function(){var A=this._events.getFirst();
|
1234
|
+
return(A==null)?null:A.getStart();
|
1235
|
+
};
|
1236
|
+
SimileAjax.EventIndex.prototype.getLatestDate=function(){var A=this._events.getLast();
|
1237
|
+
if(A==null){return null;
|
1238
|
+
}if(!this._indexed){this._index();
|
1239
|
+
}var C=A._earliestOverlapIndex;
|
1240
|
+
var B=this._events.elementAt(C).getEnd();
|
1241
|
+
for(var D=C+1;
|
1242
|
+
D<this._events.length();
|
1243
|
+
D++){B=this._unit.later(B,this._events.elementAt(D).getEnd());
|
1244
|
+
}return B;
|
1245
|
+
};
|
1246
|
+
SimileAjax.EventIndex.prototype._index=function(){var E=this._events.length();
|
1247
|
+
for(var F=0;
|
1248
|
+
F<E;
|
1249
|
+
F++){var D=this._events.elementAt(F);
|
1250
|
+
D._earliestOverlapIndex=F;
|
1251
|
+
}var G=1;
|
1252
|
+
for(var F=0;
|
1253
|
+
F<E;
|
1254
|
+
F++){var D=this._events.elementAt(F);
|
1255
|
+
var C=D.getEnd();
|
1256
|
+
G=Math.max(G,F+1);
|
1257
|
+
while(G<E){var A=this._events.elementAt(G);
|
1258
|
+
var B=A.getStart();
|
1259
|
+
if(this._unit.compare(B,C)<0){A._earliestOverlapIndex=F;
|
1260
|
+
G++;
|
1261
|
+
}else{break;
|
1262
|
+
}}}this._indexed=true;
|
1263
|
+
};
|
1264
|
+
SimileAjax.EventIndex._Iterator=function(A,C,D,B){this._events=A;
|
1265
|
+
this._startDate=C;
|
1266
|
+
this._endDate=D;
|
1267
|
+
this._unit=B;
|
1268
|
+
this._currentIndex=A.find(function(E){return B.compare(E.getStart(),C);
|
1269
|
+
});
|
1270
|
+
if(this._currentIndex-1>=0){this._currentIndex=this._events.elementAt(this._currentIndex-1)._earliestOverlapIndex;
|
1271
|
+
}this._currentIndex--;
|
1272
|
+
this._maxIndex=A.find(function(E){return B.compare(E.getStart(),D);
|
1273
|
+
});
|
1274
|
+
this._hasNext=false;
|
1275
|
+
this._next=null;
|
1276
|
+
this._findNext();
|
1277
|
+
};
|
1278
|
+
SimileAjax.EventIndex._Iterator.prototype={hasNext:function(){return this._hasNext;
|
1279
|
+
},next:function(){if(this._hasNext){var A=this._next;
|
1280
|
+
this._findNext();
|
1281
|
+
return A;
|
1282
|
+
}else{return null;
|
1283
|
+
}},_findNext:function(){var B=this._unit;
|
1284
|
+
while((++this._currentIndex)<this._maxIndex){var A=this._events.elementAt(this._currentIndex);
|
1285
|
+
if(B.compare(A.getStart(),this._endDate)<0&&B.compare(A.getEnd(),this._startDate)>0){this._next=A;
|
1286
|
+
this._hasNext=true;
|
1287
|
+
return ;
|
1288
|
+
}}this._next=null;
|
1289
|
+
this._hasNext=false;
|
1290
|
+
}};
|
1291
|
+
SimileAjax.EventIndex._ReverseIterator=function(A,C,D,B){this._events=A;
|
1292
|
+
this._startDate=C;
|
1293
|
+
this._endDate=D;
|
1294
|
+
this._unit=B;
|
1295
|
+
this._minIndex=A.find(function(E){return B.compare(E.getStart(),C);
|
1296
|
+
});
|
1297
|
+
if(this._minIndex-1>=0){this._minIndex=this._events.elementAt(this._minIndex-1)._earliestOverlapIndex;
|
1298
|
+
}this._maxIndex=A.find(function(E){return B.compare(E.getStart(),D);
|
1299
|
+
});
|
1300
|
+
this._currentIndex=this._maxIndex;
|
1301
|
+
this._hasNext=false;
|
1302
|
+
this._next=null;
|
1303
|
+
this._findNext();
|
1304
|
+
};
|
1305
|
+
SimileAjax.EventIndex._ReverseIterator.prototype={hasNext:function(){return this._hasNext;
|
1306
|
+
},next:function(){if(this._hasNext){var A=this._next;
|
1307
|
+
this._findNext();
|
1308
|
+
return A;
|
1309
|
+
}else{return null;
|
1310
|
+
}},_findNext:function(){var B=this._unit;
|
1311
|
+
while((--this._currentIndex)>=this._minIndex){var A=this._events.elementAt(this._currentIndex);
|
1312
|
+
if(B.compare(A.getStart(),this._endDate)<0&&B.compare(A.getEnd(),this._startDate)>0){this._next=A;
|
1313
|
+
this._hasNext=true;
|
1314
|
+
return ;
|
1315
|
+
}}this._next=null;
|
1316
|
+
this._hasNext=false;
|
1317
|
+
}};
|
1318
|
+
SimileAjax.EventIndex._AllIterator=function(A){this._events=A;
|
1319
|
+
this._index=0;
|
1320
|
+
};
|
1321
|
+
SimileAjax.EventIndex._AllIterator.prototype={hasNext:function(){return this._index<this._events.length();
|
1322
|
+
},next:function(){return this._index<this._events.length()?this._events.elementAt(this._index++):null;
|
1323
|
+
}};
|
1324
|
+
|
1325
|
+
|
1326
|
+
/* date-time.js */
|
1327
|
+
SimileAjax.DateTime=new Object();
|
1328
|
+
SimileAjax.DateTime.MILLISECOND=0;
|
1329
|
+
SimileAjax.DateTime.SECOND=1;
|
1330
|
+
SimileAjax.DateTime.MINUTE=2;
|
1331
|
+
SimileAjax.DateTime.HOUR=3;
|
1332
|
+
SimileAjax.DateTime.DAY=4;
|
1333
|
+
SimileAjax.DateTime.WEEK=5;
|
1334
|
+
SimileAjax.DateTime.MONTH=6;
|
1335
|
+
SimileAjax.DateTime.YEAR=7;
|
1336
|
+
SimileAjax.DateTime.DECADE=8;
|
1337
|
+
SimileAjax.DateTime.CENTURY=9;
|
1338
|
+
SimileAjax.DateTime.MILLENNIUM=10;
|
1339
|
+
SimileAjax.DateTime.EPOCH=-1;
|
1340
|
+
SimileAjax.DateTime.ERA=-2;
|
1341
|
+
SimileAjax.DateTime.gregorianUnitLengths=[];
|
1342
|
+
(function(){var B=SimileAjax.DateTime;
|
1343
|
+
var A=B.gregorianUnitLengths;
|
1344
|
+
A[B.MILLISECOND]=1;
|
1345
|
+
A[B.SECOND]=1000;
|
1346
|
+
A[B.MINUTE]=A[B.SECOND]*60;
|
1347
|
+
A[B.HOUR]=A[B.MINUTE]*60;
|
1348
|
+
A[B.DAY]=A[B.HOUR]*24;
|
1349
|
+
A[B.WEEK]=A[B.DAY]*7;
|
1350
|
+
A[B.MONTH]=A[B.DAY]*31;
|
1351
|
+
A[B.YEAR]=A[B.DAY]*365;
|
1352
|
+
A[B.DECADE]=A[B.YEAR]*10;
|
1353
|
+
A[B.CENTURY]=A[B.YEAR]*100;
|
1354
|
+
A[B.MILLENNIUM]=A[B.YEAR]*1000;
|
1355
|
+
})();
|
1356
|
+
SimileAjax.DateTime._dateRegexp=new RegExp("^(-?)([0-9]{4})("+["(-?([0-9]{2})(-?([0-9]{2}))?)","(-?([0-9]{3}))","(-?W([0-9]{2})(-?([1-7]))?)"].join("|")+")?$");
|
1357
|
+
SimileAjax.DateTime._timezoneRegexp=new RegExp("Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$");
|
1358
|
+
SimileAjax.DateTime._timeRegexp=new RegExp("^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$");
|
1359
|
+
SimileAjax.DateTime.setIso8601Date=function(G,C){var I=C.match(SimileAjax.DateTime._dateRegexp);
|
1360
|
+
if(!I){throw new Error("Invalid date string: "+C);
|
1361
|
+
}var B=(I[1]=="-")?-1:1;
|
1362
|
+
var J=B*I[2];
|
1363
|
+
var H=I[5];
|
1364
|
+
var D=I[7];
|
1365
|
+
var F=I[9];
|
1366
|
+
var A=I[11];
|
1367
|
+
var M=(I[13])?I[13]:1;
|
1368
|
+
G.setUTCFullYear(J);
|
1369
|
+
if(F){G.setUTCMonth(0);
|
1370
|
+
G.setUTCDate(Number(F));
|
1371
|
+
}else{if(A){G.setUTCMonth(0);
|
1372
|
+
G.setUTCDate(1);
|
1373
|
+
var L=G.getUTCDay();
|
1374
|
+
var K=(L)?L:7;
|
1375
|
+
var E=Number(M)+(7*Number(A));
|
1376
|
+
if(K<=4){G.setUTCDate(E+1-K);
|
1377
|
+
}else{G.setUTCDate(E+8-K);
|
1378
|
+
}}else{if(H){G.setUTCDate(1);
|
1379
|
+
G.setUTCMonth(H-1);
|
1380
|
+
}if(D){G.setUTCDate(D);
|
1381
|
+
}}}return G;
|
1382
|
+
};
|
1383
|
+
SimileAjax.DateTime.setIso8601Time=function(F,D){var G=D.match(SimileAjax.DateTime._timeRegexp);
|
1384
|
+
if(!G){SimileAjax.Debug.warn("Invalid time string: "+D);
|
1385
|
+
return false;
|
1386
|
+
}var A=G[1];
|
1387
|
+
var E=Number((G[3])?G[3]:0);
|
1388
|
+
var C=(G[5])?G[5]:0;
|
1389
|
+
var B=G[7]?(Number("0."+G[7])*1000):0;
|
1390
|
+
F.setUTCHours(A);
|
1391
|
+
F.setUTCMinutes(E);
|
1392
|
+
F.setUTCSeconds(C);
|
1393
|
+
F.setUTCMilliseconds(B);
|
1394
|
+
return F;
|
1395
|
+
};
|
1396
|
+
SimileAjax.DateTime.timezoneOffset=new Date().getTimezoneOffset();
|
1397
|
+
SimileAjax.DateTime.setIso8601=function(B,A){var D=null;
|
1398
|
+
var E=(A.indexOf("T")==-1)?A.split(" "):A.split("T");
|
1399
|
+
SimileAjax.DateTime.setIso8601Date(B,E[0]);
|
1400
|
+
if(E.length==2){var C=E[1].match(SimileAjax.DateTime._timezoneRegexp);
|
1401
|
+
if(C){if(C[0]=="Z"){D=0;
|
1402
|
+
}else{D=(Number(C[3])*60)+Number(C[5]);
|
1403
|
+
D*=((C[2]=="-")?1:-1);
|
1404
|
+
}E[1]=E[1].substr(0,E[1].length-C[0].length);
|
1405
|
+
}SimileAjax.DateTime.setIso8601Time(B,E[1]);
|
1406
|
+
}if(D==null){D=B.getTimezoneOffset();
|
1407
|
+
}B.setTime(B.getTime()+D*60000);
|
1408
|
+
return B;
|
1409
|
+
};
|
1410
|
+
SimileAjax.DateTime.parseIso8601DateTime=function(A){try{return SimileAjax.DateTime.setIso8601(new Date(0),A);
|
1411
|
+
}catch(B){return null;
|
1412
|
+
}};
|
1413
|
+
SimileAjax.DateTime.parseGregorianDateTime=function(F){if(F==null){return null;
|
1414
|
+
}else{if(F instanceof Date){return F;
|
1415
|
+
}}var B=F.toString();
|
1416
|
+
if(B.length>0&&B.length<8){var C=B.indexOf(" ");
|
1417
|
+
if(C>0){var A=parseInt(B.substr(0,C));
|
1418
|
+
var G=B.substr(C+1);
|
1419
|
+
if(G.toLowerCase()=="bc"){A=1-A;
|
1420
|
+
}}else{var A=parseInt(B);
|
1421
|
+
}var E=new Date(0);
|
1422
|
+
E.setUTCFullYear(A);
|
1423
|
+
return E;
|
1424
|
+
}try{return new Date(Date.parse(B));
|
1425
|
+
}catch(D){return null;
|
1426
|
+
}};
|
1427
|
+
SimileAjax.DateTime.roundDownToInterval=function(E,B,I,K,A){var F=I*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR];
|
1428
|
+
var J=new Date(E.getTime()+F);
|
1429
|
+
var C=function(L){L.setUTCMilliseconds(0);
|
1430
|
+
L.setUTCSeconds(0);
|
1431
|
+
L.setUTCMinutes(0);
|
1432
|
+
L.setUTCHours(0);
|
1433
|
+
};
|
1434
|
+
var D=function(L){C(L);
|
1435
|
+
L.setUTCDate(1);
|
1436
|
+
L.setUTCMonth(0);
|
1437
|
+
};
|
1438
|
+
switch(B){case SimileAjax.DateTime.MILLISECOND:var H=J.getUTCMilliseconds();
|
1439
|
+
J.setUTCMilliseconds(H-(H%K));
|
1440
|
+
break;
|
1441
|
+
case SimileAjax.DateTime.SECOND:J.setUTCMilliseconds(0);
|
1442
|
+
var H=J.getUTCSeconds();
|
1443
|
+
J.setUTCSeconds(H-(H%K));
|
1444
|
+
break;
|
1445
|
+
case SimileAjax.DateTime.MINUTE:J.setUTCMilliseconds(0);
|
1446
|
+
J.setUTCSeconds(0);
|
1447
|
+
var H=J.getUTCMinutes();
|
1448
|
+
J.setTime(J.getTime()-(H%K)*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);
|
1449
|
+
break;
|
1450
|
+
case SimileAjax.DateTime.HOUR:J.setUTCMilliseconds(0);
|
1451
|
+
J.setUTCSeconds(0);
|
1452
|
+
J.setUTCMinutes(0);
|
1453
|
+
var H=J.getUTCHours();
|
1454
|
+
J.setUTCHours(H-(H%K));
|
1455
|
+
break;
|
1456
|
+
case SimileAjax.DateTime.DAY:C(J);
|
1457
|
+
break;
|
1458
|
+
case SimileAjax.DateTime.WEEK:C(J);
|
1459
|
+
var G=(J.getUTCDay()+7-A)%7;
|
1460
|
+
J.setTime(J.getTime()-G*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.DAY]);
|
1461
|
+
break;
|
1462
|
+
case SimileAjax.DateTime.MONTH:C(J);
|
1463
|
+
J.setUTCDate(1);
|
1464
|
+
var H=J.getUTCMonth();
|
1465
|
+
J.setUTCMonth(H-(H%K));
|
1466
|
+
break;
|
1467
|
+
case SimileAjax.DateTime.YEAR:D(J);
|
1468
|
+
var H=J.getUTCFullYear();
|
1469
|
+
J.setUTCFullYear(H-(H%K));
|
1470
|
+
break;
|
1471
|
+
case SimileAjax.DateTime.DECADE:D(J);
|
1472
|
+
J.setUTCFullYear(Math.floor(J.getUTCFullYear()/10)*10);
|
1473
|
+
break;
|
1474
|
+
case SimileAjax.DateTime.CENTURY:D(J);
|
1475
|
+
J.setUTCFullYear(Math.floor(J.getUTCFullYear()/100)*100);
|
1476
|
+
break;
|
1477
|
+
case SimileAjax.DateTime.MILLENNIUM:D(J);
|
1478
|
+
J.setUTCFullYear(Math.floor(J.getUTCFullYear()/1000)*1000);
|
1479
|
+
break;
|
1480
|
+
}E.setTime(J.getTime()-F);
|
1481
|
+
};
|
1482
|
+
SimileAjax.DateTime.roundUpToInterval=function(C,F,D,A,B){var E=C.getTime();
|
1483
|
+
SimileAjax.DateTime.roundDownToInterval(C,F,D,A,B);
|
1484
|
+
if(C.getTime()<E){C.setTime(C.getTime()+SimileAjax.DateTime.gregorianUnitLengths[F]*A);
|
1485
|
+
}};
|
1486
|
+
SimileAjax.DateTime.incrementByInterval=function(A,D,B){B=(typeof B=="undefined")?0:B;
|
1487
|
+
var E=B*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR];
|
1488
|
+
var C=new Date(A.getTime()+E);
|
1489
|
+
switch(D){case SimileAjax.DateTime.MILLISECOND:C.setTime(C.getTime()+1);
|
1490
|
+
break;
|
1491
|
+
case SimileAjax.DateTime.SECOND:C.setTime(C.getTime()+1000);
|
1492
|
+
break;
|
1493
|
+
case SimileAjax.DateTime.MINUTE:C.setTime(C.getTime()+SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);
|
1494
|
+
break;
|
1495
|
+
case SimileAjax.DateTime.HOUR:C.setTime(C.getTime()+SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR]);
|
1496
|
+
break;
|
1497
|
+
case SimileAjax.DateTime.DAY:C.setUTCDate(C.getUTCDate()+1);
|
1498
|
+
break;
|
1499
|
+
case SimileAjax.DateTime.WEEK:C.setUTCDate(C.getUTCDate()+7);
|
1500
|
+
break;
|
1501
|
+
case SimileAjax.DateTime.MONTH:C.setUTCMonth(C.getUTCMonth()+1);
|
1502
|
+
break;
|
1503
|
+
case SimileAjax.DateTime.YEAR:C.setUTCFullYear(C.getUTCFullYear()+1);
|
1504
|
+
break;
|
1505
|
+
case SimileAjax.DateTime.DECADE:C.setUTCFullYear(C.getUTCFullYear()+10);
|
1506
|
+
break;
|
1507
|
+
case SimileAjax.DateTime.CENTURY:C.setUTCFullYear(C.getUTCFullYear()+100);
|
1508
|
+
break;
|
1509
|
+
case SimileAjax.DateTime.MILLENNIUM:C.setUTCFullYear(C.getUTCFullYear()+1000);
|
1510
|
+
break;
|
1511
|
+
}A.setTime(C.getTime()-E);
|
1512
|
+
};
|
1513
|
+
SimileAjax.DateTime.removeTimeZoneOffset=function(A,B){return new Date(A.getTime()+B*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR]);
|
1514
|
+
};
|
1515
|
+
SimileAjax.DateTime.getTimezone=function(){var A=new Date().getTimezoneOffset();
|
1516
|
+
return A/-60;
|
1517
|
+
};
|
1518
|
+
|
1519
|
+
|
1520
|
+
/* debug.js */
|
1521
|
+
SimileAjax.Debug={silent:false};
|
1522
|
+
SimileAjax.Debug.log=function(B){var A;
|
1523
|
+
if("console" in window&&"log" in window.console){A=function(C){console.log(C);
|
1524
|
+
};
|
1525
|
+
}else{A=function(C){if(!SimileAjax.Debug.silent){alert(C);
|
1526
|
+
}};
|
1527
|
+
}SimileAjax.Debug.log=A;
|
1528
|
+
A(B);
|
1529
|
+
};
|
1530
|
+
SimileAjax.Debug.warn=function(B){var A;
|
1531
|
+
if("console" in window&&"warn" in window.console){A=function(C){console.warn(C);
|
1532
|
+
};
|
1533
|
+
}else{A=function(C){if(!SimileAjax.Debug.silent){alert(C);
|
1534
|
+
}};
|
1535
|
+
}SimileAjax.Debug.warn=A;
|
1536
|
+
A(B);
|
1537
|
+
};
|
1538
|
+
SimileAjax.Debug.exception=function(B,D){var A,C=SimileAjax.parseURLParameters();
|
1539
|
+
if(C.errors=="throw"||SimileAjax.params.errors=="throw"){A=function(F,E){throw (F);
|
1540
|
+
};
|
1541
|
+
}else{if("console" in window&&"error" in window.console){A=function(F,E){if(E!=null){console.error(E+" %o",F);
|
1542
|
+
}else{console.error(F);
|
1543
|
+
}throw (F);
|
1544
|
+
};
|
1545
|
+
}else{A=function(F,E){if(!SimileAjax.Debug.silent){alert("Caught exception: "+E+"\n\nDetails: "+("description" in F?F.description:F));
|
1546
|
+
}throw (F);
|
1547
|
+
};
|
1548
|
+
}}SimileAjax.Debug.exception=A;
|
1549
|
+
A(B,D);
|
1550
|
+
};
|
1551
|
+
SimileAjax.Debug.objectToString=function(A){return SimileAjax.Debug._objectToString(A,"");
|
1552
|
+
};
|
1553
|
+
SimileAjax.Debug._objectToString=function(D,C){var B=C+" ";
|
1554
|
+
if(typeof D=="object"){var A="{";
|
1555
|
+
for(E in D){A+=B+E+": "+SimileAjax.Debug._objectToString(D[E],B)+"\n";
|
1556
|
+
}A+=C+"}";
|
1557
|
+
return A;
|
1558
|
+
}else{if(typeof D=="array"){var A="[";
|
1559
|
+
for(var E=0;
|
1560
|
+
E<D.length;
|
1561
|
+
E++){A+=SimileAjax.Debug._objectToString(D[E],B)+"\n";
|
1562
|
+
}A+=C+"]";
|
1563
|
+
return A;
|
1564
|
+
}else{return D;
|
1565
|
+
}}};
|
1566
|
+
|
1567
|
+
|
1568
|
+
/* dom.js */
|
1569
|
+
SimileAjax.DOM=new Object();
|
1570
|
+
SimileAjax.DOM.registerEventWithObject=function(C,A,D,B){SimileAjax.DOM.registerEvent(C,A,function(F,E,G){return D[B].call(D,F,E,G);
|
1571
|
+
});
|
1572
|
+
};
|
1573
|
+
SimileAjax.DOM.registerEvent=function(C,B,D){var A=function(E){E=(E)?E:((event)?event:null);
|
1574
|
+
if(E){var F=(E.target)?E.target:((E.srcElement)?E.srcElement:null);
|
1575
|
+
if(F){F=(F.nodeType==1||F.nodeType==9)?F:F.parentNode;
|
1576
|
+
}return D(C,E,F);
|
1577
|
+
}return true;
|
1578
|
+
};
|
1579
|
+
if(SimileAjax.Platform.browser.isIE){C.attachEvent("on"+B,A);
|
1580
|
+
}else{C.addEventListener(B,A,false);
|
1581
|
+
}};
|
1582
|
+
SimileAjax.DOM.getPageCoordinates=function(B){var E=0;
|
1583
|
+
var D=0;
|
1584
|
+
if(B.nodeType!=1){B=B.parentNode;
|
1585
|
+
}var C=B;
|
1586
|
+
while(C!=null){E+=C.offsetLeft;
|
1587
|
+
D+=C.offsetTop;
|
1588
|
+
C=C.offsetParent;
|
1589
|
+
}var A=document.body;
|
1590
|
+
while(B!=null&&B!=A){if("scrollLeft" in B){E-=B.scrollLeft;
|
1591
|
+
D-=B.scrollTop;
|
1592
|
+
}B=B.parentNode;
|
1593
|
+
}return{left:E,top:D};
|
1594
|
+
};
|
1595
|
+
SimileAjax.DOM.getSize=function(B){var A=this.getStyle(B,"width");
|
1596
|
+
var C=this.getStyle(B,"height");
|
1597
|
+
if(A.indexOf("px")>-1){A=A.replace("px","");
|
1598
|
+
}if(C.indexOf("px")>-1){C=C.replace("px","");
|
1599
|
+
}return{w:A,h:C};
|
1600
|
+
};
|
1601
|
+
SimileAjax.DOM.getStyle=function(B,A){if(B.currentStyle){var C=B.currentStyle[A];
|
1602
|
+
}else{if(window.getComputedStyle){var C=document.defaultView.getComputedStyle(B,null).getPropertyValue(A);
|
1603
|
+
}else{var C="";
|
1604
|
+
}}return C;
|
1605
|
+
};
|
1606
|
+
SimileAjax.DOM.getEventRelativeCoordinates=function(B,C){if(SimileAjax.Platform.browser.isIE){if(B.type=="mousewheel"){var A=SimileAjax.DOM.getPageCoordinates(C);
|
1607
|
+
return{x:B.clientX-A.left,y:B.clientY-A.top};
|
1608
|
+
}else{return{x:B.offsetX,y:B.offsetY};
|
1609
|
+
}}else{var A=SimileAjax.DOM.getPageCoordinates(C);
|
1610
|
+
if((B.type=="DOMMouseScroll")&&SimileAjax.Platform.browser.isFirefox&&(SimileAjax.Platform.browser.majorVersion==2)){return{x:B.screenX-A.left,y:B.screenY-A.top};
|
1611
|
+
}else{return{x:B.pageX-A.left,y:B.pageY-A.top};
|
1612
|
+
}}};
|
1613
|
+
SimileAjax.DOM.getEventPageCoordinates=function(A){if(SimileAjax.Platform.browser.isIE){return{x:A.clientX+document.body.scrollLeft,y:A.clientY+document.body.scrollTop};
|
1614
|
+
}else{return{x:A.pageX,y:A.pageY};
|
1615
|
+
}};
|
1616
|
+
SimileAjax.DOM.hittest=function(A,C,B){return SimileAjax.DOM._hittest(document.body,A,C,B);
|
1617
|
+
};
|
1618
|
+
SimileAjax.DOM._hittest=function(C,L,K,A){var M=C.childNodes;
|
1619
|
+
outer:for(var G=0;
|
1620
|
+
G<M.length;
|
1621
|
+
G++){var H=M[G];
|
1622
|
+
for(var F=0;
|
1623
|
+
F<A.length;
|
1624
|
+
F++){if(H==A[F]){continue outer;
|
1625
|
+
}}if(H.offsetWidth==0&&H.offsetHeight==0){var B=SimileAjax.DOM._hittest(H,L,K,A);
|
1626
|
+
if(B!=H){return B;
|
1627
|
+
}}else{var J=0;
|
1628
|
+
var E=0;
|
1629
|
+
var D=H;
|
1630
|
+
while(D){J+=D.offsetTop;
|
1631
|
+
E+=D.offsetLeft;
|
1632
|
+
D=D.offsetParent;
|
1633
|
+
}if(E<=L&&J<=K&&(L-E)<H.offsetWidth&&(K-J)<H.offsetHeight){return SimileAjax.DOM._hittest(H,L,K,A);
|
1634
|
+
}else{if(H.nodeType==1&&H.tagName=="TR"){var I=SimileAjax.DOM._hittest(H,L,K,A);
|
1635
|
+
if(I!=H){return I;
|
1636
|
+
}}}}}return C;
|
1637
|
+
};
|
1638
|
+
SimileAjax.DOM.cancelEvent=function(A){A.returnValue=false;
|
1639
|
+
A.cancelBubble=true;
|
1640
|
+
if("preventDefault" in A){A.preventDefault();
|
1641
|
+
}};
|
1642
|
+
SimileAjax.DOM.appendClassName=function(D,A){var C=D.className.split(" ");
|
1643
|
+
for(var B=0;
|
1644
|
+
B<C.length;
|
1645
|
+
B++){if(C[B]==A){return ;
|
1646
|
+
}}C.push(A);
|
1647
|
+
D.className=C.join(" ");
|
1648
|
+
};
|
1649
|
+
SimileAjax.DOM.createInputElement=function(A){var B=document.createElement("div");
|
1650
|
+
B.innerHTML="<input type='"+A+"' />";
|
1651
|
+
return B.firstChild;
|
1652
|
+
};
|
1653
|
+
SimileAjax.DOM.createDOMFromTemplate=function(A){var B={};
|
1654
|
+
B.elmt=SimileAjax.DOM._createDOMFromTemplate(A,B,null);
|
1655
|
+
return B;
|
1656
|
+
};
|
1657
|
+
SimileAjax.DOM._createDOMFromTemplate=function(F,G,D){if(F==null){return null;
|
1658
|
+
}else{if(typeof F!="object"){var C=document.createTextNode(F);
|
1659
|
+
if(D!=null){D.appendChild(C);
|
1660
|
+
}return C;
|
1661
|
+
}else{var A=null;
|
1662
|
+
if("tag" in F){var J=F.tag;
|
1663
|
+
if(D!=null){if(J=="tr"){A=D.insertRow(D.rows.length);
|
1664
|
+
}else{if(J=="td"){A=D.insertCell(D.cells.length);
|
1665
|
+
}}}if(A==null){A=J=="input"?SimileAjax.DOM.createInputElement(F.type):document.createElement(J);
|
1666
|
+
if(D!=null){D.appendChild(A);
|
1667
|
+
}}}else{A=F.elmt;
|
1668
|
+
if(D!=null){D.appendChild(A);
|
1669
|
+
}}for(var B in F){var H=F[B];
|
1670
|
+
if(B=="field"){G[H]=A;
|
1671
|
+
}else{if(B=="className"){A.className=H;
|
1672
|
+
}else{if(B=="id"){A.id=H;
|
1673
|
+
}else{if(B=="title"){A.title=H;
|
1674
|
+
}else{if(B=="type"&&A.tagName=="input"){}else{if(B=="style"){for(n in H){var I=H[n];
|
1675
|
+
if(n=="float"){n=SimileAjax.Platform.browser.isIE?"styleFloat":"cssFloat";
|
1676
|
+
}A.style[n]=I;
|
1677
|
+
}}else{if(B=="children"){for(var E=0;
|
1678
|
+
E<H.length;
|
1679
|
+
E++){SimileAjax.DOM._createDOMFromTemplate(H[E],G,A);
|
1680
|
+
}}else{if(B!="tag"&&B!="elmt"){A.setAttribute(B,H);
|
1681
|
+
}}}}}}}}}return A;
|
1682
|
+
}}};
|
1683
|
+
SimileAjax.DOM._cachedParent=null;
|
1684
|
+
SimileAjax.DOM.createElementFromString=function(A){if(SimileAjax.DOM._cachedParent==null){SimileAjax.DOM._cachedParent=document.createElement("div");
|
1685
|
+
}SimileAjax.DOM._cachedParent.innerHTML=A;
|
1686
|
+
return SimileAjax.DOM._cachedParent.firstChild;
|
1687
|
+
};
|
1688
|
+
SimileAjax.DOM.createDOMFromString=function(A,C,D){var B=typeof A=="string"?document.createElement(A):A;
|
1689
|
+
B.innerHTML=C;
|
1690
|
+
var E={elmt:B};
|
1691
|
+
SimileAjax.DOM._processDOMChildrenConstructedFromString(E,B,D!=null?D:{});
|
1692
|
+
return E;
|
1693
|
+
};
|
1694
|
+
SimileAjax.DOM._processDOMConstructedFromString=function(D,A,B){var E=A.id;
|
1695
|
+
if(E!=null&&E.length>0){A.removeAttribute("id");
|
1696
|
+
if(E in B){var C=A.parentNode;
|
1697
|
+
C.insertBefore(B[E],A);
|
1698
|
+
C.removeChild(A);
|
1699
|
+
D[E]=B[E];
|
1700
|
+
return ;
|
1701
|
+
}else{D[E]=A;
|
1702
|
+
}}if(A.hasChildNodes()){SimileAjax.DOM._processDOMChildrenConstructedFromString(D,A,B);
|
1703
|
+
}};
|
1704
|
+
SimileAjax.DOM._processDOMChildrenConstructedFromString=function(E,B,D){var C=B.firstChild;
|
1705
|
+
while(C!=null){var A=C.nextSibling;
|
1706
|
+
if(C.nodeType==1){SimileAjax.DOM._processDOMConstructedFromString(E,C,D);
|
1707
|
+
}C=A;
|
1708
|
+
}};
|
1709
|
+
|
1710
|
+
|
1711
|
+
/* graphics.js */
|
1712
|
+
SimileAjax.Graphics=new Object();
|
1713
|
+
SimileAjax.Graphics.pngIsTranslucent=(!SimileAjax.Platform.browser.isIE)||(SimileAjax.Platform.browser.majorVersion>6);
|
1714
|
+
if(!SimileAjax.Graphics.pngIsTranslucent){SimileAjax.includeCssFile(document,SimileAjax.urlPrefix+"styles/graphics-ie6.css");
|
1715
|
+
}SimileAjax.Graphics._createTranslucentImage1=function(A,C){var B=document.createElement("img");
|
1716
|
+
B.setAttribute("src",A);
|
1717
|
+
if(C!=null){B.style.verticalAlign=C;
|
1718
|
+
}return B;
|
1719
|
+
};
|
1720
|
+
SimileAjax.Graphics._createTranslucentImage2=function(A,C){var B=document.createElement("img");
|
1721
|
+
B.style.width="1px";
|
1722
|
+
B.style.height="1px";
|
1723
|
+
B.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='image')";
|
1724
|
+
B.style.verticalAlign=(C!=null)?C:"middle";
|
1725
|
+
return B;
|
1726
|
+
};
|
1727
|
+
SimileAjax.Graphics.createTranslucentImage=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImage1:SimileAjax.Graphics._createTranslucentImage2;
|
1728
|
+
SimileAjax.Graphics._createTranslucentImageHTML1=function(A,B){return'<img src="'+A+'"'+(B!=null?' style="vertical-align: '+B+';"':"")+" />";
|
1729
|
+
};
|
1730
|
+
SimileAjax.Graphics._createTranslucentImageHTML2=function(A,C){var B="width: 1px; height: 1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='image');"+(C!=null?" vertical-align: "+C+";":"");
|
1731
|
+
return"<img src='"+A+"' style=\""+B+'" />';
|
1732
|
+
};
|
1733
|
+
SimileAjax.Graphics.createTranslucentImageHTML=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImageHTML1:SimileAjax.Graphics._createTranslucentImageHTML2;
|
1734
|
+
SimileAjax.Graphics.setOpacity=function(B,A){if(SimileAjax.Platform.browser.isIE){B.style.filter="progid:DXImageTransform.Microsoft.Alpha(Style=0,Opacity="+A+")";
|
1735
|
+
}else{var C=(A/100).toString();
|
1736
|
+
B.style.opacity=C;
|
1737
|
+
B.style.MozOpacity=C;
|
1738
|
+
}};
|
1739
|
+
SimileAjax.Graphics.bubbleConfig={containerCSSClass:"simileAjax-bubble-container",innerContainerCSSClass:"simileAjax-bubble-innerContainer",contentContainerCSSClass:"simileAjax-bubble-contentContainer",borderGraphicSize:50,borderGraphicCSSClassPrefix:"simileAjax-bubble-border-",arrowGraphicTargetOffset:33,arrowGraphicLength:100,arrowGraphicWidth:49,arrowGraphicCSSClassPrefix:"simileAjax-bubble-arrow-",closeGraphicCSSClass:"simileAjax-bubble-close",extraPadding:20};
|
1740
|
+
SimileAjax.Graphics.createBubbleForContentAndPoint=function(F,E,C,B,D,A){if(typeof B!="number"){B=300;
|
1741
|
+
}if(typeof A!="number"){A=0;
|
1742
|
+
}F.style.position="absolute";
|
1743
|
+
F.style.left="-5000px";
|
1744
|
+
F.style.top="0px";
|
1745
|
+
F.style.width=B+"px";
|
1746
|
+
document.body.appendChild(F);
|
1747
|
+
window.setTimeout(function(){var H=F.scrollWidth+10;
|
1748
|
+
var J=F.scrollHeight+10;
|
1749
|
+
var G=0;
|
1750
|
+
if(A>0&&J>A){J=A;
|
1751
|
+
G=H-25;
|
1752
|
+
}var I=SimileAjax.Graphics.createBubbleForPoint(E,C,H,J,D);
|
1753
|
+
document.body.removeChild(F);
|
1754
|
+
F.style.position="static";
|
1755
|
+
F.style.left="";
|
1756
|
+
F.style.top="";
|
1757
|
+
if(G>0){var K=document.createElement("div");
|
1758
|
+
F.style.width="";
|
1759
|
+
K.style.width=G+"px";
|
1760
|
+
K.appendChild(F);
|
1761
|
+
I.content.appendChild(K);
|
1762
|
+
}else{F.style.width=H+"px";
|
1763
|
+
I.content.appendChild(F);
|
1764
|
+
}},200);
|
1765
|
+
};
|
1766
|
+
SimileAjax.Graphics.createBubbleForPoint=function(B,A,J,N,F){J=parseInt(J,10);
|
1767
|
+
N=parseInt(N,10);
|
1768
|
+
var E=SimileAjax.Graphics.bubbleConfig;
|
1769
|
+
var M=SimileAjax.Graphics.pngIsTranslucent?"pngTranslucent":"pngNotTranslucent";
|
1770
|
+
var L=J+2*E.borderGraphicSize;
|
1771
|
+
var O=N+2*E.borderGraphicSize;
|
1772
|
+
var K=function(S){return S+" "+S+"-"+M;
|
1773
|
+
};
|
1774
|
+
var H=document.createElement("div");
|
1775
|
+
H.className=K(E.containerCSSClass);
|
1776
|
+
H.style.width=J+"px";
|
1777
|
+
H.style.height=N+"px";
|
1778
|
+
var D=document.createElement("div");
|
1779
|
+
D.className=K(E.innerContainerCSSClass);
|
1780
|
+
H.appendChild(D);
|
1781
|
+
var I=function(){if(!Q._closed){document.body.removeChild(Q._div);
|
1782
|
+
Q._doc=null;
|
1783
|
+
Q._div=null;
|
1784
|
+
Q._content=null;
|
1785
|
+
Q._closed=true;
|
1786
|
+
}};
|
1787
|
+
var Q={_closed:false};
|
1788
|
+
var R=SimileAjax.WindowManager.pushLayer(I,true,H);
|
1789
|
+
Q._div=H;
|
1790
|
+
Q.close=function(){SimileAjax.WindowManager.popLayer(R);
|
1791
|
+
};
|
1792
|
+
var G=function(T){var S=document.createElement("div");
|
1793
|
+
S.className=K(E.borderGraphicCSSClassPrefix+T);
|
1794
|
+
D.appendChild(S);
|
1795
|
+
};
|
1796
|
+
G("top-left");
|
1797
|
+
G("top-right");
|
1798
|
+
G("bottom-left");
|
1799
|
+
G("bottom-right");
|
1800
|
+
G("left");
|
1801
|
+
G("right");
|
1802
|
+
G("top");
|
1803
|
+
G("bottom");
|
1804
|
+
var C=document.createElement("div");
|
1805
|
+
C.className=K(E.contentContainerCSSClass);
|
1806
|
+
D.appendChild(C);
|
1807
|
+
Q.content=C;
|
1808
|
+
var P=document.createElement("div");
|
1809
|
+
P.className=K(E.closeGraphicCSSClass);
|
1810
|
+
D.appendChild(P);
|
1811
|
+
SimileAjax.WindowManager.registerEventWithObject(P,"click",Q,"close");
|
1812
|
+
(function(){var Y=SimileAjax.Graphics.getWindowDimensions();
|
1813
|
+
var T=Y.w;
|
1814
|
+
var U=Y.h;
|
1815
|
+
var V=Math.ceil(E.arrowGraphicWidth/2);
|
1816
|
+
var Z=function(b){var a=document.createElement("div");
|
1817
|
+
a.className=K(E.arrowGraphicCSSClassPrefix+"point-"+b);
|
1818
|
+
D.appendChild(a);
|
1819
|
+
return a;
|
1820
|
+
};
|
1821
|
+
if(B-V-E.borderGraphicSize-E.extraPadding>0&&B+V+E.borderGraphicSize+E.extraPadding<T){var X=B-Math.round(J/2);
|
1822
|
+
X=B<(T/2)?Math.max(X,E.extraPadding+E.borderGraphicSize):Math.min(X,T-E.extraPadding-E.borderGraphicSize-J);
|
1823
|
+
if((F&&F=="top")||(!F&&(A-E.arrowGraphicTargetOffset-N-E.borderGraphicSize-E.extraPadding>0))){var S=Z("down");
|
1824
|
+
S.style.left=(B-V-X)+"px";
|
1825
|
+
H.style.left=X+"px";
|
1826
|
+
H.style.top=(A-E.arrowGraphicTargetOffset-N)+"px";
|
1827
|
+
return ;
|
1828
|
+
}else{if((F&&F=="bottom")||(!F&&(A+E.arrowGraphicTargetOffset+N+E.borderGraphicSize+E.extraPadding<U))){var S=Z("up");
|
1829
|
+
S.style.left=(B-V-X)+"px";
|
1830
|
+
H.style.left=X+"px";
|
1831
|
+
H.style.top=(A+E.arrowGraphicTargetOffset)+"px";
|
1832
|
+
return ;
|
1833
|
+
}}}var W=A-Math.round(N/2);
|
1834
|
+
W=A<(U/2)?Math.max(W,E.extraPadding+E.borderGraphicSize):Math.min(W,U-E.extraPadding-E.borderGraphicSize-N);
|
1835
|
+
if((F&&F=="left")||(!F&&(B-E.arrowGraphicTargetOffset-J-E.borderGraphicSize-E.extraPadding>0))){var S=Z("right");
|
1836
|
+
S.style.top=(A-V-W)+"px";
|
1837
|
+
H.style.top=W+"px";
|
1838
|
+
H.style.left=(B-E.arrowGraphicTargetOffset-J)+"px";
|
1839
|
+
}else{var S=Z("left");
|
1840
|
+
S.style.top=(A-V-W)+"px";
|
1841
|
+
H.style.top=W+"px";
|
1842
|
+
H.style.left=(B+E.arrowGraphicTargetOffset)+"px";
|
1843
|
+
}})();
|
1844
|
+
document.body.appendChild(H);
|
1845
|
+
return Q;
|
1846
|
+
};
|
1847
|
+
SimileAjax.Graphics.getWindowDimensions=function(){if(typeof window.innerHeight=="number"){return{w:window.innerWidth,h:window.innerHeight};
|
1848
|
+
}else{if(document.documentElement&&document.documentElement.clientHeight){return{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight};
|
1849
|
+
}else{if(document.body&&document.body.clientHeight){return{w:document.body.clientWidth,h:document.body.clientHeight};
|
1850
|
+
}}}};
|
1851
|
+
SimileAjax.Graphics.createMessageBubble=function(H){var G=H.createElement("div");
|
1852
|
+
if(SimileAjax.Graphics.pngIsTranslucent){var I=H.createElement("div");
|
1853
|
+
I.style.height="33px";
|
1854
|
+
I.style.background="url("+SimileAjax.urlPrefix+"images/message-top-left.png) top left no-repeat";
|
1855
|
+
I.style.paddingLeft="44px";
|
1856
|
+
G.appendChild(I);
|
1857
|
+
var D=H.createElement("div");
|
1858
|
+
D.style.height="33px";
|
1859
|
+
D.style.background="url("+SimileAjax.urlPrefix+"images/message-top-right.png) top right no-repeat";
|
1860
|
+
I.appendChild(D);
|
1861
|
+
var F=H.createElement("div");
|
1862
|
+
F.style.background="url("+SimileAjax.urlPrefix+"images/message-left.png) top left repeat-y";
|
1863
|
+
F.style.paddingLeft="44px";
|
1864
|
+
G.appendChild(F);
|
1865
|
+
var B=H.createElement("div");
|
1866
|
+
B.style.background="url("+SimileAjax.urlPrefix+"images/message-right.png) top right repeat-y";
|
1867
|
+
B.style.paddingRight="44px";
|
1868
|
+
F.appendChild(B);
|
1869
|
+
var C=H.createElement("div");
|
1870
|
+
B.appendChild(C);
|
1871
|
+
var E=H.createElement("div");
|
1872
|
+
E.style.height="55px";
|
1873
|
+
E.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-left.png) bottom left no-repeat";
|
1874
|
+
E.style.paddingLeft="44px";
|
1875
|
+
G.appendChild(E);
|
1876
|
+
var A=H.createElement("div");
|
1877
|
+
A.style.height="55px";
|
1878
|
+
A.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-right.png) bottom right no-repeat";
|
1879
|
+
E.appendChild(A);
|
1880
|
+
}else{G.style.border="2px solid #7777AA";
|
1881
|
+
G.style.padding="20px";
|
1882
|
+
G.style.background="white";
|
1883
|
+
SimileAjax.Graphics.setOpacity(G,90);
|
1884
|
+
var C=H.createElement("div");
|
1885
|
+
G.appendChild(C);
|
1886
|
+
}return{containerDiv:G,contentDiv:C};
|
1887
|
+
};
|
1888
|
+
SimileAjax.Graphics.createAnimation=function(B,E,D,C,A){return new SimileAjax.Graphics._Animation(B,E,D,C,A);
|
1889
|
+
};
|
1890
|
+
SimileAjax.Graphics._Animation=function(B,E,D,C,A){this.f=B;
|
1891
|
+
this.cont=(typeof A=="function")?A:function(){};
|
1892
|
+
this.from=E;
|
1893
|
+
this.to=D;
|
1894
|
+
this.current=E;
|
1895
|
+
this.duration=C;
|
1896
|
+
this.start=new Date().getTime();
|
1897
|
+
this.timePassed=0;
|
1898
|
+
};
|
1899
|
+
SimileAjax.Graphics._Animation.prototype.run=function(){var A=this;
|
1900
|
+
window.setTimeout(function(){A.step();
|
1901
|
+
},50);
|
1902
|
+
};
|
1903
|
+
SimileAjax.Graphics._Animation.prototype.step=function(){this.timePassed+=50;
|
1904
|
+
var A=this.timePassed/this.duration;
|
1905
|
+
var B=-Math.cos(A*Math.PI)/2+0.5;
|
1906
|
+
var D=B*(this.to-this.from)+this.from;
|
1907
|
+
try{this.f(D,D-this.current);
|
1908
|
+
}catch(C){}this.current=D;
|
1909
|
+
if(this.timePassed<this.duration){this.run();
|
1910
|
+
}else{this.f(this.to,0);
|
1911
|
+
this["cont"]();
|
1912
|
+
}};
|
1913
|
+
SimileAjax.Graphics.createStructuredDataCopyButton=function(F,B,D,E){var G=document.createElement("div");
|
1914
|
+
G.style.position="relative";
|
1915
|
+
G.style.display="inline";
|
1916
|
+
G.style.width=B+"px";
|
1917
|
+
G.style.height=D+"px";
|
1918
|
+
G.style.overflow="hidden";
|
1919
|
+
G.style.margin="2px";
|
1920
|
+
if(SimileAjax.Graphics.pngIsTranslucent){G.style.background="url("+F+") no-repeat";
|
1921
|
+
}else{G.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+F+"', sizingMethod='image')";
|
1922
|
+
}var A;
|
1923
|
+
if(SimileAjax.Platform.browser.isIE){A="filter:alpha(opacity=0)";
|
1924
|
+
}else{A="opacity: 0";
|
1925
|
+
}G.innerHTML="<textarea rows='1' autocomplete='off' value='none' style='"+A+"' />";
|
1926
|
+
var C=G.firstChild;
|
1927
|
+
C.style.width=B+"px";
|
1928
|
+
C.style.height=D+"px";
|
1929
|
+
C.onmousedown=function(H){H=(H)?H:((event)?event:null);
|
1930
|
+
if(H.button==2){C.value=E();
|
1931
|
+
C.select();
|
1932
|
+
}};
|
1933
|
+
return G;
|
1934
|
+
};
|
1935
|
+
SimileAjax.Graphics.getWidthHeight=function(C){var A,B;
|
1936
|
+
if(C.getBoundingClientRect==null){A=C.offsetWidth;
|
1937
|
+
B=C.offsetHeight;
|
1938
|
+
}else{var D=C.getBoundingClientRect();
|
1939
|
+
A=Math.ceil(D.right-D.left);
|
1940
|
+
B=Math.ceil(D.bottom-D.top);
|
1941
|
+
}return{width:A,height:B};
|
1942
|
+
};
|
1943
|
+
SimileAjax.Graphics.getFontRenderingContext=function(A,B){return new SimileAjax.Graphics._FontRenderingContext(A,B);
|
1944
|
+
};
|
1945
|
+
SimileAjax.Graphics._FontRenderingContext=function(A,B){this._elmt=A;
|
1946
|
+
this._elmt.style.visibility="hidden";
|
1947
|
+
if(typeof B=="string"){this._elmt.style.width=B;
|
1948
|
+
}else{if(typeof B=="number"){this._elmt.style.width=B+"px";
|
1949
|
+
}}};
|
1950
|
+
SimileAjax.Graphics._FontRenderingContext.prototype.dispose=function(){this._elmt=null;
|
1951
|
+
};
|
1952
|
+
SimileAjax.Graphics._FontRenderingContext.prototype.update=function(){this._elmt.innerHTML="A";
|
1953
|
+
this._lineHeight=this._elmt.offsetHeight;
|
1954
|
+
};
|
1955
|
+
SimileAjax.Graphics._FontRenderingContext.prototype.computeSize=function(D,B){var C=this._elmt;
|
1956
|
+
C.innerHTML=D;
|
1957
|
+
C.className=B===undefined?"":B;
|
1958
|
+
var A=SimileAjax.Graphics.getWidthHeight(C);
|
1959
|
+
C.className="";
|
1960
|
+
return A;
|
1961
|
+
};
|
1962
|
+
SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight=function(){return this._lineHeight;
|
1963
|
+
};
|
1964
|
+
|
1965
|
+
|
1966
|
+
/* history.js */
|
1967
|
+
SimileAjax.History={maxHistoryLength:10,historyFile:"__history__.html",enabled:true,_initialized:false,_listeners:new SimileAjax.ListenerQueue(),_actions:[],_baseIndex:0,_currentIndex:0,_plainDocumentTitle:document.title};
|
1968
|
+
SimileAjax.History.formatHistoryEntryTitle=function(A){return SimileAjax.History._plainDocumentTitle+" {"+A+"}";
|
1969
|
+
};
|
1970
|
+
SimileAjax.History.initialize=function(){if(SimileAjax.History._initialized){return ;
|
1971
|
+
}if(SimileAjax.History.enabled){var A=document.createElement("iframe");
|
1972
|
+
A.id="simile-ajax-history";
|
1973
|
+
A.style.position="absolute";
|
1974
|
+
A.style.width="10px";
|
1975
|
+
A.style.height="10px";
|
1976
|
+
A.style.top="0px";
|
1977
|
+
A.style.left="0px";
|
1978
|
+
A.style.visibility="hidden";
|
1979
|
+
A.src=SimileAjax.History.historyFile+"?0";
|
1980
|
+
document.body.appendChild(A);
|
1981
|
+
SimileAjax.DOM.registerEvent(A,"load",SimileAjax.History._handleIFrameOnLoad);
|
1982
|
+
SimileAjax.History._iframe=A;
|
1983
|
+
}SimileAjax.History._initialized=true;
|
1984
|
+
};
|
1985
|
+
SimileAjax.History.addListener=function(A){SimileAjax.History.initialize();
|
1986
|
+
SimileAjax.History._listeners.add(A);
|
1987
|
+
};
|
1988
|
+
SimileAjax.History.removeListener=function(A){SimileAjax.History.initialize();
|
1989
|
+
SimileAjax.History._listeners.remove(A);
|
1990
|
+
};
|
1991
|
+
SimileAjax.History.addAction=function(A){SimileAjax.History.initialize();
|
1992
|
+
SimileAjax.History._listeners.fire("onBeforePerform",[A]);
|
1993
|
+
window.setTimeout(function(){try{A.perform();
|
1994
|
+
SimileAjax.History._listeners.fire("onAfterPerform",[A]);
|
1995
|
+
if(SimileAjax.History.enabled){SimileAjax.History._actions=SimileAjax.History._actions.slice(0,SimileAjax.History._currentIndex-SimileAjax.History._baseIndex);
|
1996
|
+
SimileAjax.History._actions.push(A);
|
1997
|
+
SimileAjax.History._currentIndex++;
|
1998
|
+
var C=SimileAjax.History._actions.length-SimileAjax.History.maxHistoryLength;
|
1999
|
+
if(C>0){SimileAjax.History._actions=SimileAjax.History._actions.slice(C);
|
2000
|
+
SimileAjax.History._baseIndex+=C;
|
2001
|
+
}try{SimileAjax.History._iframe.contentWindow.location.search="?"+SimileAjax.History._currentIndex;
|
2002
|
+
}catch(B){var D=SimileAjax.History.formatHistoryEntryTitle(A.label);
|
2003
|
+
document.title=D;
|
2004
|
+
}}}catch(B){SimileAjax.Debug.exception(B,"Error adding action {"+A.label+"} to history");
|
2005
|
+
}},0);
|
2006
|
+
};
|
2007
|
+
SimileAjax.History.addLengthyAction=function(B,A,C){SimileAjax.History.addAction({perform:B,undo:A,label:C,uiLayer:SimileAjax.WindowManager.getBaseLayer(),lengthy:true});
|
2008
|
+
};
|
2009
|
+
SimileAjax.History._handleIFrameOnLoad=function(){try{var B=SimileAjax.History._iframe.contentWindow.location.search;
|
2010
|
+
var F=(B.length==0)?0:Math.max(0,parseInt(B.substr(1)));
|
2011
|
+
var D=function(){var G=F-SimileAjax.History._currentIndex;
|
2012
|
+
SimileAjax.History._currentIndex+=G;
|
2013
|
+
SimileAjax.History._baseIndex+=G;
|
2014
|
+
SimileAjax.History._iframe.contentWindow.location.search="?"+F;
|
2015
|
+
};
|
2016
|
+
if(F<SimileAjax.History._currentIndex){SimileAjax.History._listeners.fire("onBeforeUndoSeveral",[]);
|
2017
|
+
window.setTimeout(function(){while(SimileAjax.History._currentIndex>F&&SimileAjax.History._currentIndex>SimileAjax.History._baseIndex){SimileAjax.History._currentIndex--;
|
2018
|
+
var G=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];
|
2019
|
+
try{G.undo();
|
2020
|
+
}catch(H){SimileAjax.Debug.exception(H,"History: Failed to undo action {"+G.label+"}");
|
2021
|
+
}}SimileAjax.History._listeners.fire("onAfterUndoSeveral",[]);
|
2022
|
+
D();
|
2023
|
+
},0);
|
2024
|
+
}else{if(F>SimileAjax.History._currentIndex){SimileAjax.History._listeners.fire("onBeforeRedoSeveral",[]);
|
2025
|
+
window.setTimeout(function(){while(SimileAjax.History._currentIndex<F&&SimileAjax.History._currentIndex-SimileAjax.History._baseIndex<SimileAjax.History._actions.length){var G=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];
|
2026
|
+
try{G.perform();
|
2027
|
+
}catch(H){SimileAjax.Debug.exception(H,"History: Failed to redo action {"+G.label+"}");
|
2028
|
+
}SimileAjax.History._currentIndex++;
|
2029
|
+
}SimileAjax.History._listeners.fire("onAfterRedoSeveral",[]);
|
2030
|
+
D();
|
2031
|
+
},0);
|
2032
|
+
}else{var A=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex-1;
|
2033
|
+
var E=(A>=0&&A<SimileAjax.History._actions.length)?SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[A].label):SimileAjax.History._plainDocumentTitle;
|
2034
|
+
SimileAjax.History._iframe.contentWindow.document.title=E;
|
2035
|
+
document.title=E;
|
2036
|
+
}}}catch(C){}};
|
2037
|
+
SimileAjax.History.getNextUndoAction=function(){try{var A=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex-1;
|
2038
|
+
return SimileAjax.History._actions[A];
|
2039
|
+
}catch(B){return null;
|
2040
|
+
}};
|
2041
|
+
SimileAjax.History.getNextRedoAction=function(){try{var A=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex;
|
2042
|
+
return SimileAjax.History._actions[A];
|
2043
|
+
}catch(B){return null;
|
2044
|
+
}};
|
2045
|
+
|
2046
|
+
|
2047
|
+
/* html.js */
|
2048
|
+
SimileAjax.HTML=new Object();
|
2049
|
+
SimileAjax.HTML._e2uHash={};
|
2050
|
+
(function(){var A=SimileAjax.HTML._e2uHash;
|
2051
|
+
A["nbsp"]="\u00A0[space]";
|
2052
|
+
A["iexcl"]="\u00A1";
|
2053
|
+
A["cent"]="\u00A2";
|
2054
|
+
A["pound"]="\u00A3";
|
2055
|
+
A["curren"]="\u00A4";
|
2056
|
+
A["yen"]="\u00A5";
|
2057
|
+
A["brvbar"]="\u00A6";
|
2058
|
+
A["sect"]="\u00A7";
|
2059
|
+
A["uml"]="\u00A8";
|
2060
|
+
A["copy"]="\u00A9";
|
2061
|
+
A["ordf"]="\u00AA";
|
2062
|
+
A["laquo"]="\u00AB";
|
2063
|
+
A["not"]="\u00AC";
|
2064
|
+
A["shy"]="\u00AD";
|
2065
|
+
A["reg"]="\u00AE";
|
2066
|
+
A["macr"]="\u00AF";
|
2067
|
+
A["deg"]="\u00B0";
|
2068
|
+
A["plusmn"]="\u00B1";
|
2069
|
+
A["sup2"]="\u00B2";
|
2070
|
+
A["sup3"]="\u00B3";
|
2071
|
+
A["acute"]="\u00B4";
|
2072
|
+
A["micro"]="\u00B5";
|
2073
|
+
A["para"]="\u00B6";
|
2074
|
+
A["middot"]="\u00B7";
|
2075
|
+
A["cedil"]="\u00B8";
|
2076
|
+
A["sup1"]="\u00B9";
|
2077
|
+
A["ordm"]="\u00BA";
|
2078
|
+
A["raquo"]="\u00BB";
|
2079
|
+
A["frac14"]="\u00BC";
|
2080
|
+
A["frac12"]="\u00BD";
|
2081
|
+
A["frac34"]="\u00BE";
|
2082
|
+
A["iquest"]="\u00BF";
|
2083
|
+
A["Agrave"]="\u00C0";
|
2084
|
+
A["Aacute"]="\u00C1";
|
2085
|
+
A["Acirc"]="\u00C2";
|
2086
|
+
A["Atilde"]="\u00C3";
|
2087
|
+
A["Auml"]="\u00C4";
|
2088
|
+
A["Aring"]="\u00C5";
|
2089
|
+
A["AElig"]="\u00C6";
|
2090
|
+
A["Ccedil"]="\u00C7";
|
2091
|
+
A["Egrave"]="\u00C8";
|
2092
|
+
A["Eacute"]="\u00C9";
|
2093
|
+
A["Ecirc"]="\u00CA";
|
2094
|
+
A["Euml"]="\u00CB";
|
2095
|
+
A["Igrave"]="\u00CC";
|
2096
|
+
A["Iacute"]="\u00CD";
|
2097
|
+
A["Icirc"]="\u00CE";
|
2098
|
+
A["Iuml"]="\u00CF";
|
2099
|
+
A["ETH"]="\u00D0";
|
2100
|
+
A["Ntilde"]="\u00D1";
|
2101
|
+
A["Ograve"]="\u00D2";
|
2102
|
+
A["Oacute"]="\u00D3";
|
2103
|
+
A["Ocirc"]="\u00D4";
|
2104
|
+
A["Otilde"]="\u00D5";
|
2105
|
+
A["Ouml"]="\u00D6";
|
2106
|
+
A["times"]="\u00D7";
|
2107
|
+
A["Oslash"]="\u00D8";
|
2108
|
+
A["Ugrave"]="\u00D9";
|
2109
|
+
A["Uacute"]="\u00DA";
|
2110
|
+
A["Ucirc"]="\u00DB";
|
2111
|
+
A["Uuml"]="\u00DC";
|
2112
|
+
A["Yacute"]="\u00DD";
|
2113
|
+
A["THORN"]="\u00DE";
|
2114
|
+
A["szlig"]="\u00DF";
|
2115
|
+
A["agrave"]="\u00E0";
|
2116
|
+
A["aacute"]="\u00E1";
|
2117
|
+
A["acirc"]="\u00E2";
|
2118
|
+
A["atilde"]="\u00E3";
|
2119
|
+
A["auml"]="\u00E4";
|
2120
|
+
A["aring"]="\u00E5";
|
2121
|
+
A["aelig"]="\u00E6";
|
2122
|
+
A["ccedil"]="\u00E7";
|
2123
|
+
A["egrave"]="\u00E8";
|
2124
|
+
A["eacute"]="\u00E9";
|
2125
|
+
A["ecirc"]="\u00EA";
|
2126
|
+
A["euml"]="\u00EB";
|
2127
|
+
A["igrave"]="\u00EC";
|
2128
|
+
A["iacute"]="\u00ED";
|
2129
|
+
A["icirc"]="\u00EE";
|
2130
|
+
A["iuml"]="\u00EF";
|
2131
|
+
A["eth"]="\u00F0";
|
2132
|
+
A["ntilde"]="\u00F1";
|
2133
|
+
A["ograve"]="\u00F2";
|
2134
|
+
A["oacute"]="\u00F3";
|
2135
|
+
A["ocirc"]="\u00F4";
|
2136
|
+
A["otilde"]="\u00F5";
|
2137
|
+
A["ouml"]="\u00F6";
|
2138
|
+
A["divide"]="\u00F7";
|
2139
|
+
A["oslash"]="\u00F8";
|
2140
|
+
A["ugrave"]="\u00F9";
|
2141
|
+
A["uacute"]="\u00FA";
|
2142
|
+
A["ucirc"]="\u00FB";
|
2143
|
+
A["uuml"]="\u00FC";
|
2144
|
+
A["yacute"]="\u00FD";
|
2145
|
+
A["thorn"]="\u00FE";
|
2146
|
+
A["yuml"]="\u00FF";
|
2147
|
+
A["quot"]="\u0022";
|
2148
|
+
A["amp"]="\u0026";
|
2149
|
+
A["lt"]="\u003C";
|
2150
|
+
A["gt"]="\u003E";
|
2151
|
+
A["OElig"]="";
|
2152
|
+
A["oelig"]="\u0153";
|
2153
|
+
A["Scaron"]="\u0160";
|
2154
|
+
A["scaron"]="\u0161";
|
2155
|
+
A["Yuml"]="\u0178";
|
2156
|
+
A["circ"]="\u02C6";
|
2157
|
+
A["tilde"]="\u02DC";
|
2158
|
+
A["ensp"]="\u2002";
|
2159
|
+
A["emsp"]="\u2003";
|
2160
|
+
A["thinsp"]="\u2009";
|
2161
|
+
A["zwnj"]="\u200C";
|
2162
|
+
A["zwj"]="\u200D";
|
2163
|
+
A["lrm"]="\u200E";
|
2164
|
+
A["rlm"]="\u200F";
|
2165
|
+
A["ndash"]="\u2013";
|
2166
|
+
A["mdash"]="\u2014";
|
2167
|
+
A["lsquo"]="\u2018";
|
2168
|
+
A["rsquo"]="\u2019";
|
2169
|
+
A["sbquo"]="\u201A";
|
2170
|
+
A["ldquo"]="\u201C";
|
2171
|
+
A["rdquo"]="\u201D";
|
2172
|
+
A["bdquo"]="\u201E";
|
2173
|
+
A["dagger"]="\u2020";
|
2174
|
+
A["Dagger"]="\u2021";
|
2175
|
+
A["permil"]="\u2030";
|
2176
|
+
A["lsaquo"]="\u2039";
|
2177
|
+
A["rsaquo"]="\u203A";
|
2178
|
+
A["euro"]="\u20AC";
|
2179
|
+
A["fnof"]="\u0192";
|
2180
|
+
A["Alpha"]="\u0391";
|
2181
|
+
A["Beta"]="\u0392";
|
2182
|
+
A["Gamma"]="\u0393";
|
2183
|
+
A["Delta"]="\u0394";
|
2184
|
+
A["Epsilon"]="\u0395";
|
2185
|
+
A["Zeta"]="\u0396";
|
2186
|
+
A["Eta"]="\u0397";
|
2187
|
+
A["Theta"]="\u0398";
|
2188
|
+
A["Iota"]="\u0399";
|
2189
|
+
A["Kappa"]="\u039A";
|
2190
|
+
A["Lambda"]="\u039B";
|
2191
|
+
A["Mu"]="\u039C";
|
2192
|
+
A["Nu"]="\u039D";
|
2193
|
+
A["Xi"]="\u039E";
|
2194
|
+
A["Omicron"]="\u039F";
|
2195
|
+
A["Pi"]="\u03A0";
|
2196
|
+
A["Rho"]="\u03A1";
|
2197
|
+
A["Sigma"]="\u03A3";
|
2198
|
+
A["Tau"]="\u03A4";
|
2199
|
+
A["Upsilon"]="\u03A5";
|
2200
|
+
A["Phi"]="\u03A6";
|
2201
|
+
A["Chi"]="\u03A7";
|
2202
|
+
A["Psi"]="\u03A8";
|
2203
|
+
A["Omega"]="\u03A9";
|
2204
|
+
A["alpha"]="\u03B1";
|
2205
|
+
A["beta"]="\u03B2";
|
2206
|
+
A["gamma"]="\u03B3";
|
2207
|
+
A["delta"]="\u03B4";
|
2208
|
+
A["epsilon"]="\u03B5";
|
2209
|
+
A["zeta"]="\u03B6";
|
2210
|
+
A["eta"]="\u03B7";
|
2211
|
+
A["theta"]="\u03B8";
|
2212
|
+
A["iota"]="\u03B9";
|
2213
|
+
A["kappa"]="\u03BA";
|
2214
|
+
A["lambda"]="\u03BB";
|
2215
|
+
A["mu"]="\u03BC";
|
2216
|
+
A["nu"]="\u03BD";
|
2217
|
+
A["xi"]="\u03BE";
|
2218
|
+
A["omicron"]="\u03BF";
|
2219
|
+
A["pi"]="\u03C0";
|
2220
|
+
A["rho"]="\u03C1";
|
2221
|
+
A["sigmaf"]="\u03C2";
|
2222
|
+
A["sigma"]="\u03C3";
|
2223
|
+
A["tau"]="\u03C4";
|
2224
|
+
A["upsilon"]="\u03C5";
|
2225
|
+
A["phi"]="\u03C6";
|
2226
|
+
A["chi"]="\u03C7";
|
2227
|
+
A["psi"]="\u03C8";
|
2228
|
+
A["omega"]="\u03C9";
|
2229
|
+
A["thetasym"]="\u03D1";
|
2230
|
+
A["upsih"]="\u03D2";
|
2231
|
+
A["piv"]="\u03D6";
|
2232
|
+
A["bull"]="\u2022";
|
2233
|
+
A["hellip"]="\u2026";
|
2234
|
+
A["prime"]="\u2032";
|
2235
|
+
A["Prime"]="\u2033";
|
2236
|
+
A["oline"]="\u203E";
|
2237
|
+
A["frasl"]="\u2044";
|
2238
|
+
A["weierp"]="\u2118";
|
2239
|
+
A["image"]="\u2111";
|
2240
|
+
A["real"]="\u211C";
|
2241
|
+
A["trade"]="\u2122";
|
2242
|
+
A["alefsym"]="\u2135";
|
2243
|
+
A["larr"]="\u2190";
|
2244
|
+
A["uarr"]="\u2191";
|
2245
|
+
A["rarr"]="\u2192";
|
2246
|
+
A["darr"]="\u2193";
|
2247
|
+
A["harr"]="\u2194";
|
2248
|
+
A["crarr"]="\u21B5";
|
2249
|
+
A["lArr"]="\u21D0";
|
2250
|
+
A["uArr"]="\u21D1";
|
2251
|
+
A["rArr"]="\u21D2";
|
2252
|
+
A["dArr"]="\u21D3";
|
2253
|
+
A["hArr"]="\u21D4";
|
2254
|
+
A["forall"]="\u2200";
|
2255
|
+
A["part"]="\u2202";
|
2256
|
+
A["exist"]="\u2203";
|
2257
|
+
A["empty"]="\u2205";
|
2258
|
+
A["nabla"]="\u2207";
|
2259
|
+
A["isin"]="\u2208";
|
2260
|
+
A["notin"]="\u2209";
|
2261
|
+
A["ni"]="\u220B";
|
2262
|
+
A["prod"]="\u220F";
|
2263
|
+
A["sum"]="\u2211";
|
2264
|
+
A["minus"]="\u2212";
|
2265
|
+
A["lowast"]="\u2217";
|
2266
|
+
A["radic"]="\u221A";
|
2267
|
+
A["prop"]="\u221D";
|
2268
|
+
A["infin"]="\u221E";
|
2269
|
+
A["ang"]="\u2220";
|
2270
|
+
A["and"]="\u2227";
|
2271
|
+
A["or"]="\u2228";
|
2272
|
+
A["cap"]="\u2229";
|
2273
|
+
A["cup"]="\u222A";
|
2274
|
+
A["int"]="\u222B";
|
2275
|
+
A["there4"]="\u2234";
|
2276
|
+
A["sim"]="\u223C";
|
2277
|
+
A["cong"]="\u2245";
|
2278
|
+
A["asymp"]="\u2248";
|
2279
|
+
A["ne"]="\u2260";
|
2280
|
+
A["equiv"]="\u2261";
|
2281
|
+
A["le"]="\u2264";
|
2282
|
+
A["ge"]="\u2265";
|
2283
|
+
A["sub"]="\u2282";
|
2284
|
+
A["sup"]="\u2283";
|
2285
|
+
A["nsub"]="\u2284";
|
2286
|
+
A["sube"]="\u2286";
|
2287
|
+
A["supe"]="\u2287";
|
2288
|
+
A["oplus"]="\u2295";
|
2289
|
+
A["otimes"]="\u2297";
|
2290
|
+
A["perp"]="\u22A5";
|
2291
|
+
A["sdot"]="\u22C5";
|
2292
|
+
A["lceil"]="\u2308";
|
2293
|
+
A["rceil"]="\u2309";
|
2294
|
+
A["lfloor"]="\u230A";
|
2295
|
+
A["rfloor"]="\u230B";
|
2296
|
+
A["lang"]="\u2329";
|
2297
|
+
A["rang"]="\u232A";
|
2298
|
+
A["loz"]="\u25CA";
|
2299
|
+
A["spades"]="\u2660";
|
2300
|
+
A["clubs"]="\u2663";
|
2301
|
+
A["hearts"]="\u2665";
|
2302
|
+
A["diams"]="\u2666";
|
2303
|
+
})();
|
2304
|
+
SimileAjax.HTML.deEntify=function(C){var D=SimileAjax.HTML._e2uHash;
|
2305
|
+
var B=/&(\w+?);/;
|
2306
|
+
while(B.test(C)){var A=C.match(B);
|
2307
|
+
C=C.replace(B,D[A[1]]);
|
2308
|
+
}return C;
|
2309
|
+
};
|
2310
|
+
|
2311
|
+
|
2312
|
+
/* json.js */
|
2313
|
+
SimileAjax.JSON=new Object();
|
2314
|
+
(function(){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
|
2315
|
+
var s={array:function(x){var a=["["],b,f,i,l=x.length,v;
|
2316
|
+
for(i=0;
|
2317
|
+
i<l;
|
2318
|
+
i+=1){v=x[i];
|
2319
|
+
f=s[typeof v];
|
2320
|
+
if(f){v=f(v);
|
2321
|
+
if(typeof v=="string"){if(b){a[a.length]=",";
|
2322
|
+
}a[a.length]=v;
|
2323
|
+
b=true;
|
2324
|
+
}}}a[a.length]="]";
|
2325
|
+
return a.join("");
|
2326
|
+
},"boolean":function(x){return String(x);
|
2327
|
+
},"null":function(x){return"null";
|
2328
|
+
},number:function(x){return isFinite(x)?String(x):"null";
|
2329
|
+
},object:function(x){if(x){if(x instanceof Array){return s.array(x);
|
2330
|
+
}var a=["{"],b,f,i,v;
|
2331
|
+
for(i in x){v=x[i];
|
2332
|
+
f=s[typeof v];
|
2333
|
+
if(f){v=f(v);
|
2334
|
+
if(typeof v=="string"){if(b){a[a.length]=",";
|
2335
|
+
}a.push(s.string(i),":",v);
|
2336
|
+
b=true;
|
2337
|
+
}}}a[a.length]="}";
|
2338
|
+
return a.join("");
|
2339
|
+
}return"null";
|
2340
|
+
},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];
|
2341
|
+
if(c){return c;
|
2342
|
+
}c=b.charCodeAt();
|
2343
|
+
return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);
|
2344
|
+
});
|
2345
|
+
}return'"'+x+'"';
|
2346
|
+
}};
|
2347
|
+
SimileAjax.JSON.toJSONString=function(o){if(o instanceof Object){return s.object(o);
|
2348
|
+
}else{if(o instanceof Array){return s.array(o);
|
2349
|
+
}else{return o.toString();
|
2350
|
+
}}};
|
2351
|
+
SimileAjax.JSON.parseJSON=function(){try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(this.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+this+")");
|
2352
|
+
}catch(e){return false;
|
2353
|
+
}};
|
2354
|
+
})();
|
2355
|
+
|
2356
|
+
|
2357
|
+
/* string.js */
|
2358
|
+
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");
|
2359
|
+
};
|
2360
|
+
String.prototype.startsWith=function(A){return this.length>=A.length&&this.substr(0,A.length)==A;
|
2361
|
+
};
|
2362
|
+
String.prototype.endsWith=function(A){return this.length>=A.length&&this.substr(this.length-A.length)==A;
|
2363
|
+
};
|
2364
|
+
String.substitute=function(C,A){var D="";
|
2365
|
+
var F=0;
|
2366
|
+
while(F<C.length-1){var B=C.indexOf("%",F);
|
2367
|
+
if(B<0||B==C.length-1){break;
|
2368
|
+
}else{if(B>F&&C.charAt(B-1)=="\\"){D+=C.substring(F,B-1)+"%";
|
2369
|
+
F=B+1;
|
2370
|
+
}else{var E=parseInt(C.charAt(B+1));
|
2371
|
+
if(isNaN(E)||E>=A.length){D+=C.substring(F,B+2);
|
2372
|
+
}else{D+=C.substring(F,B)+A[E].toString();
|
2373
|
+
}F=B+2;
|
2374
|
+
}}}if(F<C.length){D+=C.substring(F);
|
2375
|
+
}return D;
|
2376
|
+
};
|
2377
|
+
|
2378
|
+
|
2379
|
+
/* units.js */
|
2380
|
+
SimileAjax.NativeDateUnit=new Object();
|
2381
|
+
SimileAjax.NativeDateUnit.makeDefaultValue=function(){return new Date();
|
2382
|
+
};
|
2383
|
+
SimileAjax.NativeDateUnit.cloneValue=function(A){return new Date(A.getTime());
|
2384
|
+
};
|
2385
|
+
SimileAjax.NativeDateUnit.getParser=function(A){if(typeof A=="string"){A=A.toLowerCase();
|
2386
|
+
}return(A=="iso8601"||A=="iso 8601")?SimileAjax.DateTime.parseIso8601DateTime:SimileAjax.DateTime.parseGregorianDateTime;
|
2387
|
+
};
|
2388
|
+
SimileAjax.NativeDateUnit.parseFromObject=function(A){return SimileAjax.DateTime.parseGregorianDateTime(A);
|
2389
|
+
};
|
2390
|
+
SimileAjax.NativeDateUnit.toNumber=function(A){return A.getTime();
|
2391
|
+
};
|
2392
|
+
SimileAjax.NativeDateUnit.fromNumber=function(A){return new Date(A);
|
2393
|
+
};
|
2394
|
+
SimileAjax.NativeDateUnit.compare=function(D,C){var B,A;
|
2395
|
+
if(typeof D=="object"){B=D.getTime();
|
2396
|
+
}else{B=Number(D);
|
2397
|
+
}if(typeof C=="object"){A=C.getTime();
|
2398
|
+
}else{A=Number(C);
|
2399
|
+
}return B-A;
|
2400
|
+
};
|
2401
|
+
SimileAjax.NativeDateUnit.earlier=function(B,A){return SimileAjax.NativeDateUnit.compare(B,A)<0?B:A;
|
2402
|
+
};
|
2403
|
+
SimileAjax.NativeDateUnit.later=function(B,A){return SimileAjax.NativeDateUnit.compare(B,A)>0?B:A;
|
2404
|
+
};
|
2405
|
+
SimileAjax.NativeDateUnit.change=function(A,B){return new Date(A.getTime()+B);
|
2406
|
+
};
|
2407
|
+
|
2408
|
+
|
2409
|
+
/* window-manager.js */
|
2410
|
+
SimileAjax.WindowManager={_initialized:false,_listeners:[],_draggedElement:null,_draggedElementCallback:null,_dropTargetHighlightElement:null,_lastCoords:null,_ghostCoords:null,_draggingMode:"",_dragging:false,_layers:[]};
|
2411
|
+
SimileAjax.WindowManager.initialize=function(){if(SimileAjax.WindowManager._initialized){return ;
|
2412
|
+
}SimileAjax.DOM.registerEvent(document.body,"mousedown",SimileAjax.WindowManager._onBodyMouseDown);
|
2413
|
+
SimileAjax.DOM.registerEvent(document.body,"mousemove",SimileAjax.WindowManager._onBodyMouseMove);
|
2414
|
+
SimileAjax.DOM.registerEvent(document.body,"mouseup",SimileAjax.WindowManager._onBodyMouseUp);
|
2415
|
+
SimileAjax.DOM.registerEvent(document,"keydown",SimileAjax.WindowManager._onBodyKeyDown);
|
2416
|
+
SimileAjax.DOM.registerEvent(document,"keyup",SimileAjax.WindowManager._onBodyKeyUp);
|
2417
|
+
SimileAjax.WindowManager._layers.push({index:0});
|
2418
|
+
SimileAjax.WindowManager._historyListener={onBeforeUndoSeveral:function(){},onAfterUndoSeveral:function(){},onBeforeUndo:function(){},onAfterUndo:function(){},onBeforeRedoSeveral:function(){},onAfterRedoSeveral:function(){},onBeforeRedo:function(){},onAfterRedo:function(){}};
|
2419
|
+
SimileAjax.History.addListener(SimileAjax.WindowManager._historyListener);
|
2420
|
+
SimileAjax.WindowManager._initialized=true;
|
2421
|
+
};
|
2422
|
+
SimileAjax.WindowManager.getBaseLayer=function(){SimileAjax.WindowManager.initialize();
|
2423
|
+
return SimileAjax.WindowManager._layers[0];
|
2424
|
+
};
|
2425
|
+
SimileAjax.WindowManager.getHighestLayer=function(){SimileAjax.WindowManager.initialize();
|
2426
|
+
return SimileAjax.WindowManager._layers[SimileAjax.WindowManager._layers.length-1];
|
2427
|
+
};
|
2428
|
+
SimileAjax.WindowManager.registerEventWithObject=function(D,A,E,B,C){SimileAjax.WindowManager.registerEvent(D,A,function(G,F,H){return E[B].call(E,G,F,H);
|
2429
|
+
},C);
|
2430
|
+
};
|
2431
|
+
SimileAjax.WindowManager.registerEvent=function(D,B,E,C){if(C==null){C=SimileAjax.WindowManager.getHighestLayer();
|
2432
|
+
}var A=function(G,F,I){if(SimileAjax.WindowManager._canProcessEventAtLayer(C)){SimileAjax.WindowManager._popToLayer(C.index);
|
2433
|
+
try{E(G,F,I);
|
2434
|
+
}catch(H){SimileAjax.Debug.exception(H);
|
2435
|
+
}}SimileAjax.DOM.cancelEvent(F);
|
2436
|
+
return false;
|
2437
|
+
};
|
2438
|
+
SimileAjax.DOM.registerEvent(D,B,A);
|
2439
|
+
};
|
2440
|
+
SimileAjax.WindowManager.pushLayer=function(C,D,B){var A={onPop:C,index:SimileAjax.WindowManager._layers.length,ephemeral:(D),elmt:B};
|
2441
|
+
SimileAjax.WindowManager._layers.push(A);
|
2442
|
+
return A;
|
2443
|
+
};
|
2444
|
+
SimileAjax.WindowManager.popLayer=function(B){for(var A=1;
|
2445
|
+
A<SimileAjax.WindowManager._layers.length;
|
2446
|
+
A++){if(SimileAjax.WindowManager._layers[A]==B){SimileAjax.WindowManager._popToLayer(A-1);
|
2447
|
+
break;
|
2448
|
+
}}};
|
2449
|
+
SimileAjax.WindowManager.popAllLayers=function(){SimileAjax.WindowManager._popToLayer(0);
|
2450
|
+
};
|
2451
|
+
SimileAjax.WindowManager.registerForDragging=function(B,C,A){SimileAjax.WindowManager.registerEvent(B,"mousedown",function(E,D,F){SimileAjax.WindowManager._handleMouseDown(E,D,C);
|
2452
|
+
},A);
|
2453
|
+
};
|
2454
|
+
SimileAjax.WindowManager._popToLayer=function(C){while(C+1<SimileAjax.WindowManager._layers.length){try{var A=SimileAjax.WindowManager._layers.pop();
|
2455
|
+
if(A.onPop!=null){A.onPop();
|
2456
|
+
}}catch(B){}}};
|
2457
|
+
SimileAjax.WindowManager._canProcessEventAtLayer=function(B){if(B.index==(SimileAjax.WindowManager._layers.length-1)){return true;
|
2458
|
+
}for(var A=B.index+1;
|
2459
|
+
A<SimileAjax.WindowManager._layers.length;
|
2460
|
+
A++){if(!SimileAjax.WindowManager._layers[A].ephemeral){return false;
|
2461
|
+
}}return true;
|
2462
|
+
};
|
2463
|
+
SimileAjax.WindowManager.cancelPopups=function(A){var F=(A)?SimileAjax.DOM.getEventPageCoordinates(A):{x:-1,y:-1};
|
2464
|
+
var E=SimileAjax.WindowManager._layers.length-1;
|
2465
|
+
while(E>0&&SimileAjax.WindowManager._layers[E].ephemeral){var D=SimileAjax.WindowManager._layers[E];
|
2466
|
+
if(D.elmt!=null){var C=D.elmt;
|
2467
|
+
var B=SimileAjax.DOM.getPageCoordinates(C);
|
2468
|
+
if(F.x>=B.left&&F.x<(B.left+C.offsetWidth)&&F.y>=B.top&&F.y<(B.top+C.offsetHeight)){break;
|
2469
|
+
}}E--;
|
2470
|
+
}SimileAjax.WindowManager._popToLayer(E);
|
2471
|
+
};
|
2472
|
+
SimileAjax.WindowManager._onBodyMouseDown=function(B,A,C){if(!("eventPhase" in A)||A.eventPhase==A.BUBBLING_PHASE){SimileAjax.WindowManager.cancelPopups(A);
|
2473
|
+
}};
|
2474
|
+
SimileAjax.WindowManager._handleMouseDown=function(B,A,C){SimileAjax.WindowManager._draggedElement=B;
|
2475
|
+
SimileAjax.WindowManager._draggedElementCallback=C;
|
2476
|
+
SimileAjax.WindowManager._lastCoords={x:A.clientX,y:A.clientY};
|
2477
|
+
SimileAjax.DOM.cancelEvent(A);
|
2478
|
+
return false;
|
2479
|
+
};
|
2480
|
+
SimileAjax.WindowManager._onBodyKeyDown=function(C,A,D){if(SimileAjax.WindowManager._dragging){if(A.keyCode==27){SimileAjax.WindowManager._cancelDragging();
|
2481
|
+
}else{if((A.keyCode==17||A.keyCode==16)&&SimileAjax.WindowManager._draggingMode!="copy"){SimileAjax.WindowManager._draggingMode="copy";
|
2482
|
+
var B=SimileAjax.Graphics.createTranslucentImage(SimileAjax.urlPrefix+"images/copy.png");
|
2483
|
+
B.style.position="absolute";
|
2484
|
+
B.style.left=(SimileAjax.WindowManager._ghostCoords.left-16)+"px";
|
2485
|
+
B.style.top=(SimileAjax.WindowManager._ghostCoords.top)+"px";
|
2486
|
+
document.body.appendChild(B);
|
2487
|
+
SimileAjax.WindowManager._draggingModeIndicatorElmt=B;
|
2488
|
+
}}}};
|
2489
|
+
SimileAjax.WindowManager._onBodyKeyUp=function(B,A,C){if(SimileAjax.WindowManager._dragging){if(A.keyCode==17||A.keyCode==16){SimileAjax.WindowManager._draggingMode="";
|
2490
|
+
if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt);
|
2491
|
+
SimileAjax.WindowManager._draggingModeIndicatorElmt=null;
|
2492
|
+
}}}};
|
2493
|
+
SimileAjax.WindowManager._onBodyMouseMove=function(C,M,B){if(SimileAjax.WindowManager._draggedElement!=null){var L=SimileAjax.WindowManager._draggedElementCallback;
|
2494
|
+
var G=SimileAjax.WindowManager._lastCoords;
|
2495
|
+
var J=M.clientX-G.x;
|
2496
|
+
var I=M.clientY-G.y;
|
2497
|
+
if(!SimileAjax.WindowManager._dragging){if(Math.abs(J)>5||Math.abs(I)>5){try{if("onDragStart" in L){L.onDragStart();
|
2498
|
+
}if("ghost" in L&&L.ghost){var P=SimileAjax.WindowManager._draggedElement;
|
2499
|
+
SimileAjax.WindowManager._ghostCoords=SimileAjax.DOM.getPageCoordinates(P);
|
2500
|
+
SimileAjax.WindowManager._ghostCoords.left+=J;
|
2501
|
+
SimileAjax.WindowManager._ghostCoords.top+=I;
|
2502
|
+
var K=P.cloneNode(true);
|
2503
|
+
K.style.position="absolute";
|
2504
|
+
K.style.left=SimileAjax.WindowManager._ghostCoords.left+"px";
|
2505
|
+
K.style.top=SimileAjax.WindowManager._ghostCoords.top+"px";
|
2506
|
+
K.style.zIndex=1000;
|
2507
|
+
SimileAjax.Graphics.setOpacity(K,50);
|
2508
|
+
document.body.appendChild(K);
|
2509
|
+
L._ghostElmt=K;
|
2510
|
+
}SimileAjax.WindowManager._dragging=true;
|
2511
|
+
SimileAjax.WindowManager._lastCoords={x:M.clientX,y:M.clientY};
|
2512
|
+
document.body.focus();
|
2513
|
+
}catch(H){SimileAjax.Debug.exception("WindowManager: Error handling mouse down",H);
|
2514
|
+
SimileAjax.WindowManager._cancelDragging();
|
2515
|
+
}}}else{try{SimileAjax.WindowManager._lastCoords={x:M.clientX,y:M.clientY};
|
2516
|
+
if("onDragBy" in L){L.onDragBy(J,I);
|
2517
|
+
}if("_ghostElmt" in L){var K=L._ghostElmt;
|
2518
|
+
SimileAjax.WindowManager._ghostCoords.left+=J;
|
2519
|
+
SimileAjax.WindowManager._ghostCoords.top+=I;
|
2520
|
+
K.style.left=SimileAjax.WindowManager._ghostCoords.left+"px";
|
2521
|
+
K.style.top=SimileAjax.WindowManager._ghostCoords.top+"px";
|
2522
|
+
if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){var O=SimileAjax.WindowManager._draggingModeIndicatorElmt;
|
2523
|
+
O.style.left=(SimileAjax.WindowManager._ghostCoords.left-16)+"px";
|
2524
|
+
O.style.top=SimileAjax.WindowManager._ghostCoords.top+"px";
|
2525
|
+
}if("droppable" in L&&L.droppable){var N=SimileAjax.DOM.getEventPageCoordinates(M);
|
2526
|
+
var B=SimileAjax.DOM.hittest(N.x,N.y,[SimileAjax.WindowManager._ghostElmt,SimileAjax.WindowManager._dropTargetHighlightElement]);
|
2527
|
+
B=SimileAjax.WindowManager._findDropTarget(B);
|
2528
|
+
if(B!=SimileAjax.WindowManager._potentialDropTarget){if(SimileAjax.WindowManager._dropTargetHighlightElement!=null){document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement);
|
2529
|
+
SimileAjax.WindowManager._dropTargetHighlightElement=null;
|
2530
|
+
SimileAjax.WindowManager._potentialDropTarget=null;
|
2531
|
+
}var A=false;
|
2532
|
+
if(B!=null){if((!("canDropOn" in L)||L.canDropOn(B))&&(!("canDrop" in B)||B.canDrop(SimileAjax.WindowManager._draggedElement))){A=true;
|
2533
|
+
}}if(A){var E=4;
|
2534
|
+
var D=SimileAjax.DOM.getPageCoordinates(B);
|
2535
|
+
var F=document.createElement("div");
|
2536
|
+
F.style.border=E+"px solid yellow";
|
2537
|
+
F.style.backgroundColor="yellow";
|
2538
|
+
F.style.position="absolute";
|
2539
|
+
F.style.left=D.left+"px";
|
2540
|
+
F.style.top=D.top+"px";
|
2541
|
+
F.style.width=(B.offsetWidth-E*2)+"px";
|
2542
|
+
F.style.height=(B.offsetHeight-E*2)+"px";
|
2543
|
+
SimileAjax.Graphics.setOpacity(F,30);
|
2544
|
+
document.body.appendChild(F);
|
2545
|
+
SimileAjax.WindowManager._potentialDropTarget=B;
|
2546
|
+
SimileAjax.WindowManager._dropTargetHighlightElement=F;
|
2547
|
+
}}}}}catch(H){SimileAjax.Debug.exception("WindowManager: Error handling mouse move",H);
|
2548
|
+
SimileAjax.WindowManager._cancelDragging();
|
2549
|
+
}}SimileAjax.DOM.cancelEvent(M);
|
2550
|
+
return false;
|
2551
|
+
}};
|
2552
|
+
SimileAjax.WindowManager._onBodyMouseUp=function(B,A,E){if(SimileAjax.WindowManager._draggedElement!=null){try{if(SimileAjax.WindowManager._dragging){var C=SimileAjax.WindowManager._draggedElementCallback;
|
2553
|
+
if("onDragEnd" in C){C.onDragEnd();
|
2554
|
+
}if("droppable" in C&&C.droppable){var D=false;
|
2555
|
+
var E=SimileAjax.WindowManager._potentialDropTarget;
|
2556
|
+
if(E!=null){if((!("canDropOn" in C)||C.canDropOn(E))&&(!("canDrop" in E)||E.canDrop(SimileAjax.WindowManager._draggedElement))){if("onDropOn" in C){C.onDropOn(E);
|
2557
|
+
}E.ondrop(SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._draggingMode);
|
2558
|
+
D=true;
|
2559
|
+
}}if(!D){}}}}finally{SimileAjax.WindowManager._cancelDragging();
|
2560
|
+
}SimileAjax.DOM.cancelEvent(A);
|
2561
|
+
return false;
|
2562
|
+
}};
|
2563
|
+
SimileAjax.WindowManager._cancelDragging=function(){var A=SimileAjax.WindowManager._draggedElementCallback;
|
2564
|
+
if("_ghostElmt" in A){var B=A._ghostElmt;
|
2565
|
+
document.body.removeChild(B);
|
2566
|
+
delete A._ghostElmt;
|
2567
|
+
}if(SimileAjax.WindowManager._dropTargetHighlightElement!=null){document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement);
|
2568
|
+
SimileAjax.WindowManager._dropTargetHighlightElement=null;
|
2569
|
+
}if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt);
|
2570
|
+
SimileAjax.WindowManager._draggingModeIndicatorElmt=null;
|
2571
|
+
}SimileAjax.WindowManager._draggedElement=null;
|
2572
|
+
SimileAjax.WindowManager._draggedElementCallback=null;
|
2573
|
+
SimileAjax.WindowManager._potentialDropTarget=null;
|
2574
|
+
SimileAjax.WindowManager._dropTargetHighlightElement=null;
|
2575
|
+
SimileAjax.WindowManager._lastCoords=null;
|
2576
|
+
SimileAjax.WindowManager._ghostCoords=null;
|
2577
|
+
SimileAjax.WindowManager._draggingMode="";
|
2578
|
+
SimileAjax.WindowManager._dragging=false;
|
2579
|
+
};
|
2580
|
+
SimileAjax.WindowManager._findDropTarget=function(A){while(A!=null){if("ondrop" in A&&(typeof A.ondrop)=="function"){break;
|
2581
|
+
}A=A.parentNode;
|
2582
|
+
}return A;
|
2583
|
+
};
|
2584
|
+
|
2585
|
+
|
2586
|
+
/* xmlhttp.js */
|
2587
|
+
SimileAjax.XmlHttp=new Object();
|
2588
|
+
SimileAjax.XmlHttp._onReadyStateChange=function(A,D,B){switch(A.readyState){case 4:try{if(A.status==0||A.status==200){if(B){B(A);
|
2589
|
+
}}else{if(D){D(A.statusText,A.status,A);
|
2590
|
+
}}}catch(C){SimileAjax.Debug.exception("XmlHttp: Error handling onReadyStateChange",C);
|
2591
|
+
}break;
|
2592
|
+
}};
|
2593
|
+
SimileAjax.XmlHttp._createRequest=function(){if(SimileAjax.Platform.browser.isIE){var B=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
|
2594
|
+
for(var C=0;
|
2595
|
+
C<B.length;
|
2596
|
+
C++){try{var A=B[C];
|
2597
|
+
var D=function(){return new ActiveXObject(A);
|
2598
|
+
};
|
2599
|
+
var F=D();
|
2600
|
+
SimileAjax.XmlHttp._createRequest=D;
|
2601
|
+
return F;
|
2602
|
+
}catch(E){}}}try{var D=function(){return new XMLHttpRequest();
|
2603
|
+
};
|
2604
|
+
var F=D();
|
2605
|
+
SimileAjax.XmlHttp._createRequest=D;
|
2606
|
+
return F;
|
2607
|
+
}catch(E){throw new Error("Failed to create an XMLHttpRequest object");
|
2608
|
+
}};
|
2609
|
+
SimileAjax.XmlHttp.get=function(B,D,C){var A=SimileAjax.XmlHttp._createRequest();
|
2610
|
+
A.open("GET",B,true);
|
2611
|
+
A.onreadystatechange=function(){SimileAjax.XmlHttp._onReadyStateChange(A,D,C);
|
2612
|
+
};
|
2613
|
+
A.send(null);
|
2614
|
+
};
|
2615
|
+
SimileAjax.XmlHttp.post=function(C,A,E,D){var B=SimileAjax.XmlHttp._createRequest();
|
2616
|
+
B.open("POST",C,true);
|
2617
|
+
B.onreadystatechange=function(){SimileAjax.XmlHttp._onReadyStateChange(B,E,D);
|
2618
|
+
};
|
2619
|
+
B.send(A);
|
2620
|
+
};
|
2621
|
+
SimileAjax.XmlHttp._forceXML=function(A){try{A.overrideMimeType("text/xml");
|
2622
|
+
}catch(B){A.setrequestheader("Content-Type","text/xml");
|
2623
|
+
}};
|