├── README.md ├── css ├── aurora-base.css ├── wp-autal │ ├── style-desktop.css │ └── style.css └── wp-cv │ ├── style-desktop.css │ ├── style-ie.css │ ├── style-print.css │ └── style.css ├── gulp └── sass-prefix-livereload.gulpfile.js ├── js ├── ajax │ ├── dom.html │ ├── downloads │ │ ├── download.doc │ │ ├── download.exe │ │ ├── download.mp3 │ │ ├── download.mpg │ │ ├── download.pdf │ │ ├── download.ppt │ │ ├── download.rtf │ │ ├── download.txt │ │ ├── download.xls │ │ ├── download.zip │ │ ├── downloadhandler.asp │ │ └── downloadhandler.php │ ├── dragdrop.html │ ├── elementeffects.html │ ├── events.html │ ├── graphic.html │ ├── images │ │ ├── city.jpg │ │ ├── citythumb.jpg │ │ ├── exmouth.jpg │ │ ├── exmouththumb.jpg │ │ ├── icons │ │ │ ├── iconaudio.gif │ │ │ ├── icondoc.gif │ │ │ ├── iconemail.gif │ │ │ ├── iconexe.gif │ │ │ ├── iconfeed.gif │ │ │ ├── iconimage.gif │ │ │ ├── iconpdf.gif │ │ │ ├── iconppt.gif │ │ │ ├── icontext.gif │ │ │ ├── iconvcard.gif │ │ │ ├── iconvideo.gif │ │ │ ├── iconweb.gif │ │ │ ├── iconxls.gif │ │ │ └── iconzip.gif │ │ ├── screenshot.gif │ │ ├── screenshotthumb.gif │ │ ├── sliderh.gif │ │ ├── sliderh1.gif │ │ ├── sliderscale.gif │ │ ├── sliderv.gif │ │ └── sliderv1.gif │ ├── imagescroller.html │ ├── index.html │ ├── listcontrol.html │ ├── misc.html │ ├── popup.html │ ├── resources │ │ ├── import.css │ │ ├── import.js │ │ ├── test.xml │ │ └── test.xsl │ ├── scriptlibrary │ │ ├── dom.js │ │ ├── dragdrop.js │ │ ├── elementeffects.js │ │ ├── events v1.js │ │ ├── events.js │ │ ├── graphic.js │ │ ├── imagescroller.js │ │ ├── listcontrol.js │ │ ├── localisation.js │ │ ├── misc.js │ │ ├── popup.js │ │ ├── slidercontrol.js │ │ ├── styles.js │ │ ├── tabcontrol.js │ │ ├── texteffects.js │ │ ├── validator.js │ │ ├── validatorsupport.js │ │ ├── webservice.js │ │ └── xml.js │ ├── slidercontrol.html │ ├── styles.html │ ├── styles │ │ ├── form.css │ │ ├── imagescroller.css │ │ ├── lists.css │ │ ├── popup.css │ │ ├── slider.css │ │ ├── styles.css │ │ ├── stylesalt.css │ │ └── tabs.css │ ├── tabcontrol.html │ ├── texteffects.html │ ├── validator.html │ ├── webservice.html │ ├── webservice │ │ ├── sum.asp │ │ ├── sum.php │ │ └── sum.txt │ └── xml.html ├── aurora │ ├── jquery.autocomplete.js │ ├── jquery.checkboxtoggle.js │ ├── jquery.colourpicker.js │ ├── jquery.draggable.js │ ├── jquery.form.js │ ├── jquery.js │ ├── jquery.password.js │ ├── jquery.table.js │ ├── jquery.tabs.js │ ├── jquery.totaliser.js │ └── sws.main.js ├── form_changes.js ├── owl │ ├── image.html │ ├── images │ │ ├── Thumbs.db │ │ ├── claire.jpg │ │ ├── claire_t.jpg │ │ ├── ross.jpg │ │ ├── ross_t.jpg │ │ ├── sophie.jpg │ │ └── sophie_t.jpg │ ├── index.html │ ├── script │ │ ├── backup │ │ │ ├── owl.js │ │ │ ├── owl_ajax.js │ │ │ ├── owl_contextmenu.js │ │ │ ├── owl_css_bak.js │ │ │ ├── owl_dom_bak.js │ │ │ └── owl_effect.js │ │ ├── owl.js │ │ ├── owl_ajax.js │ │ ├── owl_assess.js │ │ ├── owl_container.js │ │ ├── owl_contextmenu.js │ │ ├── owl_cookie.js │ │ ├── owl_css.js │ │ ├── owl_dom.js │ │ ├── owl_effect.js │ │ ├── owl_event.js │ │ ├── owl_http.js │ │ ├── owl_image.js │ │ ├── owl_innerhtml.js │ │ ├── owl_lightbox.js │ │ ├── owl_overlay - fails.js │ │ ├── owl_overlay.js │ │ ├── owl_screen.js │ │ ├── owl_scrollcontrol.js │ │ ├── owl_selectcontrol.js │ │ ├── owl_session.js │ │ ├── owl_timer.js │ │ ├── owl_treecontrol.js │ │ └── owl_xml.js │ ├── scriptdemo │ │ └── doc.js │ ├── styles │ │ ├── assess.css │ │ ├── container.css │ │ ├── contextmenu.css │ │ ├── images_assess │ │ │ ├── cross.png │ │ │ ├── crossbig.png │ │ │ ├── tick.png │ │ │ └── tickbig.png │ │ ├── images_lightbox │ │ │ ├── back.gif │ │ │ ├── close.gif │ │ │ ├── description.gif │ │ │ ├── load.gif │ │ │ └── next.gif │ │ ├── lightbox.css │ │ ├── screen.css │ │ ├── test.css │ │ └── treecontrol.css │ ├── test.html │ ├── testajax.html │ ├── testassess.html │ ├── testbrowser.html │ ├── testcontainer.html │ ├── testcontextmenu.html │ ├── testcookie.html │ ├── testcore.html │ ├── testdom.html │ ├── testeffect.html │ ├── testevent.html │ ├── testhttp.html │ ├── testimage.html │ ├── testlightbox.html │ ├── testobject.html │ ├── testoverlay.html │ ├── testscreen.html │ ├── testsession.html │ ├── testtreecontrol.html │ ├── testxml.html │ ├── to do.txt │ └── webservices │ │ ├── sum.php │ │ └── sumjs.php └── pacparser │ ├── index.html │ ├── script.js │ └── styles.css └── wordpress └── plugins ├── easy-admin.php ├── meta-boxes.php ├── ow-twitter-feed ├── !dev │ ├── ow-twitter-feed-1.0.old │ ├── ow-twitter-feed-1.1.old │ └── test.php ├── oauth │ ├── OAuth.php │ └── twitteroauth.php └── ow-twitter-feed.php ├── ow_functions.php └── shortcodes.php /README.md: -------------------------------------------------------------------------------- 1 | Craig's snippets 2 | ================ 3 | 4 | Just a random collection of useful code snippets. 5 | Few explanations, no guarantees! 6 | -------------------------------------------------------------------------------- /css/wp-autal/style-desktop.css: -------------------------------------------------------------------------------- 1 | /* 2 | Autal desktop layout 3 | */ 4 | 5 | div.content 6 | { 7 | width: 97%; 8 | max-width: 76em; 9 | margin: 0 auto; 10 | } 11 | 12 | /* grid */ 13 | .s25 { width: 23%; } 14 | .s33 { width: 31.3%; } 15 | .s50 { width: 48%; } 16 | .s66 { width: 64.6%; } 17 | .s75 { width: 73%; } 18 | .s100 { width: 98%; } 19 | .sectionlist section { width: 33%; } 20 | 21 | /* navigation */ 22 | nav 23 | { 24 | clear: right; 25 | float: right; 26 | width: auto; 27 | } 28 | 29 | nav li 30 | { 31 | float: left; 32 | width: auto; 33 | } 34 | 35 | nav a 36 | { 37 | padding: 0 1em; 38 | } 39 | 40 | nav > ul > li > a > span 41 | { 42 | display: inline; 43 | } 44 | 45 | nav > ul > li.sub > a:after 46 | { 47 | font-family: icon; 48 | content: "\e817"; 49 | font-size: 0.5em; 50 | vertical-align: top; 51 | padding-left: 2px; 52 | color: #666; 53 | } 54 | 55 | /* news and twitter */ 56 | .news, .twitterstatus 57 | { 58 | min-height: 30em; 59 | } 60 | 61 | /* paged navigation */ 62 | ol#pagenav li 63 | { 64 | line-height: 1.55em; 65 | } 66 | 67 | ol#pagenav a, ol#pagenav strong, ol#pagenav span 68 | { 69 | width: 1.6em; 70 | height: 1.6em; 71 | line-height: 1.55em; 72 | } 73 | 74 | ol#pagenav li.control a, ol#pagenav li.control span 75 | { 76 | width: 4em; 77 | } 78 | 79 | /* resource index */ 80 | ul#resourceindex li 81 | { 82 | width: 20%; 83 | float: left; 84 | } 85 | 86 | ul#resourceindex.size2 li 87 | { 88 | width: 50%; 89 | } 90 | 91 | ul#resourceindex.size3 li 92 | { 93 | width: 33.333%; 94 | } 95 | 96 | ul#resourceindex.size4 li 97 | { 98 | width: 25%; 99 | } 100 | 101 | ul#resourceindex.size6 li 102 | { 103 | width: 16.666%; 104 | } 105 | 106 | /* table */ 107 | th, td 108 | { 109 | padding: 1.5%; 110 | } 111 | 112 | th 113 | { 114 | padding: 0.5% 1.5%; 115 | } -------------------------------------------------------------------------------- /css/wp-cv/style-desktop.css: -------------------------------------------------------------------------------- 1 | /* 2 | CreationVideo desktop layout 3 | */ 4 | 5 | div.content, nav div.content 6 | { 7 | width: 97%; 8 | max-width: 64em; 9 | margin: 0 auto; 10 | } 11 | 12 | /* grid */ 13 | .s25, .feature, article ul#news li 14 | { 15 | width: 25%; 16 | } 17 | 18 | .s33, .s66 .feature { width: 33%; } 19 | .s50 { width: 50%; } 20 | .s66 { width: 66%; } 21 | .s100 { width: 100%; } 22 | 23 | /* header */ 24 | header 25 | { 26 | height: 58px; 27 | padding: 10px 0; 28 | margin: 0 0 2.2em 0; 29 | border-top: 6px solid #247; 30 | } 31 | 32 | header img 33 | { 34 | float: left; 35 | margin: 0; 36 | max-width: 60%; 37 | } 38 | 39 | header p 40 | { 41 | clear: right; 42 | float: right; 43 | max-width: 100%; 44 | text-align: right; 45 | margin: 0; 46 | } 47 | 48 | header a:link, header a:visited 49 | { 50 | padding: 0 20px; 51 | } 52 | 53 | header a.phone:link 54 | { 55 | font-size: 1.42em; 56 | padding-top: 0.3em; 57 | } 58 | 59 | /* navigation */ 60 | nav 61 | { 62 | position: absolute; 63 | top: 84px; 64 | box-shadow: none; 65 | } 66 | 67 | nav label 68 | { 69 | display: none; 70 | } 71 | 72 | nav ul 73 | { 74 | display: block; 75 | position: static; 76 | width: auto; 77 | padding: 0 0 0 20px; 78 | background-color: transparent; 79 | border-bottom: 0 none; 80 | } 81 | 82 | nav li 83 | { 84 | clear: none; 85 | position: relative; 86 | float: left; 87 | } 88 | 89 | nav a:link, nav a:visited 90 | { 91 | line-height: 2.2em; 92 | padding: 0 15px; 93 | } 94 | 95 | nav ul ul 96 | { 97 | display: none; 98 | position: absolute; 99 | width: 12em; 100 | top: 2.2em; 101 | left: 0; 102 | padding: 0; 103 | background-color: rgba(200,200,200,0.95); 104 | box-shadow: 0 3px 2px rgba(0,0,0,0.3); 105 | } 106 | 107 | nav ul ul li 108 | { 109 | float: none; 110 | } 111 | 112 | nav li:hover ul 113 | { 114 | display: block; 115 | border-bottom: 0 none; 116 | } 117 | 118 | /* paged navigation */ 119 | ol#pagenav li 120 | { 121 | line-height: 1.55em; 122 | } 123 | 124 | ol#pagenav a, ol#pagenav strong, ol#pagenav span 125 | { 126 | width: 1.6em; 127 | height: 1.6em; 128 | line-height: 1.55em; 129 | } 130 | 131 | ol#pagenav li.control a, ol#pagenav li.control span 132 | { 133 | width: 4em; 134 | } 135 | 136 | /* search */ 137 | #search fieldset 138 | { 139 | right: 20px; 140 | width: 28%; 141 | max-width: 15.4em; 142 | } 143 | 144 | /* introduction */ 145 | article#intro div.content > p 146 | { 147 | font-size: 3em; 148 | text-align: left; 149 | padding: 80px 0 0 20px; 150 | margin: 0; 151 | } 152 | 153 | article#intro div.content > p strong.cv 154 | { 155 | font-weight: 300; 156 | } 157 | 158 | article#intro div.vcont 159 | { 160 | padding-right: 20px; 161 | } 162 | 163 | /* video images */ 164 | #intro div.vcont 165 | { 166 | float: right; 167 | width: 648px; 168 | margin: 0 0 0 10px; 169 | } 170 | 171 | div.pc 172 | { 173 | float: right; 174 | width: 388px; 175 | height: 218px; 176 | padding: 33px 86px 82px 90px; 177 | background: url("images/pc.png") 0 0 no-repeat; 178 | } 179 | 180 | /* feature boxes */ 181 | .feature h2 182 | { 183 | height: auto; 184 | white-space: nowrap; 185 | } 186 | 187 | /* news */ 188 | ul#news h3 189 | { 190 | height: 2.5em; 191 | } 192 | 193 | /* footer */ 194 | @media all and (min-width: 58em) { 195 | footer section 196 | { 197 | clear: none; 198 | float: left; 199 | margin: 0; 200 | } 201 | 202 | footer section#copyright 203 | { 204 | float: right; 205 | } 206 | 207 | #copyright p 208 | { 209 | text-align: right; 210 | } 211 | } 212 | 213 | /* form */ 214 | article fieldset label 215 | { 216 | display: inline; 217 | float: left; 218 | width: 30%; 219 | text-align: right; 220 | margin: 0 2% 0 0; 221 | } 222 | 223 | article fieldset .checkbox label 224 | { 225 | float: none; 226 | width: auto; 227 | text-align: left; 228 | margin: 0 0 0 1%; 229 | } 230 | 231 | article fieldset label.help 232 | { 233 | width: 65%; 234 | text-align: left; 235 | margin: 6px 0 1px 33%; 236 | } 237 | 238 | article input, article textarea, article select 239 | { 240 | width: 60%; 241 | } 242 | 243 | article input.sml 244 | { 245 | width: 30%; 246 | } 247 | 248 | article .checkbox input 249 | { 250 | margin-left: 34%; 251 | } 252 | 253 | /* typography */ 254 | article p, article li 255 | { 256 | margin-right: 25%; 257 | } 258 | 259 | blockquote 260 | { 261 | clear: right; 262 | float: right; 263 | margin: 10px 0 20px 20px; 264 | } 265 | 266 | blockquote p 267 | { 268 | margin-right: 10px; 269 | } 270 | 271 | blockquote p.cite 272 | { 273 | text-align: right; 274 | } 275 | 276 | article img 277 | { 278 | clear: right; 279 | float: right; 280 | max-width: 90%; 281 | margin: 0 0 20px 20px; 282 | } 283 | 284 | article p img 285 | { 286 | margin-right: -33%; 287 | } -------------------------------------------------------------------------------- /css/wp-cv/style-ie.css: -------------------------------------------------------------------------------- 1 | /* 2 | CreationVideo IE6/7 stylesheet 3 | grid box content fallback 4 | */ 5 | 6 | .s25, .s33, .s50, .s66, .s100, .feature, article ul#news li 7 | { 8 | width: 46%; 9 | padding: 20px 1.9%; 10 | } 11 | 12 | .s33 { width: 29%; } 13 | .s66 { width: 62%; } 14 | .s100 { width: 96%; } 15 | 16 | div.playlist img 17 | { 18 | width: 24%; 19 | } 20 | 21 | #search input 22 | { 23 | width: 85%; 24 | } -------------------------------------------------------------------------------- /css/wp-cv/style-print.css: -------------------------------------------------------------------------------- 1 | /* 2 | CreationVideo printer-friendly stylesheet 3 | */ 4 | 5 | * 6 | { 7 | color: #000 !important; 8 | } 9 | 10 | body 11 | { 12 | font-size: 80%; 13 | } 14 | 15 | article, footer 16 | { 17 | padding: 0; 18 | } 19 | 20 | div.content 21 | { 22 | margin: 0; 23 | } 24 | 25 | header 26 | { 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | header img 32 | { 33 | max-width: 50%; 34 | } 35 | 36 | article#intro 37 | { 38 | border-bottom: 2px solid #999; 39 | } 40 | 41 | article img 42 | { 43 | clear: right; 44 | float: right; 45 | max-width: 50%; 46 | margin: 0 0 20px 20px; 47 | } 48 | 49 | footer 50 | { 51 | border-top: 1px dotted #999; 52 | background-color: #fff; 53 | } 54 | 55 | aside, nav, hr, div.video, #copyright, p.add, ul#newsnav, ol#pagenav, div.twitterstatus 56 | { 57 | display: none; 58 | } -------------------------------------------------------------------------------- /gulp/sass-prefix-livereload.gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | Gulp.js configuration 3 | Minifies changed images, compiles Sass, auto-prefixes and LiveReloads 4 | 5 | npm install --save-dev gulp-changed gulp-clean gulp-sass gulp-autoprefixer gulp-imagemin gulp-livereload 6 | 7 | LiveReload browser extensions: 8 | http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions- 9 | */ 10 | 11 | // include gulp 12 | var gulp = require('gulp'); 13 | 14 | // include plug-ins 15 | var 16 | changed = require('gulp-changed'), 17 | clean = require('gulp-clean'), 18 | sass = require('gulp-sass'), 19 | autoprefix = require('gulp-autoprefixer'), 20 | imagemin = require('gulp-imagemin'), 21 | livereload = require('gulp-livereload'); 22 | 23 | // constants 24 | var 25 | src = './src/', 26 | dst = './', 27 | images = { 28 | 'in': src + 'images/**/*', 29 | 'out': dst + 'images/' 30 | }, 31 | css = { 32 | 'in': src + 'scss/**/*', 33 | 'out': dst + 'css/' 34 | }, 35 | js = { 36 | 'out': dst + 'js/' 37 | }; 38 | 39 | var update = [dst + '*', js.out + '*']; 40 | 41 | // minify images 42 | gulp.task('images', function() { 43 | return gulp.src(images.in) 44 | .pipe(changed(images.out)) 45 | .pipe(imagemin()) 46 | .pipe(gulp.dest(images.out)); 47 | }); 48 | 49 | // clean CSS folder 50 | gulp.task('cleancss', function() { 51 | return gulp.src(css.out, {read: false}) 52 | .pipe(clean()); 53 | }); 54 | 55 | // compile Sass 56 | gulp.task('sass', ['cleancss'], function() { 57 | return gulp.src(css.in) 58 | .pipe(sass({errLogToConsole: true})) 59 | .pipe(autoprefix("last 1 version", "> 1%", "ie 8")) 60 | .pipe(gulp.dest(css.out)) 61 | .pipe(livereload()); 62 | }); 63 | 64 | // live reload 65 | gulp.task('reload', function() { 66 | return gulp.src(update) 67 | .pipe(livereload()); 68 | }); 69 | 70 | // default task 71 | gulp.task('default', ['sass', 'images', 'reload'], function() { 72 | 73 | // CSS changes 74 | gulp.watch(css.in, ['sass']); 75 | 76 | // image changes 77 | gulp.watch(images.in, ['images']); 78 | 79 | // any change 80 | gulp.watch(update, ['reload']); 81 | 82 | }); 83 | -------------------------------------------------------------------------------- /js/ajax/downloads/download.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.doc -------------------------------------------------------------------------------- /js/ajax/downloads/download.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.exe -------------------------------------------------------------------------------- /js/ajax/downloads/download.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.mp3 -------------------------------------------------------------------------------- /js/ajax/downloads/download.mpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.mpg -------------------------------------------------------------------------------- /js/ajax/downloads/download.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.pdf -------------------------------------------------------------------------------- /js/ajax/downloads/download.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.ppt -------------------------------------------------------------------------------- /js/ajax/downloads/download.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} 2 | {\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} 3 | {\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; 4 | \red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; 5 | \red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext0 Normal;}{\*\cs10 \additive \ssemihidden 6 | Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 7 | \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid1141168\rsid4027650 8 | \rsid4094396\rsid6253514\rsid13527535\rsid13664254\rsid16133420}{\*\generator Microsoft Word 11.0.6502;}{\info{\title This is a downloadable Word document}{\author Craig Buckler}{\operator Craig Buckler}{\creatim\yr2005\mo12\dy5\hr9\min54} 9 | {\revtim\yr2005\mo12\dy5\hr9\min55}{\version3}{\edmins0}{\nofpages1}{\nofwords5}{\nofchars32}{\*\company Digita Open Systems}{\nofcharsws36}{\vern24579}}\paperw11906\paperh16838 10 | \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1 11 | \jexpand\viewkind1\viewscale114\viewzk2\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel 12 | \wrppunct\asianbrkrule\nojkernpunct\rsidroot4027650 \fet0\sectd \linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 13 | \pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 14 | \pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang 15 | {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid4027650 This is a downloadable }{\insrsid4094396 RTF}{\insrsid4027650 document.} 16 | {\insrsid16133420 17 | \par }} -------------------------------------------------------------------------------- /js/ajax/downloads/download.txt: -------------------------------------------------------------------------------- 1 | This is a downloadable text document. -------------------------------------------------------------------------------- /js/ajax/downloads/download.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.xls -------------------------------------------------------------------------------- /js/ajax/downloads/download.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/downloads/download.zip -------------------------------------------------------------------------------- /js/ajax/downloads/downloadhandler.asp: -------------------------------------------------------------------------------- 1 | <% 2 | dim file, filepath, filename, ext, mime, thistype, fso, fileexists, p 3 | file = trim(Request("file")) 4 | fileexists = false 5 | 6 | if file <> "" then 7 | 8 | ' find file location from root 9 | p = instr(file, "://") 10 | if (p > 0) then file = right(file, len(file)-instr(p+3, file, "/")+1) 11 | 12 | ' find file system name 13 | filepath = Server.MapPath(file) 14 | 15 | ' find filename 16 | filename = right(file, len(file)-instrrev(file, "/")) 17 | 18 | ' find extension 19 | ext = lcase(right(filename, len(filename)-instrrev(filename, "."))) 20 | 21 | ' does file exist? 22 | set fso = CreateObject("Scripting.FileSystemObject") 23 | fileexists = fso.FileExists(filepath) 24 | set fso = nothing 25 | 26 | ' define MIME types 27 | set mime = CreateObject("Scripting.Dictionary") 28 | mime.Add "mp3", "audio/mp3" 29 | mime.Add "wav", "audio/x-wav" 30 | mime.Add "wma", "audio/x-ms-wma" 31 | mime.Add "ogg", "audio/x-ogg" 32 | mime.Add "mid", "audio/x-midi" 33 | mime.Add "mpg", "video/mpeg" 34 | mime.Add "mpeg", "video/mpeg" 35 | mime.Add "avi", "video/x-msvideo" 36 | mime.Add "wmv", "video/x-ms-wmv" 37 | mime.Add "mov", "video/quicktime" 38 | mime.Add "qt", "video/quicktime" 39 | 40 | mime.Add "pdf", "application/pdf" 41 | mime.Add "doc", "application/msword" 42 | mime.Add "xls", "application/ms-excel" 43 | mime.Add "ppt", "application/ms-powerpoint" 44 | mime.Add "txt", "text/plain" 45 | mime.Add "rtf", "application/rtf" 46 | 47 | mime.Add "exe", "application/octet-stream" 48 | mime.Add "msi", "application/octet-stream" 49 | mime.Add "iso", "application/octet-stream" 50 | mime.Add "zip", "application/zip" 51 | mime.Add "tar", "application/x-tar" 52 | mime.Add "gz", "application/x-gzip" 53 | mime.Add "rar", "application/rar" 54 | mime.Add "lha", "application/lha" 55 | mime.Add "jar", "application/x-java-archive" 56 | 57 | ' find mime type 58 | if mime.Exists(ext) then thistype = mime.Item(ext) 59 | else thistype = "application/force-download" 60 | 61 | end if 62 | 63 | ' debug 64 | 'Response.Write("

File to download: " & file) 65 | 'Response.Write("

location: " & filepath) 66 | 'Response.Write("

filename: " & filename) 67 | 'Response.Write("

ext: " & ext & " = " & thistype) 68 | 'Response.End 69 | 70 | if fileexists then 71 | 72 | Response.Addheader "Pragma","no-cache" 73 | Response.Addheader "Expires","0" 74 | Response.Addheader "Content-Disposition","attachment; filename=""" & filename &"""" 75 | Response.ContentType = thistype 76 | Response.CacheControl = "public, must-revalidate" 77 | 78 | ' send file 79 | Dim fStream 80 | Set fStream = Server.CreateObject("ADODB.Stream") 81 | fStream.Open 82 | fStream.Type = 1 83 | fStream.LoadFromFile filepath 84 | Response.BinaryWrite fStream.read 85 | Set fStream = Nothing 86 | 87 | else 88 | 89 | ' file not found 90 | Response.Status="404 Not Found" 91 | response.write "" 92 | response.write "file not found" 93 | response.write "

file not found

Sorry, but the file you requested could not be found.

Please click back to return to the page you were viewing.

" 94 | response.write "" 95 | 96 | end if 97 | 98 | Response.End 99 | %> -------------------------------------------------------------------------------- /js/ajax/downloads/downloadhandler.php: -------------------------------------------------------------------------------- 1 | 0) { 7 | 8 | // find file location from root 9 | $p = strpos($file, '://'); 10 | if ($p > 0) $file = substr($file, strpos($file, '/', $p+3)+1); 11 | 12 | // find physical file location 13 | $filepath = str_repeat('../', substr_count($_SERVER["PHP_SELF"], '/')-1).$file; 14 | $filepath = realpath($filepath); 15 | 16 | // find filename 17 | $filename = substr(strrchr($file,'/'),1); 18 | 19 | // find extension 20 | $ext = strtolower(substr(strrchr($file,'.'),1)); 21 | 22 | // does file exist 23 | $fileexists = file_exists($filepath); 24 | 25 | // determine mime type 26 | switch($ext) 27 | { 28 | case "mp3": $mime="audio/mp3"; break; 29 | case "wav": $mime="audio/x-wav"; break; 30 | case "wma": $mime="audio/x-ms-wma"; break; 31 | case "ogg": $mime="audio/x-ogg"; break; 32 | case "mid": $mime="audio/x-midi"; break; 33 | case "mpg": $mime="video/mpeg"; break; 34 | case "mpeg": $mime="video/mpeg"; break; 35 | case "avi": $mime="video/x-msvideo"; break; 36 | case "wmv": $mime="video/x-ms-wmv"; break; 37 | case "mov": $mime="video/quicktime"; break; 38 | case "qt": $mime="video/quicktime"; break; 39 | 40 | case "pdf": $mime="application/pdf"; break; 41 | case "doc": $mime="application/msword"; break; 42 | case "xls": $mime="application/ms-excel"; break; 43 | case "ppt": $mime="application/ms-powerpoint"; break; 44 | case "txt": $mime="text/plain"; break; 45 | case "rtf": $mime="application/rtf"; break; 46 | 47 | case "exe": $mime="application/octet-stream"; break; 48 | case "msi": $mime="application/octet-stream"; break; 49 | case "iso": $mime="application/octet-stream"; break; 50 | case "zip": $mime="application/zip"; break; 51 | case "tar": $mime="application/x-tar"; break; 52 | case "gz": $mime="application/x-gzip"; break; 53 | case "rar": $mime="application/rar"; break; 54 | case "lha": $mime="application/lha"; break; 55 | case "jar": $mime="application/x-java-archive"; break; 56 | 57 | default: $mime="application/force-download"; break; 58 | } 59 | 60 | } 61 | 62 | /* 63 | // debug 64 | echo("

file: $file

"); 65 | echo("

filepath: $filepath

"); 66 | echo("

filename: $filename

"); 67 | echo("

ext: $ext

"); 68 | echo("

fileexists: $fileexists

"); 69 | echo("

mime: $mime

"); 70 | */ 71 | 72 | if ($fileexists) { 73 | 74 | if(ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 'Off'); 75 | header('Pragma: public'); 76 | header('Expires: 0'); 77 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); 78 | header('Cache-Control: private',false); 79 | header("Content-Type: $mime"); 80 | header("Content-Disposition: attachment; filename=\"$filename\""); 81 | header("Content-Transfer-Encoding: binary"); 82 | header("Content-Length: ".filesize($filepath)); 83 | readfile($filepath); 84 | 85 | } 86 | else { 87 | 88 | // file not found 89 | header('HTTP/1.0 404 Not Found'); 90 | echo(''); 91 | echo('file not found'); 92 | echo('

file not found

Sorry, but the file you requested could not be found.

Please click back to return to the page you were viewing.

'); 93 | echo(''); 94 | 95 | } 96 | 97 | exit(); 98 | ?> 99 | -------------------------------------------------------------------------------- /js/ajax/images/city.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/city.jpg -------------------------------------------------------------------------------- /js/ajax/images/citythumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/citythumb.jpg -------------------------------------------------------------------------------- /js/ajax/images/exmouth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/exmouth.jpg -------------------------------------------------------------------------------- /js/ajax/images/exmouththumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/exmouththumb.jpg -------------------------------------------------------------------------------- /js/ajax/images/icons/iconaudio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconaudio.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/icondoc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/icondoc.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconemail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconemail.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconexe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconexe.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconfeed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconfeed.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconimage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconimage.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconpdf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconpdf.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconppt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconppt.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/icontext.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/icontext.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconvcard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconvcard.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconvideo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconvideo.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconweb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconweb.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconxls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconxls.gif -------------------------------------------------------------------------------- /js/ajax/images/icons/iconzip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/icons/iconzip.gif -------------------------------------------------------------------------------- /js/ajax/images/screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/screenshot.gif -------------------------------------------------------------------------------- /js/ajax/images/screenshotthumb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/screenshotthumb.gif -------------------------------------------------------------------------------- /js/ajax/images/sliderh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/sliderh.gif -------------------------------------------------------------------------------- /js/ajax/images/sliderh1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/sliderh1.gif -------------------------------------------------------------------------------- /js/ajax/images/sliderscale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/sliderscale.gif -------------------------------------------------------------------------------- /js/ajax/images/sliderv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/sliderv.gif -------------------------------------------------------------------------------- /js/ajax/images/sliderv1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/ajax/images/sliderv1.gif -------------------------------------------------------------------------------- /js/ajax/imagescroller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaScript testbed 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

JavaScript testbed: image scroller

17 | 18 |

Creates a cross-browser image scroller.

19 | 20 |
21 | screenshot 22 | 23 | screenshot 24 | 25 | screenshot 26 |
27 | 28 |

ImageScroller system

29 | 30 |

This system scrolls an image within the thumbnail area when the cursor moves over it.

31 | 32 |

Any <a> link to an image that has a class including "imagescroller" and a child <img> node will have the ImageScroller system applied, i.e.

33 | 34 |
35 | <a href="images/large.jpg" class="imagescroller" title="click to enlarge">
36 | 	<img src="images/thumb.jpg" alt="screenshot" />
37 | </a>
38 | 
39 | 40 |

The function ImageScrollerSetup() is run when the page loads. This function will look for appropriate image links and apply the appropriate event handlers. ImageScrollerSetup() can be run again if further image links are added to the DOM. Image links that are already controlled will not be affected.

41 | 42 |

Notes:

43 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /js/ajax/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaScript library testbed 6 | 7 | 8 | 9 | 10 |

JavaScript library testbed

11 | 12 |

The following JavaScript libraries and objects provide cross-browser functionality (IE5.0+, Mozilla, Firefox, Opera, Konqueror and others):

13 | 14 |

general libraries

15 | 19 | 20 |

DOM manipulation and graphic effects

21 | 31 | 32 |

web service (AJAX) libraries

33 | 37 | 38 |

form controls

39 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /js/ajax/misc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaScript testbed: client-side DOM handler 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

JavaScript testbed: miscellaneous functions

15 | 16 |

Miscellaneous function testing.

17 | 18 | 21 | 22 | 62 | 63 |

misc.js

64 |

The following functions are provided in misc.js.

65 | 66 |

toInt() integer conversion

67 |

Any object or value can be converted to an integer using object.toInt().

68 | 69 | 70 |

String prototypes

71 |

The following String prototypes are provided:

72 | 73 | 89 | 90 |

Array prototypes

91 |

The following Array prototypes are provided:

92 | 93 | 109 | 110 |

HTTParguments()

111 |

This function returns an associative array of HTTP GET arguments passed on the URL, e.g. var a = HTTParguments(); if (a.Exists("id")) alert("ID = "+a.id);

112 | 113 |

Cookie functions

114 |

The following cookie functions are provided:

115 | 116 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /js/ajax/resources/import.css: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | color: #f00; 4 | } -------------------------------------------------------------------------------- /js/ajax/resources/import.js: -------------------------------------------------------------------------------- 1 | // this JavaScript is imported 2 | alert("JS successfully imported!\nNote that this has loaded after the page load,\nso further window.onload events will not fire."); -------------------------------------------------------------------------------- /js/ajax/resources/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is the document title 5 | Craig Buckler 6 | 7 | This is some XML that has been transformed using XSLT. 8 | If you can read this, the transformation was successful. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /js/ajax/resources/test.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ]]> 6 | 7 | 8 |
9 | 10 | 11 |
12 |
13 | 14 | 15 |

16 |
17 | 18 | 19 |

20 |
21 | 22 | 23 |

24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /js/ajax/scriptlibrary/events v1.js: -------------------------------------------------------------------------------- 1 | /* 2 | Event class, by Craig Buckler 3 | Creates a cross-browser event object. 4 | All added events are detached when the page unloads to prevent browser memory leaks. 5 | Note that window.unload events can not be automatically detached. 6 | 7 | Dependencies: 8 | misc.js (if IE5 is supported) 9 | */ 10 | function Event(element, eventType, eventHandler) { 11 | 12 | // reference to this object 13 | var thisEvent = this; 14 | 15 | // event object 16 | this.Raised = null; 17 | 18 | // handler function (parses event and passes reference to this) 19 | var handler = function(e) { thisEvent.Raised = new EventInformation(e); eventHandler(thisEvent); } 20 | 21 | // attach event 22 | try { 23 | if (element.addEventListener) element.addEventListener(eventType, handler, false); 24 | else if (element.attachEvent) var evt = element.attachEvent("on"+eventType, handler); 25 | else element["on"+eventType] = handler; 26 | } 27 | catch (e) {} 28 | 29 | // add to event manager (if not a window unload) 30 | if (element !== window || eventType != "unload") EventManager.Add(this); 31 | 32 | // detach event method 33 | this.Detach = function() { 34 | try { 35 | if (element.removeEventListener) element.removeEventListener(eventType, handler, false); 36 | else if (element.detachEvent) var evt = element.detachEvent("on"+eventType, handler); 37 | else element["on"+eventType] = null; 38 | } 39 | catch(e) {} 40 | } 41 | 42 | } 43 | 44 | 45 | // Event information object (cross-browser) 46 | function EventInformation(event, stopPropagation, stopDefault) { 47 | 48 | // store event 49 | this.Event = (event ? event : window.event); 50 | 51 | // default values 52 | this.Type = ""; 53 | this.Element = null; 54 | this.Key = ""; 55 | this.ControlKey = ""; 56 | this.Shift = false; 57 | this.Ctrl = false; 58 | this.Alt = false; 59 | this.MouseX = 0; 60 | this.MouseY = 0; 61 | 62 | if (this.Event) { 63 | // event type 64 | this.Type = String(event.type).toLowerCase(); 65 | 66 | // source element 67 | this.Element = (event.target ? event.target : event.srcElement); 68 | 69 | // standard key press 70 | var keyCode = (this.Event.keyCode ? this.Event.keyCode : this.Event.charCode); 71 | if (this.Event.charCode != 0 && keyCode >= 32) this.Key = String.fromCharCode(keyCode); 72 | 73 | // control key press 74 | if (this.Key == "") { 75 | this.ControlKey = ControlKeys[keyCode]; 76 | if (!this.ControlKey) this.ControlKey = ""; 77 | } 78 | 79 | // action keys 80 | this.Ctrl = event.ctrlKey; 81 | this.Alt = event.altKey; 82 | this.Shift = event.shiftKey; 83 | 84 | // mouse co-ordinates 85 | var mre = /mouse|click/i; 86 | if (mre.test(this.Type)) { 87 | this.MouseX = (this.Event.pageX ? this.Event.pageX : this.Event.clientX + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft)); 88 | this.MouseY = (this.Event.pageY ? this.Event.pageY : this.Event.clientY + Math.max(document.documentElement.scrollTop, document.body.scrollTop)); 89 | } 90 | 91 | // default actions 92 | if (stopPropagation) this.StopPropagation(); 93 | if (stopDefault) this.StopDefaultAction(); 94 | } 95 | } 96 | 97 | 98 | // stop event propagation 99 | EventInformation.prototype.StopPropagation = function() { 100 | if (this.Event) { 101 | try { this.Event.stopPropagation(); } catch(e) {} 102 | this.Event.cancelBubble = true; 103 | } 104 | } 105 | 106 | 107 | // stop event default action 108 | EventInformation.prototype.StopDefaultAction = function() { 109 | if (this.Event) { 110 | try { this.Event.preventDefault(); } catch(e) {} 111 | this.Event.returnValue = false; 112 | } 113 | } 114 | 115 | 116 | // control key definitions 117 | var ControlKeys = []; ControlKeys[8] = "backspace"; ControlKeys[9] = "tab"; ControlKeys[13] = "enter"; ControlKeys[27] = "esc"; ControlKeys[33] = "pageup"; ControlKeys[34] = "pagedown"; ControlKeys[35] = "end"; ControlKeys[36] = "home"; ControlKeys[37] = "left"; ControlKeys[38] = "up"; ControlKeys[39] = "right"; ControlKeys[40] = "down"; ControlKeys[45] = "insert"; ControlKeys[46] = "delete"; ControlKeys[112] = "f1"; ControlKeys[113] = "f2"; ControlKeys[114] = "f3"; ControlKeys[115] = "f4"; ControlKeys[116] = "f5"; ControlKeys[117] = "f6"; ControlKeys[118] = "f7"; ControlKeys[119] = "f8"; ControlKeys[120] = "f9"; ControlKeys[121] = "f10"; ControlKeys[122] = "f11"; ControlKeys[123] = "f12"; ControlKeys[144] = "numlock"; ControlKeys[145] = "scrolllock"; 118 | 119 | 120 | // event manager object 121 | var EventManager = new function() { 122 | 123 | // initialise event stack 124 | var eStack = null; 125 | this.Initialise = function() { 126 | if (eStack == null) { eStack = new Array(); new Event(window, "unload", this.CleanUp); } 127 | } 128 | 129 | // add an event to the stack (except window unload events) 130 | this.Add = function(event) { this.Initialise(); eStack.push(event); } 131 | 132 | // detach all stacked events 133 | this.CleanUp = function(e) { while (eStack.length > 0) eStack.pop().Detach(); } 134 | } -------------------------------------------------------------------------------- /js/ajax/scriptlibrary/imagescroller.js: -------------------------------------------------------------------------------- 1 | /* 2 | ImageScroller, by Craig Buckler 3 | Scrolls an image when a mouseover occurs over the thumbnail 4 | 5 | Dependencies: 6 | misc.js (if IE5 is supported) 7 | events.js 8 | dom.js 9 | graphic.js 10 | */ 11 | new Event(window, "load", ImageScrollerSetup); 12 | 13 | var ISfadeOn = true; // switch fade on/off 14 | var ISfadeStep = 2; // fade steps (1 - 100) 15 | var ISfadePause = 10; // fade pause between steps 16 | 17 | // find links with class of imagescroller 18 | function ImageScrollerSetup() { 19 | var links = DOM.Class("imagescroller", "a"); 20 | for (var i = 0; i < links.length; i++) if (links[i].getAttribute("imagescroller") != 'true') new ImageScroller(links[i]); 21 | } 22 | 23 | // define ImageScroller 24 | function ImageScroller(aNode) { 25 | 26 | var IS = this; // this object 27 | 28 | // set image background and mousemove event 29 | this.Initialise = function() { 30 | aNode.style.backgroundImage = "url("+fImage.src+")"; 31 | aNode.style.backgroundRepeat = "no-repeat"; 32 | aNode.style.cursor = "move"; 33 | Graphic.Opacity(iNode, fop, true); 34 | new Event(aNode, "mouseover", function(evt) { IS.MoveEvent(evt); }); 35 | new Event(aNode, "mousemove", function(evt) { IS.PositionImage(evt); }); 36 | new Event(aNode, "mouseout", function(evt) { IS.MoveEvent(evt); }); 37 | } 38 | 39 | // show or hide image 40 | this.MoveEvent = function(evt) { 41 | if (ftimer) clearInterval(ftimer); 42 | if (evt.Raised.Type == "mouseover") { 43 | aX = DOM.AbsoluteX(aNode); aY = DOM.AbsoluteY(aNode); // find element location (if screen resized) 44 | if (ISfadeOn) ftimer = setInterval(function() { IS.Fade(-ISfadeStep); }, ISfadePause); else iNode.style.visibility = "hidden"; 45 | } 46 | else if (evt.Raised.Type == "mouseout") { 47 | if (ISfadeOn) ftimer = setInterval(function() { IS.Fade(ISfadeStep); }, ISfadePause); else iNode.style.visibility = "visible"; 48 | } 49 | } 50 | 51 | // fade the image 52 | this.Fade = function(step) { 53 | fop += step; 54 | fop = (fop <= 0 ? 0 : (fop >= 100 ? 100 : fop)); 55 | Graphic.Opacity(iNode, fop, true); 56 | if (fop == 0 || fop == 100) clearInterval(ftimer); 57 | } 58 | 59 | // position the image 60 | this.PositionImage = function(evt) { 61 | var piX = parseInt(((evt.Raised.MouseX - aX) / aW) * 100); piX = (piX < 5 ? 0 : (piX > 95 ? 100 : piX)); 62 | var piY = parseInt(((evt.Raised.MouseY - aY) / aH) * 100); piY = (piY < 5 ? 0 : (piY > 95 ? 100 : piY)); 63 | aNode.style.backgroundPosition = piX+"% "+piY+"%"; 64 | } 65 | 66 | // setup 67 | var iNode = DOM.Tags("img", aNode); 68 | if (iNode.length > 0) iNode = iNode[0]; else iNode = null; 69 | 70 | var ext = /\.(gif|jpg|jpeg|png|bmp)$/i; 71 | if (iNode && aNode.getAttribute("imagescroller") != 'true' && ext.test(aNode.getAttribute("href").Trim())) { 72 | 73 | // mark as controlled 74 | aNode.setAttribute("imagescroller", "true"); 75 | 76 | // element dimensions 77 | var aX = DOM.AbsoluteX(aNode); var aY = DOM.AbsoluteY(aNode); 78 | var aW = aNode.offsetWidth; var aH = aNode.offsetHeight; 79 | 80 | // fade opacity and timer 81 | var fop = 100; 82 | var ftimer; 83 | 84 | // load image and initialise 85 | var fImage = new Image; 86 | fImage.src = aNode.getAttribute("href"); 87 | if (fImage.complete) this.Initialise(); 88 | else new Event(fImage, "load", function(evt) { IS.Initialise(); }); 89 | } 90 | } -------------------------------------------------------------------------------- /js/ajax/scriptlibrary/misc.js: -------------------------------------------------------------------------------- 1 | // miscellaneous functions, by Craig Buckler 2 | 3 | // ________________________________________________________ 4 | // convert a value to an integer 5 | Object.prototype.toInt = function() { 6 | var str = String(this); 7 | str = str.replace(/[^0-9-.]/g, ""); 8 | var ret = parseInt(str, 10); 9 | if (isNaN(ret)) ret = 0; 10 | return ret; 11 | } 12 | 13 | 14 | // ________________________________________________________ 15 | // string trimming 16 | String.prototype.Trim = function() { return this.replace(/^\s*|\s*$/g, ""); } 17 | 18 | // string cleaning 19 | String.prototype.Clean = function() { return this.replace(/[^\w|\s|@|&|.|,|!|%|(|)|+|-]/g, "").replace(/_/g, " ").replace(/\s+/g, " ").Trim(); } 20 | 21 | // string padding 22 | String.prototype.Pad = function(length, padChar) { 23 | var str = String(this); 24 | length = length.toInt(); 25 | if (typeof padChar == 'undefined') padChar = " "; 26 | else { 27 | padChar = String(padChar); 28 | if (padChar.length < 1) padChar = " "; 29 | } 30 | while (str.length < length) str = padChar + str; 31 | return str; 32 | } 33 | 34 | // convert a serial YYYYMMDD string to a date 35 | String.prototype.SerialToDate = function() { 36 | var d = String(this); 37 | d = d.Trim(); 38 | var date = (d.length >= 8 ? new Date(d.substr(0,4).toInt(), d.substr(4,2).toInt() - 1, d.substr(6,2).toInt()) : new Date()); 39 | return date; 40 | } 41 | 42 | // convert a date to serial YYYYMMDD format 43 | Date.prototype.DateToSerial = function() { 44 | return String(this.getFullYear()).Pad(4,"0")+String(this.getMonth()+1).Pad(2,"0")+String(this.getDate()).Pad(2,"0"); 45 | } 46 | 47 | 48 | // ________________________________________________________ 49 | // array stack push (if unsupported) 50 | if (!Array.prototype.push) { Array.prototype.push = function(element) { this[this.length] = element; } } 51 | 52 | // array stack pop (if unsupported) 53 | if (!Array.prototype.pop) { 54 | Array.prototype.pop = function() { 55 | var ret; 56 | if (this.length > 0) { 57 | ret = this[this.length-1]; 58 | this.length--; 59 | } 60 | return ret; 61 | } 62 | } 63 | 64 | 65 | // ________________________________________________________ 66 | // does associative array item exist? 67 | Array.prototype.Exists = function(key) { 68 | var type = typeof(this[key]); 69 | return (type != 'undefined' && type != 'function'); 70 | } 71 | 72 | // save array to cookie 73 | Array.prototype.StoreAll = function(name, minutes) { 74 | var values = ""; 75 | for (var key in this) if (typeof(this[key]) != 'function') values += (values == "" ? "" : "[:]") + key + "[=]" + String(this[key]); 76 | CookieSet(name, values, minutes); 77 | } 78 | 79 | // load array from cookie 80 | Array.prototype.LoadAll = function(name) { 81 | var allValues = CookieGet(name); 82 | var values = allValues.split("[:]"); 83 | var thisValue; 84 | for (var i = 0; i < values.length; i++) { 85 | thisValue = values[i].split("[=]"); 86 | if (thisValue.length == 2) { 87 | if (thisValue[1] == "true" || thisValue[1] == "false") this[thisValue[0]] = (thisValue[1] == "true"); // boolean values 88 | else this[thisValue[0]] = thisValue[1]; // other values 89 | } 90 | } 91 | } 92 | 93 | 94 | // ________________________________________________________ 95 | // parse querystring arguments 96 | function HTTParguments() { 97 | var args = new Array(); 98 | var arglist = location.search.Trim(); 99 | if (arglist.charAt(0) == '?') arglist = arglist.substr(1); 100 | var argsep = arglist.split('&'); 101 | var thisValue; 102 | for (var i = 0; i < argsep.length; i++) { 103 | thisValue = argsep[i].split("="); 104 | if (thisValue.length == 2) args[unescape(thisValue[0])] = unescape(thisValue[1]); 105 | } 106 | return args; 107 | } 108 | 109 | 110 | // ________________________________________________________ 111 | // set a cookie value (path set to root) 112 | function CookieSet(name, value, minutes) { 113 | value = String(value).replace(/\r/g, "").replace(/\n/g, "[#]"); 114 | if (minutes) { 115 | var date = new Date(); 116 | date.setTime(date.getTime()+(minutes*60000)); 117 | var expires = "; expires="+date.toGMTString(); 118 | } 119 | else expires = ""; 120 | document.cookie = name+"="+String(value)+expires+"; path="+location.pathname.substr(0, location.pathname.indexOf("/",1)+1); 121 | } 122 | 123 | // read a cookie value 124 | function CookieGet(name) { 125 | var ret = ""; 126 | name += "="; 127 | var allCookies = document.cookie.split(';'); 128 | var thisCookie; 129 | for(var i = 0; i < allCookies.length && ret == ""; i++) { 130 | thisCookie = allCookies[i].Trim(); 131 | if (thisCookie.indexOf(name) == 0) ret = thisCookie.substring(name.length).replace(/\[#\]/g, "\n"); 132 | } 133 | return ret; 134 | } 135 | 136 | // are cookies enabled? 137 | function CookiesEnabled() { 138 | CookieSet("testcookie", "testvalue", 0.05); 139 | return (CookieGet("testcookie") == "testvalue"); 140 | } -------------------------------------------------------------------------------- /js/ajax/scriptlibrary/styles.js: -------------------------------------------------------------------------------- 1 | /* 2 | StyleHandler class (static), by Craig Buckler 3 | Provides CSS switching functionality in all browsers 4 | 5 | Dependencies: 6 | misc.js (if IE5 is supported) 7 | events.js 8 | dom.js 9 | */ 10 | var StyleHandler = new function() { 11 | 12 | var DefaultTitle = "default style"; // default style title (if not defined) 13 | var AlternateTitle = "alternate style"; // alternate style title (if not defined) 14 | 15 | var Styles; // stylesheet array 16 | var Initialised = false; // true when StyleHandler has been initialised 17 | 18 | // initialise StyleHandler 19 | this.Initialise = function() { 20 | 21 | if (!Initialised) { 22 | Initialised = true; // StyleHandler initialised 23 | 24 | // find style declarations 25 | var slist = DOM.Tags("link"); 26 | var title, rel, media; 27 | 28 | // examine styles 29 | for (var i = 0; i < slist.length; i++) { 30 | title = slist[i].getAttribute("title"); 31 | rel = slist[i].getAttribute("rel"); 32 | media = slist[i].getAttribute("media"); 33 | 34 | // set default titles 35 | if (!title && (!media || media == "screen")) { 36 | if (rel && rel.indexOf("style") >= 0 && rel.indexOf("alt") < 0) title = DefaultTitle; else title = AlternateTitle; 37 | slist[i].setAttribute("title", title); 38 | } 39 | 40 | // set screen media 41 | if (!media) slist[i].setAttribute("media", "screen"); 42 | } 43 | } 44 | } 45 | 46 | 47 | // returns current stylesheet 48 | this.Current = function() { 49 | this.Initialise(); 50 | var slist = DOM.Tags("link"); 51 | var current = ""; 52 | for (var i = 0; i < slist.length && current == ""; i++) if (!slist[i].disabled) current = slist[i].getAttribute("title"); 53 | return current; 54 | } 55 | 56 | 57 | // return an array of style titles 58 | this.Titles = function() { 59 | this.Initialise(); 60 | var slist = DOM.Tags("link"); 61 | var titles = new Array(); 62 | var title, media, exists, i, j; 63 | 64 | for (i = 0; i < slist.length; i++) { 65 | title = slist[i].getAttribute("title"); 66 | media = slist[i].getAttribute("media").Trim().toLowerCase(); 67 | 68 | if (title != "" && media == "screen") { 69 | exists = false; 70 | for (j = 0; j < titles.length && !exists; j++) if (titles[j] == title) exists = true; 71 | if (!exists) titles.push(title); 72 | } 73 | } 74 | return titles; 75 | } 76 | 77 | 78 | // activate a style 79 | this.Activate = function(styletitle) { 80 | this.Initialise(); 81 | var found = null; 82 | var currentstyle = null; 83 | var firststyle = null; 84 | var current = this.Current(); 85 | var slist = DOM.Tags("link"); 86 | var title, media, i; 87 | 88 | for (i = 0; i < slist.length; i++) { 89 | 90 | title = slist[i].getAttribute("title"); 91 | media = slist[i].getAttribute("media").Trim().toLowerCase(); 92 | 93 | if (title != "" && media == "screen") { 94 | if (found == null && title == styletitle) found = i; 95 | if (currentstyle == null && title == current) currentstyle = i; 96 | if (firststyle == null) firststyle = i; 97 | slist[i].disabled = true; // disable style 98 | } 99 | } 100 | 101 | // enable style (if not found, use current or first defined style) 102 | i = (found != null ? found : (currentstyle != null ? currentstyle : firststyle)); 103 | if (i != null) { slist[i].disabled = false; slist[i].disabled = true; slist[i].disabled = false; } 104 | this.SavePreference(); 105 | } 106 | 107 | 108 | // load user preference 109 | this.LoadPreference = function() { 110 | this.Initialise(); 111 | this.Activate(CookieGet("stylepref")); 112 | } 113 | 114 | 115 | // save user preference 116 | this.SavePreference = function() { 117 | this.Initialise(); 118 | CookieSet("stylepref", this.Current(), 10080); // store preference for 7 days 119 | } 120 | } 121 | 122 | // initialise StyleHandler 123 | new Event(window, "unload", function(evt) { StyleHandler.SavePreference(); }); 124 | new Event(window, "load", function(evt) { StyleHandler.LoadPreference(); }); -------------------------------------------------------------------------------- /js/ajax/scriptlibrary/xml.js: -------------------------------------------------------------------------------- 1 | /* 2 | XML class (static), by Craig Buckler 3 | Provides various XML manipulation methods 4 | 5 | Dependencies: 6 | none 7 | */ 8 | var XML = new function() { 9 | 10 | // common node types 11 | this.ElementNode = 1; 12 | this.AttributeNode = 2; 13 | this.TextNode = 3; 14 | this.CommentNode = 8; 15 | 16 | 17 | // create a new XML document 18 | this.New = function() { 19 | var xml = null; 20 | if (document.implementation && document.implementation.createDocument) { 21 | try { xml = document.implementation.createDocument("", "xml", null); } 22 | catch(e) {} 23 | } 24 | else { 25 | var ieDOM = [ "MSXML4.DOMDocument", "MSXML3.DOMDocument", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]; 26 | for (var i = 0; i < ieDOM.length && !xml; i++) { 27 | try { xml = new ActiveXObject(ieDOM[i]); } 28 | catch(e) {} 29 | } 30 | } 31 | return xml; 32 | } 33 | 34 | 35 | // transform XML using XSL 36 | this.Transform = function() { 37 | var trans = null; 38 | if (window.XSLTProcessor) { 39 | try { 40 | var xslp = new XSLTProcessor(); 41 | xslp.importStylesheet(xsl); 42 | trans = xslp.transformToDocument(xml, document); 43 | } 44 | catch(e) {} 45 | } 46 | else { 47 | try { 48 | trans = this.New(); 49 | trans.loadXML( xml.transformNode(xsl) ); 50 | } 51 | catch(e) {} 52 | } 53 | 54 | if (trans.documentElement.childNodes.length == 0) trans = null; 55 | return trans; 56 | } 57 | 58 | 59 | // copies the children of addNode (in an XML document) to the children of docNode (DOM, XML document, etc.) 60 | this.Copy = function(addNode, docNode, level) { 61 | 62 | if (typeof level == "undefined") level = 1; 63 | 64 | // create node 65 | if (addNode.nodeType == this.ElementNode && level != 1) { 66 | 67 | var i; 68 | var thisNode = document.createElement(addNode.nodeName); 69 | 70 | // append attributes 71 | for (i = 0; i < addNode.attributes.length; i++) { 72 | if (addNode.attributes[i].name == "class") thisNode.className = addNode.attributes[i].value; // class attribute fails in IE 73 | else thisNode.setAttribute(addNode.attributes[i].name, addNode.attributes[i].value); 74 | } 75 | 76 | // add node to document 77 | docNode = docNode.appendChild(thisNode); 78 | } 79 | 80 | // append text node (ensure it is not a comment) 81 | if (addNode.nodeType == this.TextNode && addNode.nodeValue && level != 1) { 82 | var nval = addNode.nodeValue.Trim(); 83 | if (nval.indexOf("") != (nval.length - 3)) docNode.appendChild(document.createTextNode(nval)); 84 | } 85 | 86 | // recurse child nodes 87 | for (i = 0; i < addNode.childNodes.length; i++) this.Copy(addNode.childNodes[i], docNode, level+1); 88 | 89 | // return document 90 | return docNode; 91 | } 92 | 93 | 94 | // removes all node children 95 | this.RemoveChildren = function(node) { 96 | while (node.lastChild) node.removeChild(node.lastChild); 97 | } 98 | 99 | } -------------------------------------------------------------------------------- /js/ajax/styles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaScript testbed: client-side DOM handler 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

JavaScript testbed: client-side style handler

20 | 21 |

Cross-browser style switcher and handler. Choose your style...

22 | 23 |

24 | 25 |

Show a list of all styles...

26 | 27 | 28 | 72 | 73 |

StyleHandler class (static)

74 |

Provides CSS switching functionality in all browsers.

75 | 76 |

Public methods

77 |
78 |
StyleHandler.Current()
returns the title of the active style
79 |
StyleHandler.Titles()
returns an array of all style titles
80 |
StyleHandler.Activate(string title)
sets the active style (will revert to the current one if the title is not valid)
81 |
StyleHandler.LoadPreference()
sets the user's saved style (done automatically on page load)
82 |
StyleHandler.SavePreference()
stores the user's style (done on page unload and when Activate is called)
83 |
84 | 85 |

Notes

86 |

It was intended to provide load and unload events whenever a new style was activated. However, since some browsers natively support style switching, this could not easily be implemented. The only solution would be to periodically check the default stylesheet and run events accordingly.

87 | 88 |

Event handlers have therefore been removed. If a style implements functionality that is not required in an alternative style, e.g. a drop-down menu, you will either need to create a style watcher, or (preferably) implement appropriate show/hide selectors in the CSS.

89 | 90 | 91 | -------------------------------------------------------------------------------- /js/ajax/styles/imagescroller.css: -------------------------------------------------------------------------------- 1 | /* ImageScroller styles */ 2 | a.imagescroller, a.imagescroller:hover 3 | { 4 | display: block; 5 | float: left; 6 | padding: 0; 7 | margin: 1em; 8 | border: 1px solid #000; 9 | } 10 | 11 | a.imagescroller img 12 | { 13 | display: block; 14 | border-style: none; 15 | } -------------------------------------------------------------------------------- /js/ajax/styles/lists.css: -------------------------------------------------------------------------------- 1 | html { padding: 0; margin: 0; } /* Opera override */ 2 | 3 | #controls ul, #controls ol 4 | { 5 | padding: 0; 6 | margin: 2em 0 2em 30%; 7 | } 8 | 9 | #controls li 10 | { 11 | display: block; 12 | width: 10em; 13 | padding: 2px; 14 | margin: 2px; 15 | background-color: #fff; 16 | border: 1px solid #7f9db9; 17 | cursor: n-resize; 18 | } 19 | 20 | #controls li.move 21 | { 22 | background-color: #d8e0e9; 23 | } 24 | 25 | #controls .horizontal 26 | { 27 | display: block; 28 | height: 2em; 29 | overflow: auto; 30 | margin: 2em 0 2em 10%; 31 | } 32 | 33 | #controls .horizontal li 34 | { 35 | display: inline; 36 | float: left; 37 | width: 6em; 38 | cursor: e-resize; 39 | } -------------------------------------------------------------------------------- /js/ajax/styles/popup.css: -------------------------------------------------------------------------------- 1 | /* link handler styles */ 2 | 3 | a { font-weight: bold; color: #00c; text-decoration: none; border-style: none; } 4 | a:visited { color: #c0c; } 5 | a:hover { text-decoration: underline; border-style: none; } 6 | 7 | a.image, a.sound, a.video, a.document, a.application, a.archive, a.website, a.email, a.feed 8 | { 9 | min-height: 16px; 10 | padding-left: 19px; 11 | background-position: left center; 12 | background-repeat: no-repeat; 13 | } 14 | 15 | a.image { background-image: url("../images/icons/iconimage.gif"); } 16 | 17 | a.sound { background-image: url("../images/icons/iconaudio.gif"); } 18 | a.video { background-image: url("../images/icons/iconvideo.gif"); } 19 | 20 | a.document { background-image: url("../images/icons/icontext.gif"); } 21 | a.pdf { background-image: url("../images/icons/iconpdf.gif"); } 22 | a.doc { background-image: url("../images/icons/icondoc.gif"); } 23 | a.xls { background-image: url("../images/icons/iconxls.gif"); } 24 | a.ppt { background-image: url("../images/icons/iconppt.gif"); } 25 | 26 | a.application { background-image: url("../images/icons/iconexe.gif"); } 27 | a.archive { background-image: url("../images/icons/iconzip.gif"); } 28 | 29 | a.website { background-image: url("../images/icons/iconweb.gif"); } 30 | a.email { background-image: url("../images/icons/iconemail.gif"); } 31 | a.feed { background-image: url("../images/icons/iconfeed.gif"); } 32 | 33 | #links 34 | { 35 | margin: 2em 0 2em 4em; 36 | } -------------------------------------------------------------------------------- /js/ajax/styles/styles.css: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | font-family: arial, sans-serif; 4 | } 5 | 6 | html 7 | { 8 | padding: 10px; 9 | margin: 0; 10 | border-style: none; 11 | } 12 | 13 | body 14 | { 15 | font-size: small; 16 | } 17 | 18 | h1 19 | { 20 | font-size: 1.4em; 21 | padding: 0; 22 | margin: 0 0 0.6em 0; 23 | border-bottom: 2px solid #000; 24 | } 25 | 26 | h2 27 | { 28 | font-size: 1.2em; 29 | padding: 0; 30 | margin: 2em 0 0.6em 0; 31 | border-bottom: 1px solid #000; 32 | } 33 | 34 | h3 35 | { 36 | font-size: 1em; 37 | padding: 0; 38 | margin: 1em 0 0 0; 39 | color: #333; 40 | } 41 | 42 | p 43 | { 44 | font-size: 1em; 45 | padding: 0; 46 | margin: 0 0 1em 0; 47 | } 48 | 49 | ul, ol 50 | { 51 | padding: 0; 52 | margin: 1em 0 2em 4em; 53 | } 54 | 55 | li 56 | { 57 | margin: 0 0 1em 0; 58 | } 59 | 60 | fieldset 61 | { 62 | position: relative; 63 | border: 1px solid #7F9DB9; 64 | padding: 0 10px 10px 10px; 65 | margin: 0; 66 | } 67 | 68 | legend 69 | { 70 | font-size: 1.2em; 71 | font-weight: bold; 72 | color: #7F9DB9; 73 | } 74 | 75 | fieldset div 76 | { 77 | clear: both; 78 | margin: 0.2em; 79 | } 80 | 81 | label 82 | { 83 | float: left; 84 | width: 48%; 85 | text-align: right; 86 | font-weight: bold; 87 | line-height: 1.6em; 88 | margin: 0 0.5em; 89 | } 90 | 91 | input 92 | { 93 | font-size: 1em; 94 | text-align: right; 95 | padding: 1px 2px; 96 | border: 1px solid #7F9DB9; 97 | } 98 | 99 | input[type="radio"], input[type="checkbox"] 100 | { 101 | width: auto; 102 | } 103 | 104 | div.button 105 | { 106 | text-align: center; 107 | margin: 0.4em; 108 | } 109 | 110 | div.button input, input.button 111 | { 112 | font-weight: bold; 113 | padding: 0.2em 1em 0.3em 1em; 114 | margin: 0; 115 | text-align: center; 116 | color: #fff; 117 | background-color: #7F9DB9; 118 | border: 1px solid #000; 119 | } 120 | 121 | div.button input:hover, input.button:hover 122 | { 123 | color: #7F9DB9; 124 | background-color: #fff; 125 | cursor: pointer; 126 | } 127 | 128 | span#total 129 | { 130 | font-size: 1.5em; 131 | font-weight: bold; 132 | color: #300; 133 | } 134 | 135 | dl 136 | { 137 | padding: 0; 138 | margin: 0.5em 0 2em 4em; 139 | } 140 | 141 | dt 142 | { 143 | clear: both; 144 | float: left; 145 | width: 15em; 146 | font-weight: bold; 147 | padding: 0; 148 | margin: 0 0 0.5em 0; 149 | color: #369; 150 | } 151 | 152 | dl.wide dt, dt.wide 153 | { 154 | width: 28em; 155 | } 156 | 157 | dd 158 | { 159 | padding: 0; 160 | margin: 0 0 0.5em 0; 161 | color: #666; 162 | } 163 | 164 | pre 165 | { 166 | width: 90%; 167 | font-family: monospace; 168 | font-size: 1em; 169 | padding: 3px; 170 | margin: 1em 0 2em auto; 171 | overflow: auto; 172 | border: 1px solid #999; 173 | } 174 | 175 | table.summary 176 | { 177 | width: 80%; 178 | margin: 1em auto; 179 | border-collapse: collapse; 180 | } 181 | 182 | th 183 | { 184 | font-size: 1em; 185 | font-weight: bold; 186 | text-align: right; 187 | } 188 | 189 | table.summary th 190 | { 191 | text-align: center; 192 | background-color: #ccc; 193 | border: 1px solid #666; 194 | } 195 | 196 | td 197 | { 198 | font-size: 1em; 199 | } 200 | 201 | table.summary td 202 | { 203 | text-align: center; 204 | padding: 1px 2px; 205 | border: 1px solid #666; 206 | } 207 | 208 | #clickdiv 209 | { 210 | text-align: center; 211 | font-style: italic; 212 | width: 200px; 213 | height: 150px; 214 | padding: 0; 215 | margin: 10px; 216 | border: 1px solid #000; 217 | background-color: #eceee3; 218 | } 219 | 220 | #info 221 | { 222 | float: right; 223 | margin: 0 0 20px 20px; 224 | padding: 1em; 225 | border: 1px solid #000; 226 | background-color: #eceee3; 227 | } 228 | 229 | #info h2 230 | { 231 | font-size: 1.2em; 232 | font-weight: bold; 233 | padding: 0; 234 | margin: 0 0 0.4em 0; 235 | } 236 | 237 | #info td 238 | { 239 | padding: 0; 240 | margin: 0; 241 | } 242 | 243 | a { font-weight: bold; color: #00c; text-decoration: none; } 244 | a:visited { color: #c0c; } 245 | a:hover { border-bottom: 1px dotted; } -------------------------------------------------------------------------------- /js/ajax/styles/stylesalt.css: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | font-family: georgia, times new roman, times, serif; 4 | color: #006; 5 | } 6 | 7 | html 8 | { 9 | height: 100%; 10 | padding: 20px; 11 | margin: 0; 12 | background-color: #ffc; 13 | } 14 | 15 | body 16 | { 17 | height: 100%; 18 | font-size: small; 19 | padding: 0; 20 | margin: 0; 21 | } 22 | 23 | h1 24 | { 25 | font-size: 1.4em; 26 | padding: 0; 27 | margin: 0 0 0.6em 0; 28 | border-bottom: 2px solid #000; 29 | } 30 | 31 | h2 32 | { 33 | font-size: 1.2em; 34 | padding: 0; 35 | margin: 2em 0 0.6em 0; 36 | border-bottom: 1px solid #000; 37 | } 38 | 39 | h3 40 | { 41 | font-size: 1em; 42 | padding: 0; 43 | margin: 1em 0 0 0; 44 | color: #333; 45 | } 46 | 47 | p 48 | { 49 | font-size: 1em; 50 | padding: 0; 51 | margin: 0 0 1em 0; 52 | } 53 | 54 | ul, ol 55 | { 56 | padding: 0; 57 | margin: 1em 0 2em 4em; 58 | } 59 | 60 | li 61 | { 62 | margin: 0 0 1em 0; 63 | } 64 | 65 | fieldset 66 | { 67 | position: relative; 68 | border: 1px solid #7F9DB9; 69 | padding: 0 10px 10px 10px; 70 | margin: 0; 71 | } 72 | 73 | legend 74 | { 75 | font-size: 1.2em; 76 | font-weight: bold; 77 | color: #7F9DB9; 78 | } 79 | 80 | fieldset div 81 | { 82 | clear: both; 83 | margin: 0.2em; 84 | } 85 | 86 | fieldset div label 87 | { 88 | float: left; 89 | width: 48%; 90 | text-align: right; 91 | font-weight: bold; 92 | line-height: 1.6em; 93 | margin: 0 0.5em; 94 | } 95 | 96 | fieldset div input 97 | { 98 | font-size: 1em; 99 | text-align: right; 100 | padding: 1px 2px; 101 | border: 1px solid #7F9DB9; 102 | } 103 | 104 | input[type="radio"], input[type="checkbox"] 105 | { 106 | width: auto; 107 | } 108 | 109 | div.button 110 | { 111 | text-align: center; 112 | margin: 0.4em; 113 | } 114 | 115 | div.button input 116 | { 117 | font-weight: bold; 118 | padding: 0.2em 3em 0.3em 3em; 119 | margin: 0; 120 | text-align: center; 121 | color: #fff; 122 | background-color: #7F9DB9; 123 | border: 1px solid #000; 124 | } 125 | 126 | div.button input:hover 127 | { 128 | color: #7F9DB9; 129 | background-color: #fff; 130 | cursor: pointer; 131 | } 132 | 133 | span#total 134 | { 135 | font-size: 1.5em; 136 | font-weight: bold; 137 | color: #300; 138 | } 139 | 140 | dl 141 | { 142 | padding: 0; 143 | margin: 0.5em 0 2em 4em; 144 | } 145 | 146 | dt 147 | { 148 | clear: both; 149 | float: left; 150 | width: 15em; 151 | font-weight: bold; 152 | padding: 0; 153 | margin: 0 0 0.5em 0; 154 | color: #369; 155 | } 156 | 157 | dt.wide 158 | { 159 | width: 28em; 160 | } 161 | 162 | dd 163 | { 164 | padding: 0; 165 | margin: 0 0 0.5em 0; 166 | color: #666; 167 | } 168 | 169 | pre 170 | { 171 | width: 90%; 172 | font-family: monospace; 173 | font-size: 1em; 174 | padding: 3px; 175 | margin: 1em 0 2em auto; 176 | overflow: auto; 177 | border: 1px solid #999; 178 | } 179 | 180 | th 181 | { 182 | font-size: 1em; 183 | font-weight: bold; 184 | text-align: right; 185 | } 186 | 187 | td 188 | { 189 | font-size: 1em; 190 | } 191 | 192 | #clickdiv 193 | { 194 | text-align: center; 195 | font-style: italic; 196 | width: 200px; 197 | height: 150px; 198 | padding: 0; 199 | margin: 10px; 200 | border: 1px solid #000; 201 | background-color: #eceee3; 202 | } 203 | 204 | #info 205 | { 206 | float: right; 207 | margin: 0 0 20px 20px; 208 | padding: 1em; 209 | border: 1px solid #000; 210 | background-color: #eceee3; 211 | } 212 | 213 | #info h2 214 | { 215 | font-size: 1.2em; 216 | font-weight: bold; 217 | padding: 0; 218 | margin: 0 0 0.4em 0; 219 | } 220 | 221 | #info td 222 | { 223 | padding: 0; 224 | margin: 0; 225 | } -------------------------------------------------------------------------------- /js/ajax/styles/tabs.css: -------------------------------------------------------------------------------- 1 | /* tab control CSS */ 2 | div#tool 3 | { 4 | width: 45em; 5 | margin: 2em auto; 6 | } 7 | 8 | .tabcontrol 9 | { 10 | position: relative; 11 | width: 100%; 12 | overflow: auto; 13 | padding: 0; 14 | margin: 0; 15 | list-style-type: none; 16 | border-left: 1px solid #7f9db9; 17 | z-index: 2; 18 | } 19 | 20 | .tabcontrol li 21 | { 22 | float: left; 23 | padding: 0; 24 | margin: 0; 25 | } 26 | 27 | .tabcontrol li a 28 | { 29 | display: block; 30 | width: 8em; 31 | text-align: center; 32 | line-height: 1.5em; 33 | text-decoration: none; 34 | padding: 0; 35 | margin: 0; 36 | color: #369; 37 | background-color: #eef2f7; 38 | border-width: 1px; 39 | border-color: #7f9db9; 40 | border-style: solid solid solid none; 41 | } 42 | 43 | .tabcontrol li a.active 44 | { 45 | background-color: #fff; 46 | border-bottom-color: #fff; 47 | } 48 | 49 | .tabcontrol li a:hover 50 | { 51 | background-color: #fff; 52 | } 53 | 54 | .tabcontent 55 | { 56 | position: relative; 57 | top: -1px; 58 | height: 22em; /* can be overridden */ 59 | margin: 0; 60 | padding: 15px; 61 | border: 1px solid #7f9db9; 62 | z-index: 1; 63 | } 64 | 65 | /* override standard form styles */ 66 | fieldset 67 | { 68 | width: 100%; 69 | padding: 0; 70 | margin: 0; 71 | border-style: none; 72 | } 73 | 74 | fieldset legend 75 | { 76 | display: none; 77 | } 78 | 79 | div#fieldhelpbox 80 | { 81 | z-index: 10; 82 | } -------------------------------------------------------------------------------- /js/ajax/webservice/sum.asp: -------------------------------------------------------------------------------- 1 | <% 2 | ' Implements a web service that sums any parameters passed on the querystring (GET only) 3 | Option Explicit 4 | Response.Buffer = true 5 | 6 | ' fetch all arguments 7 | Dim args 8 | args = Array(0) 9 | dim arg, thisarg 10 | 11 | for each arg in Request.QueryString 12 | On Error Resume Next 13 | thisarg = cint(Request.QueryString(arg)) 14 | if Err.Number = 0 then 15 | redim preserve args(UBound(args)+1) 16 | args(UBound(args)) = thisarg 17 | end if 18 | Err.Clear 19 | next 20 | 21 | ' output XML response 22 | Response.ContentType = "text/xml" 23 | Response.Write "<" & "?xml version=""1.0"" ?" & ">" & vbCrLf 24 | Response.Write "" & vbCrLf 25 | Response.Write vbTab & "" & vbCrLf 26 | dim i, total 27 | total = 0 28 | for i = 1 to UBound(args) 29 | total = total + args(i) 30 | Response.Write vbTab & vbTab & "" & args(i) & "" & vbCrLf 31 | next 32 | Response.Write vbTab & "" & vbCrLf 33 | Response.Write vbTab & "" & total & "" & vbCrLf 34 | Response.Write "" & vbCrLf 35 | 36 | ' pause 37 | dim WaitObj 38 | Set WaitObj = Server.CreateObject ("WaitFor.Comp") 39 | WaitObj.WaitForSeconds 0 40 | Set WaitObj = nothing 41 | 42 | Response.Flush 43 | %> -------------------------------------------------------------------------------- /js/ajax/webservice/sum.php: -------------------------------------------------------------------------------- 1 | \n"; 15 | print "\n"; 16 | print "\t\n"; 17 | $total = 0; 18 | foreach($args as $arg) { 19 | print "\t\t$arg\n"; 20 | $total += $arg; 21 | } 22 | print "\t\n"; 23 | print "\t$total\n"; 24 | print "\n"; 25 | 26 | ob_end_flush(); 27 | 28 | // output headers to log 29 | /* 30 | if ($fp=fopen('log.txt', 'w')) { 31 | foreach($_SERVER as $key => $value) fwrite($fp, "$key : $value\n"); 32 | fclose($fp); 33 | } 34 | */ 35 | ?> -------------------------------------------------------------------------------- /js/ajax/webservice/sum.txt: -------------------------------------------------------------------------------- 1 | This file will not return an XML document, so the XMLresponse will be null. -------------------------------------------------------------------------------- /js/ajax/xml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaScript testbed: client-side DOM handler 6 | 7 | 8 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

JavaScript testbed: XML handler

29 | 30 |

Client-side cross-browser XML manipulation. Note that this is closely tied to the WebService and DOM objects.

31 | 32 |
33 | 34 | 35 | 38 | 39 | 87 | 88 |

XML class (static)

89 | 90 |

An object that provides XML document manipulation functions. Note that XSL transformations are not supported in Opera, so this object should be used with care.

91 | 92 |

Public properties

93 |
94 |
XML.ElementNode
the value of an element node (1)
95 |
XML.AttributeNode
the value of an attribute node (2)
96 |
XML.TextNode
the value of a text node (3)
97 |
XML.CommentNode
the value of an attribute node (8)
98 |
99 | 100 |

Public methods

101 |
102 |
XML.New()
create a new XML document
103 |
XML.Transform(XMLdocument xml, XMLdocument xsl)
returns result of XML/XSL transformation (not supported in Opera)
104 |
XML.Copy(node from, node to)
copy the children of node 'from' to children of node 'to'. Unlike DOM.Copy, this works with XML documents
105 |
XML.RemoveChildren(node)
remove all node children
106 |
107 | 108 |

Example

109 |
110 | function XMLtest() {
111 | 	// use WebService object to fetch XML
112 | 	var wsXML = new WebService("resources/test.xml", "GET");
113 | 	wsXML.Name = "xml";
114 | 	wsXML.OnComplete = XMLcheck;
115 | 	wsXML.Call();
116 | 
117 | 	// use WebService object to fetch XSL
118 | 	var wsXSL = new WebService("resources/test.xsl", "GET");
119 | 	wsXSL.Name = "xsl";
120 | 	wsXSL.OnComplete = XMLcheck;
121 | 	wsXSL.Call();
122 | }
123 | 
124 | function XMLcheck(WS) {
125 | 	if (WS.Name == "xml") xml = WS.ResponseXML; else xsl = WS.ResponseXML;
126 | 	if (xml && xsl) {
127 | 		var transdoc = XML.Transform(xml, xsl);
128 | 		if (transdoc) XML.Copy(transdoc.documentElement, DOM.Id("xmldoc")); // copy transformed XML to document
129 | 		else DOM.SetText(DOM.Id("xmldoc"), "Transformation failed.");
130 | 	}
131 | }
132 | 
133 | 134 | 135 | -------------------------------------------------------------------------------- /js/aurora/jquery.checkboxtoggle.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery toggle checkboxes plugin 3 | * http://optimalworks.net/ 4 | * Copyright 2011, Craig Buckler 5 | */ 6 | 7 | (function($) { 8 | 9 | $.fn.CheckboxToggle = function() { 10 | 11 | // click event 12 | $(this).click(function(e) { 13 | e.preventDefault(); 14 | var t = $(e.target); 15 | var state = t.hasClass("toggleall"); 16 | $("input[type='checkbox']", t.closest("fieldset")).prop("checked", state); 17 | }); 18 | 19 | return this; 20 | }; 21 | 22 | // initialise all buttons 23 | $(function() { 24 | $("a.toggleall").CheckboxToggle(); 25 | $("a.togglenone").CheckboxToggle(); 26 | }); 27 | 28 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/jquery.colourpicker.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Colour Pickler plugin 3 | * http://optimalworks.net/ 4 | * Copyright 2011, Craig Buckler 5 | */ 6 | 7 | (function($) { 8 | 9 | $.fn.ColourPickler = function() { 10 | 11 | // configuration 12 | var $C = { 13 | ColourPickerClass: "colourpicker", 14 | ColourBoxClass: "colourlist", 15 | ColourPrefix: "colour", 16 | ColourActive: "active", 17 | OffsetX: -10, 18 | OffsetY: 10, 19 | WidthAdd: -10, 20 | CloseDelay: 300 21 | }; 22 | 23 | var Open, ColourBox, cTimer; 24 | 25 | // display colour picker 26 | function ColourBoxShow(e) { 27 | 28 | Open = true; 29 | var t = e.target, $t = $(t); 30 | 31 | if (!ColourBox) { 32 | 33 | // create colour box 34 | var cols = $(t).data("bound").data("colours"); 35 | 36 | var ul = document.createElement("ul"); 37 | ul.setAttribute("tabindex", 0); 38 | ul.className = $C.ColourBoxClass; 39 | for (var c = 0; c <= cols; c++) { 40 | var li = document.createElement("li"); 41 | li.className = $C.ColourPrefix + c; 42 | li.setAttribute("tabindex", 0); 43 | ul.appendChild(li); 44 | } 45 | ColourBox = $(ul).appendTo("body"); 46 | 47 | // events 48 | ColourBox.click(ChooseColour).keyup(ChooseColour).focusout(ChooseColour); 49 | } 50 | 51 | // bind element 52 | ColourBox.data("input", t); 53 | 54 | // position box 55 | var o = $t.offset(); 56 | o.left += t.offsetWidth + $C.OffsetX; 57 | o.top += $C.OffsetY; 58 | ColourBox.css("display", "block"); 59 | ColourBox.offset(o); 60 | ColourBox[0].focus(); 61 | cTimer = null; 62 | 63 | } 64 | 65 | 66 | // handle keypresses 67 | function ChooseColour(e) { 68 | 69 | if (e.type == "focusout" && !cTimer) { 70 | cTimer = setTimeout(function() { ChooseColour(e); }, $C.CloseDelay); 71 | return; 72 | } 73 | 74 | var t = e.target; 75 | if (t && t.nodeName.toLowerCase() == "li" && (e.type == "click" || e.keyCode == 13)) { 76 | ColourBox.data("input").className = $C.ColourPickerClass + " " + t.className; 77 | var c = t.className.substr(6); 78 | if (c == 0) c = ""; 79 | $(ColourBox.data("input")).data("bound")[0].value = c; 80 | } 81 | 82 | Open = false; 83 | ColourBox.css("display", "none"); 84 | 85 | } 86 | 87 | 88 | // autocomplete initialisation 89 | this.each(function() { 90 | 91 | // element 92 | var input = $(this); 93 | 94 | // bound input (real submitted value) 95 | var bound = this.id; 96 | bound = bound.substr(0, bound.length-7); 97 | bound = $('#'+bound); 98 | if (bound.length != 1 || !bound.data("colours")) return; 99 | input.attr("tabindex", 0); 100 | input.data("bound", bound); 101 | 102 | // events 103 | input.click(ColourBoxShow).focus(ColourBoxShow); 104 | $(input[0].form).submit(function (e) { if (Open) e.preventDefault(); }); 105 | 106 | }); 107 | 108 | return this; 109 | }; 110 | 111 | 112 | // initialise all colour pickers 113 | $(function() { 114 | $('.colourpicker').ColourPickler(); 115 | }); 116 | 117 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/jquery.draggable.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery draggable element plugin 3 | * http://optimalworks.net/ 4 | * Copyright 2011, Craig Buckler 5 | */ 6 | 7 | (function($) { 8 | 9 | $.fn.draggable = function(opts) { 10 | 11 | // default configuration 12 | var config = $.extend({}, { 13 | minX: -999999, // minimum X movement 14 | maxX: +999999, // maximum X movement 15 | minY: -999999, // minimim Y movement 16 | maxY: +999999, // maximum Y movement 17 | horz: true, // horizontal movement permitted 18 | vert: true, // vertical movement permitted 19 | onStart: null, // drag start event 20 | onDrag: null, // drag event 21 | onDrop: null // drop event 22 | }, opts); 23 | 24 | var target = null, start = null; 25 | this.mousedown(DragStart); 26 | 27 | // start dragging 28 | function DragStart(e) { 29 | e.preventDefault(); 30 | if (!target) { 31 | target = e.target; 32 | $(target).css({ position: "relative", zIndex: "99999" }); 33 | start = { 34 | left: e.pageX - target.style.left.replace(/px/, ''), 35 | top: e.pageY - target.style.top.replace(/px/, '') 36 | }; 37 | if (config.onStart) config.onStart(target); 38 | $(window).on({ mousemove: Dragging, mouseup: DragEnd }); 39 | } 40 | } 41 | 42 | // dragging 43 | function Dragging(e) { 44 | e.preventDefault(); 45 | if (config.horz) target.style.left = Math.min(Math.max(config.minX, e.pageX - start.left), config.maxX) + "px"; 46 | if (config.vert) target.style.top = Math.min(Math.max(config.minY, e.pageY - start.top), config.maxY) + "px"; 47 | if (config.onDrag) config.onDrag(target); 48 | } 49 | 50 | // end dragging 51 | function DragEnd(e) { 52 | e.preventDefault(); 53 | if (config.onDrop) config.onDrop(target); 54 | target = start = null; 55 | $(window).off({ mousemove: Dragging, mouseup: DragEnd }); 56 | } 57 | 58 | return this; 59 | }; 60 | 61 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/jquery.password.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery password generation plugin 3 | * http://optimalworks.net/ 4 | * Copyright 2011, Craig Buckler 5 | */ 6 | 7 | (function($) { 8 | 9 | $.fn.PasswordGenerate = function(opts) { 10 | 11 | // default configuration 12 | var config = $.extend({}, { 13 | password1: "#password", 14 | password2: "#password2", 15 | pwlength: 8, 16 | pwdict: "bcdfghkmnpqrstwxyz23456789" 17 | }, opts); 18 | 19 | // find inputs 20 | var p1 = $(config.password1); 21 | p1 = (p1.length == 1 ? p1[0] : null); 22 | var p2 = $(config.password2); 23 | p2 = (p2.length == 1 ? p2[0] : null); 24 | 25 | // click event 26 | if (p1 && p2) $(this).click(function(e) { 27 | e.preventDefault(); 28 | var p = ''; 29 | while (p.length < config.pwlength) { 30 | p += config.pwdict.substr(Math.floor(Math.random() * config.pwdict.length-1), 1); 31 | } 32 | p1.value = p2.value = p; 33 | p1.focus(); 34 | }); 35 | 36 | return this; 37 | }; 38 | 39 | // initialise all password buttons 40 | $(function() { 41 | $("#passgen").PasswordGenerate(); 42 | }); 43 | 44 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/jquery.tabs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery tab handling plugin 3 | * http://optimalworks.net/ 4 | * Copyright 2011, Craig Buckler 5 | */ 6 | 7 | (function($) { 8 | 9 | $.fn.Tabs = function(opts) { 10 | 11 | // default configuration 12 | var config = $.extend({}, { 13 | onchange: null, 14 | }, opts); 15 | 16 | // click event handler 17 | function ClickTab(e) { 18 | e.preventDefault(); 19 | $(e.target).ActivateTab(); 20 | } 21 | 22 | // tab initialisation 23 | this.each(function() { 24 | 25 | var ul = $(this); // list element 26 | if (config.onchange) ul.data("onchange", config.onchange); 27 | if (!!ul.data("height")) return; 28 | ul.data("height", 0); 29 | var pActive = location.hash; // currently active tab 30 | 31 | // parse individual tabs 32 | var $a = $("a", ul), active = null; 33 | $a.each(function() { 34 | var hash = this.hash; 35 | var content = $(hash); 36 | ul.data("height", Math.max(ul.data("height"), content.height())); 37 | content.css("display", "none"); 38 | if (!active || hash == pActive) active = this; 39 | }); 40 | 41 | // activate first or active tab 42 | $(active).ActivateTab(); 43 | 44 | // event handler 45 | $a.click(ClickTab); 46 | 47 | }); 48 | 49 | return this; 50 | }; 51 | 52 | 53 | // activate tab 54 | $.fn.ActivateTab = function() { 55 | 56 | // default configuration 57 | var config = { 58 | activeClass: "active", 59 | }; 60 | 61 | this.each(function() { 62 | 63 | var a = this; 64 | var $a = $(a); 65 | var ul = $a.closest("ul"); 66 | var active = ul.data("active"); 67 | if (a != active) { 68 | 69 | // hide previously active tab 70 | if (active) { 71 | $(active).removeClass(config.activeClass); 72 | var $c = $(active.hash); 73 | ul.data("height", Math.max(ul.data("height"), $c.height())); 74 | $c.css("display", "none"); 75 | } 76 | 77 | // show active tab 78 | $a.addClass(config.activeClass); 79 | $(a.hash).css({ "display":"block", "minHeight":ul.data("height")+"px" }); 80 | ul.data("active", a); 81 | 82 | // run onchange function 83 | var onchange = ul.data("onchange") || null; 84 | if (onchange) onchange(a.hash); 85 | } 86 | 87 | }); 88 | 89 | return this; 90 | } 91 | 92 | 93 | // initialise all tables 94 | $(function() { 95 | $("ul.tabset").Tabs(); 96 | }); 97 | 98 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/jquery.totaliser.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery automated field totaliser 3 | * Apply class of (plus|minus|mult|div)-[-priority] to any form field, e.g. 4 | * "plus-total" - add this field to the value of #total 5 | * "mult-total-5" - multiply current #total value by this field 6 | * (given a priority of 5: lower priority numbers are evaluated first) 7 | * 8 | * http://optimalworks.net/ 9 | * Copyright 2011, Craig Buckler 10 | */ 11 | 12 | (function($) { 13 | 14 | $.fn.Totaliser = function() { 15 | 16 | 17 | // perform calculation 18 | function Calculate(e) { 19 | 20 | $.each($(this).data("linked"), function() { 21 | 22 | var total = $(this); 23 | var eq = total.data("total"); 24 | 25 | // sort calculation by priority 26 | if (!total.data("sorted")) { 27 | eq.sort(function (a,b) { return a.priority - b.priority; }); 28 | total.data("total", eq); 29 | total.data("sorted", true); 30 | } 31 | 32 | // do calculation 33 | var calc = 0, i, op, v; 34 | for (i = 0; sum = eq[i]; i++) { 35 | v = SWS.Convert.toInt(sum.field.value) || 0; 36 | switch(sum.op) { 37 | case "minus": calc -= v; break; 38 | case "mult": calc *= v; break; 39 | case "div": if (v != 0) calc /= v; break; 40 | default: calc += v; break; 41 | } 42 | } 43 | 44 | // update field 45 | total.val(SWS.Format.Number(calc, total.data("dp") || 0)); 46 | if (calc && total.val() == "") total.val(calc); 47 | 48 | }); 49 | 50 | } 51 | 52 | 53 | // initialize 54 | this.each(function() { 55 | 56 | // is an input? 57 | if (this.nodeName.toLowerCase() != "input") return; 58 | 59 | // get total ID 60 | var t = this.className.match(/(plus|minus|mult|div)\-(\w*)\-*(\d*)/i); 61 | if (t && t.length > 2) { 62 | var total = $("#"+t[2]); 63 | if (total.length == 1) { 64 | 65 | // define linked total and change event 66 | var $this = $(this); 67 | var ts = $this.data("linked"); 68 | if (!ts) ts = []; 69 | ts[ts.length] = total; 70 | $this.data("linked", ts).change(Calculate); 71 | 72 | // define sum 73 | var eq = { 74 | op: t[1], 75 | field: this, 76 | priority: t[3] || 0 77 | }; 78 | ts = total.data("total"); 79 | if (!ts) ts = []; 80 | ts[ts.length] = eq; 81 | total.data("total", ts); 82 | total.data("sorted", false); 83 | 84 | } 85 | } 86 | 87 | }); 88 | 89 | return this; 90 | }; 91 | 92 | // initialise all fields 93 | $(function() { 94 | $("input[class*=plus-]").add("input[class*=minus-]").add("input[class*=mult-]").add("input[class*=div-]").Totaliser(); 95 | }); 96 | 97 | })(jQuery); -------------------------------------------------------------------------------- /js/aurora/sws.main.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Main JavaScript libraries 3 | * http://optimalworks.net/ 4 | * Copyright 2012, Craig Buckler 5 | */ 6 | 7 | var SWS = SWS || {}; 8 | 9 | 10 | // _______________________________________________________ 11 | // string functions 12 | SWS.String = function() { 13 | 14 | var reTrim = /^\s*|\s*$/g; 15 | 16 | // trim 17 | function Trim(s) { 18 | return String(s).replace(reTrim, ""); 19 | } 20 | 21 | 22 | // left pad 23 | function LPad(s, len, chr) { 24 | chr = chr || " "; 25 | while (s.length < len) s = [chr, s].join(""); 26 | return s; 27 | } 28 | 29 | 30 | // right pad 31 | function RPad(s, len, chr) { 32 | chr = chr || " "; 33 | while (s.length < len) s = [s, chr].join(""); 34 | return s; 35 | } 36 | 37 | 38 | // HTMLencode 39 | function HTMLencode(s) { 40 | return s.replace(/"/ig, '"').replace(/'/ig, "'").replace(/</ig, "<").replace(/>/ig, ">").replace(/&/ig, "&").replace(/→/g, '\u2192').replace(/×/g, '\u00D7'); 41 | } 42 | 43 | 44 | return { 45 | Trim: Trim, 46 | LPad: LPad, 47 | RPad: RPad, 48 | HTMLencode: HTMLencode 49 | }; 50 | 51 | }(); 52 | 53 | 54 | // _______________________________________________________ 55 | // conversion functions 56 | SWS.Convert = function() { 57 | 58 | var reNum = new RegExp("[^\\d"+$C.numberpoint+"]", "g"); 59 | var reDate = /(\d+)\D+(\d+)\D+(\d+)/g; 60 | var tpDate = null; 61 | 62 | // to integer 63 | function toInt(v) { 64 | return toFloat(v); 65 | } 66 | 67 | 68 | // to float 69 | function toFloat(v, dp) { 70 | dp = Math.pow(10, dp || 0); 71 | v = parseFloat(String(v).replace(reNum, "")); 72 | return (isNaN(v) ? 0 : Math.round(v * dp) / dp); 73 | } 74 | 75 | 76 | // to date 77 | function toDate(v) { 78 | var d = null, v = v.split(reDate); 79 | if (v.length >= 4) { 80 | 81 | // parse date format (done once) 82 | if (tpDate == null) { 83 | var df = $C.dateinput.toLowerCase().replace(/[^djmnoy]/g, ""); 84 | tpDate = { 85 | "d": df.search(/d|j/) || 0, 86 | "m": df.search(/m|n/) || 0, 87 | "y": df.search(/o|y/) || 0 88 | }; 89 | for (p in tpDate) if (typeof tpDate[p] == "number") tpDate[p]++; 90 | } 91 | 92 | // convert to date 93 | var y = parseInt(v[tpDate.y], 10); 94 | if (y < 100) y += 2000; 95 | d = new Date(y, parseInt(v[tpDate.m], 10)-1, parseInt(v[tpDate.d], 10)); 96 | 97 | } 98 | return d; 99 | } 100 | 101 | 102 | return { 103 | toInt: toInt, 104 | toFloat: toFloat, 105 | toDate: toDate 106 | }; 107 | 108 | }(); 109 | 110 | 111 | // _______________________________________________________ 112 | // localisation 113 | SWS.Format = function() { 114 | 115 | // format number 116 | function Number(v, dp) { 117 | 118 | v = String(SWS.Convert.toFloat(v, dp)); 119 | var p = v.indexOf("."); 120 | if (p < 0) p = v.length; 121 | 122 | var adp = SWS.String.RPad(v.substr(p+1), dp, "0"); 123 | var bdp = v.substr(0, p), obdp; 124 | while (bdp!=obdp) { 125 | obdp=bdp; 126 | bdp = bdp.replace(/(\d+)(\d{3})/g, "$1" + $C.numbersep + "$2"); 127 | } 128 | 129 | return bdp + (adp.length > 0 ? $C.numberpoint + adp : ""); 130 | 131 | } 132 | 133 | 134 | // format integer 135 | function Int(v) { 136 | return Number(v, 0); 137 | } 138 | 139 | 140 | // format currency 141 | function Currency(v) { 142 | return $C.currencypre + Number(v, $C.currencydp) + $C.currencypost; 143 | } 144 | 145 | 146 | // format date (PHP date format) 147 | function Date(v) { 148 | 149 | var r = ""; 150 | if (v && v.getDate) { 151 | 152 | var d = String(v.getDate()); 153 | var m = String(v.getMonth()+1); 154 | var y = String(v.getFullYear()); 155 | 156 | r = $C.dateinput.replace(/d/g, SWS.String.LPad(d, 2, "0")).replace(/j/g, d).replace(/m/g, SWS.String.LPad(m, 2, "0")).replace(/n/g, m).replace(/y/g, y.substr(2)).replace(/o|Y/g, y); 157 | 158 | } 159 | return r; 160 | 161 | } 162 | 163 | 164 | return { 165 | Number: Number, 166 | Int: Int, 167 | Currency: Currency, 168 | Date: Date 169 | } 170 | 171 | }(); -------------------------------------------------------------------------------- /js/form_changes.js: -------------------------------------------------------------------------------- 1 | // An evolution of http://www.sitepoint.com/javascript-form-change-checker/ 2 | // ensure script is loaded at end of page 3 | 4 | // find all forms and hidden elements 5 | (function() { 6 | 7 | // parse all forms 8 | var f, i, h, form = document.getElementsByTagName("form"); 9 | for (f = form.length - 1; f >= 0; f--) { 10 | 11 | // count form elements 12 | form[f].fcElementCount = form[f].elements.length; 13 | 14 | // store hidden element initial value 15 | for (i = form[f].elements.length - 1; i >= 0; i--) { 16 | h = form[f].elements[i]; 17 | if (h.nodeName.toLowerCase() == "input" && h.type.toLowerCase() == "hidden") { 18 | h.fcDefaultValue = h.value; 19 | } 20 | } 21 | } 22 | 23 | }()); 24 | 25 | 26 | // FormChanges(id-string|node) - pass a form node or ID 27 | // Returns an array of nodes of inputs changed since the page was loaded 28 | // (If elements are removed, the last item will be the form node itself) 29 | // e.g. if (FormChanges("myform").length > 0) { console.log("changed"); } 30 | function FormChanges(form) { 31 | if (typeof form == "string") form = document.getElementById(form); 32 | if (!form || !form.nodeName || form.nodeName.toLowerCase() != "form") return null; 33 | 34 | var changed = [], n, c, def, o, ol, opt; 35 | 36 | for (var e = 0, el = form.elements.length; e < el; e++) { 37 | n = form.elements[e]; 38 | c = false; 39 | 40 | switch (n.nodeName.toLowerCase()) { 41 | 42 | // select boxes 43 | case "select": 44 | def = 0; 45 | for (o = 0, ol = n.options.length; o < ol; o++) { 46 | opt = n.options[o]; 47 | c = c || (opt.selected != opt.defaultSelected); 48 | if (opt.defaultSelected) def = o; 49 | } 50 | if (c && !n.multiple) c = (def != n.selectedIndex); 51 | break; 52 | 53 | // input / textarea 54 | case "textarea": 55 | case "input": 56 | 57 | switch (n.type.toLowerCase()) { 58 | case "checkbox": 59 | case "radio": 60 | // checkbox / radio 61 | c = (n.checked !== n.defaultChecked); 62 | break; 63 | case "hidden": 64 | // hidden value 65 | c = (n.value !== n.fcDefaultValue); 66 | break; 67 | default: 68 | // standard values 69 | c = (n.value !== n.defaultValue); 70 | break; 71 | } 72 | break; 73 | } 74 | if (c) changed.push(n); 75 | } 76 | 77 | // have inputs been added or removed? 78 | if (el !== form.fcElementCount) changed.push(form); 79 | 80 | return changed; 81 | } 82 | -------------------------------------------------------------------------------- /js/owl/image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 101 | 102 | 103 | 104 | 105 |

Image lightbox test

106 | 107 |

Need an inner DIV with overflow:hidden.

108 |

Must calculate difference between inner and outer dimensions. Then use those to calculate the image maximum width and height? NO - offsetWidth will be the same as the outer width because padding is added.

109 |

Can image always be centered?

110 | 111 |

redimension and centre image

112 | 113 |
114 |
115 | 116 | Sophie 117 | 118 |
119 | 120 |

Sophie a lovely picture of Sophie Louise!

121 | 122 | close 123 | 124 | back 125 | 126 |
127 | 128 |
129 |
130 | 131 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /js/owl/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/Thumbs.db -------------------------------------------------------------------------------- /js/owl/images/claire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/claire.jpg -------------------------------------------------------------------------------- /js/owl/images/claire_t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/claire_t.jpg -------------------------------------------------------------------------------- /js/owl/images/ross.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/ross.jpg -------------------------------------------------------------------------------- /js/owl/images/ross_t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/ross_t.jpg -------------------------------------------------------------------------------- /js/owl/images/sophie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/sophie.jpg -------------------------------------------------------------------------------- /js/owl/images/sophie_t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/images/sophie_t.jpg -------------------------------------------------------------------------------- /js/owl/script/backup/owl_contextmenu.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.ContextMenu 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Effect && owl.Overlay && !owl.ContextMenu) { 7 | 8 | // context menu object 9 | owl.ContextMenu = function(trigger) { 10 | 11 | var $C = owl.ContextMenu.Config; 12 | var menu = owl.Dom.Get($C.Container.Menu, trigger); 13 | 14 | if (owl.Css.ClassExists(trigger, $C.Container.ActiveClass) || menu.length != 1) return; 15 | owl.Css.ClassApply(trigger, $C.Container.ActiveClass); 16 | menu = menu[0]; 17 | 18 | // click and hover events 19 | trigger.setAttribute("tabindex", 0); 20 | owl.Each(["click", "mouseover", "mouseout", "focus", "blur"], function(e) { 21 | new owl.Event(trigger, e, MenuHandler); 22 | new owl.Event(menu, e, MenuHandler); 23 | }); 24 | 25 | // show/hide context menu 26 | var throttle = null, show = false, showCur = false, overlay = null; 27 | function MenuHandler(evt) { 28 | 29 | if (throttle) clearInterval(throttle); 30 | evt.StopPropagation(); 31 | 32 | // should context menu appear? 33 | var t = evt.Type; 34 | 35 | if (evt.Element == trigger) show = (t == "click" || evt.Type == "focus" || (t == "mouseover" && $C.HoverTrigger)); 36 | else show = (t == "click" || evt.Type == "focus" || t == "mouseover"); 37 | 38 | throttle = setTimeout(ShowMenu, $C.HoverThrottle); 39 | } 40 | 41 | // show or hide menu 42 | function ShowMenu() { 43 | 44 | if (show == showCur) return; 45 | else showCur = show; 46 | 47 | if (show) { 48 | 49 | var loc = owl.Screen.Location(trigger); 50 | var vs = owl.Screen.ViewScroll(); 51 | var vp = owl.Screen.ViewPort(); 52 | 53 | // check horizontal location 54 | if (loc.X + trigger.offsetWidth + menu.offsetWidth > vs.X + vp.Width) { 55 | menu.style.left = "auto"; 56 | menu.style.right = "0px"; 57 | } 58 | else { 59 | menu.style.left = "100%"; 60 | menu.style.bottom = "auto"; 61 | } 62 | 63 | // check vertical location 64 | if (loc.Y + trigger.offsetHeight + menu.offsetHeight > vs.Y + vp.Height) { 65 | menu.style.top = "auto"; 66 | menu.style.bottom = "100%"; 67 | } 68 | else { 69 | menu.style.top = "100%"; 70 | menu.style.bottom = "auto"; 71 | } 72 | 73 | // hover 74 | if ($C.HoverClass) owl.Css.ClassApply(trigger, $C.HoverClass); 75 | 76 | // overlay (IE) 77 | loc = owl.Screen.Location(menu); 78 | overlay = new owl.Overlay.Elements(loc.X, loc.Y, loc.X + menu.offsetWidth, loc.Y + menu.offsetHeight); 79 | 80 | // fade in 81 | owl.Effect.FadeIn(menu); 82 | } 83 | else { 84 | // fade out 85 | if (overlay) overlay.Show(); 86 | if ($C.HoverClass) owl.Css.ClassRemove(trigger, $C.HoverClass); 87 | owl.Effect.FadeOut(menu); 88 | } 89 | 90 | } 91 | 92 | }; 93 | 94 | 95 | /* --------------------------------------------- 96 | owl.ContextMenu.Config 97 | --------------------------------------------- */ 98 | owl.ContextMenu.Config = { 99 | AutoStart: true, 100 | Container: { 101 | Element: ".contextmenu", 102 | ActiveClass: "active", 103 | Menu: "ul" 104 | }, 105 | HoverTrigger: true, // menu appears on hover rather than just click 106 | HoverClass: "hover", 107 | HoverThrottle: 300 108 | }; 109 | 110 | // auto-start tree controls 111 | if (owl.ContextMenu.Config.AutoStart) new owl.Event(window, "load", function (e) { 112 | owl.Each(owl.Dom.Get(owl.ContextMenu.Config.Container.Element), function(n) { new owl.ContextMenu(n); }); 113 | }, 99999); 114 | 115 | } -------------------------------------------------------------------------------- /js/owl/script/backup/owl_css_bak.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Css 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Css) owl.Css = function() { 7 | 8 | 9 | // returns an array of nodes 10 | function NodeArray(n) { return (n ? (owl.Array.Is(n) ? n : [n]) : null); } 11 | 12 | 13 | // returns true if class applied to passed elements 14 | function ClassExists(elements, name) { 15 | var cfound = true; 16 | if (name) owl.Each(NodeArray(elements), function(e) { var cn = " "+e.className+" "; cfound = (cn.indexOf(" "+name+" ") >= 0); return cfound; }); 17 | return cfound; 18 | } 19 | 20 | 21 | // apply class to all elements 22 | function ClassApply(elements, name) { 23 | owl.Each(NodeArray(elements), 24 | function(e) { 25 | var cn = " "+e.className+" "; 26 | if (cn.indexOf(" "+name+" ") < 0) { 27 | cn += name; 28 | e.className = owl.String.Trim(cn); 29 | } 30 | } 31 | ); 32 | } 33 | 34 | 35 | // remove class from elements (pass name of "" to remove all classes) 36 | function ClassRemove(elements, name) { 37 | owl.Each(NodeArray(elements), 38 | function(e) { 39 | var cn = ""; 40 | if (name) { 41 | cn = " "+e.className+" "; 42 | cn = owl.String.Trim(cn.replace(new RegExp(" "+name+" ", "gi"), " ")); 43 | } 44 | e.className = cn; 45 | } 46 | ); 47 | } 48 | 49 | 50 | // set elements opacity (0 to 100). Set autoHide to false to keep visibility 51 | // IE5.5/6.0 elements require hasLayout and often a background colour 52 | function Opacity(elements, oVal, autoHide) { 53 | oVal = Math.min(Math.max(oVal, 0), 99.999); 54 | var oValFrac = oVal / 100; 55 | owl.Each(NodeArray(elements), 56 | function(e) { 57 | if (autoHide !== false) { 58 | if (e.style.visibility == "hidden") { if (oVal > 0) e.style.visibility = "visible"; } 59 | else { if (oVal == 0) e.style.visibility = "hidden"; } 60 | } 61 | e.style.opacity = oValFrac; 62 | e.style.MozOpacity = oValFrac; 63 | e.style.filter = "alpha(opacity:"+oVal+")"; 64 | e.style.KHTMLOpacity = oValFrac; 65 | } 66 | ); 67 | } 68 | 69 | 70 | return { 71 | ClassExists: ClassExists, 72 | ClassApply: ClassApply, 73 | ClassRemove: ClassRemove, 74 | Opacity: Opacity 75 | }; 76 | 77 | }(); 78 | 79 | 80 | // prevent IE CSS background flickering 81 | if (owl && owl.Browser && owl.Browser.IE && Math.floor(owl.Browser.VerNum) == 6) { 82 | try { document.execCommand("BackgroundImageCache", false, true); } 83 | catch(e) {}; 84 | } -------------------------------------------------------------------------------- /js/owl/script/owl_container.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Container 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Css && !owl.Container) owl.Container = function() { 7 | 8 | // default configuration 9 | var Config = { 10 | Element: "div", 11 | Class: "econtainer", 12 | InnerClass: "econtained" 13 | }; 14 | 15 | // create container elements (and return in an array) 16 | function Create(element) { 17 | 18 | var container = []; 19 | owl.Each(owl.Array.Make(element), function(e, i) { 20 | var cont = (owl.Css.ClassExists(e, Config.Class) ? e : e.parentNode); 21 | if (!owl.Css.ClassExists(cont, Config.Class)) { 22 | 23 | // find child index 24 | var cnum = 0; 25 | var n = e; 26 | while ((n = n.previousSibling)) cnum++; 27 | 28 | // create container node 29 | var cnode = document.createElement(Config.Element); 30 | cnode.className = Config.Class; 31 | cnode.appendChild(e.cloneNode(true)); 32 | cont.replaceChild(cnode, e); 33 | 34 | // find container and element in DOM 35 | cont = cont.childNodes[cnum]; 36 | e = cont.firstChild; 37 | 38 | // modify position 39 | if (owl.Css.ComputedStyle(e, "position") == "absolute") { 40 | cont.style.position = "absolute"; 41 | cont.style.top = owl.Css.ComputedStyle(e, "top"); 42 | cont.style.bottom = owl.Css.ComputedStyle(e, "bottom"); 43 | cont.style.left = owl.Css.ComputedStyle(e, "left"); 44 | cont.style.right = owl.Css.ComputedStyle(e, "right"); 45 | } 46 | 47 | // modify dimensions 48 | cont.style.width = e.offsetWidth+"px"; 49 | cont.style.height = e.offsetHeight+"px"; 50 | cont.style.marginLeft = owl.Css.ComputedStyle(e, "margin-left"); 51 | cont.style.marginRight = owl.Css.ComputedStyle(e, "margin-right"); 52 | cont.style.marginTop = owl.Css.ComputedStyle(e, "margin-top"); 53 | cont.style.marginBottom = owl.Css.ComputedStyle(e, "margin-bottom"); 54 | 55 | // remove inner classes 56 | owl.Css.ClassApply(e, Config.InnerClass); 57 | } 58 | 59 | // add container to returned nodes 60 | owl.Array.Push(container, cont); 61 | }); 62 | 63 | return container; 64 | } 65 | 66 | // anchors container contents to top/bottom and left/right 67 | function Anchor(element, fixtop, fixleft) { 68 | element = Create(element); 69 | owl.Each(element, function(e) { 70 | e = e.firstChild; 71 | e.style.top = (fixtop ? "0px" : "auto"); 72 | e.style.bottom = (fixtop ? "auto" : "0px"); 73 | e.style.left = (fixleft ? "0px" : "auto"); 74 | e.style.right = (fixleft ? "auto" : "0px"); 75 | }); 76 | return element; 77 | } 78 | 79 | // public methods 80 | return { 81 | Config: Config, 82 | Create: Create, 83 | Anchor: Anchor 84 | }; 85 | 86 | }(); -------------------------------------------------------------------------------- /js/owl/script/owl_cookie.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Cookie 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Cookie) owl.Cookie = function() { 7 | 8 | var LineBreak = "[|]"; 9 | var LineBreakRe = /\[\|\]/g; 10 | 11 | // cookie jar - stores cookie values 12 | var Jar = null; 13 | 14 | // cookies enabled? 15 | var Enabled = function() { 16 | Set("testcookie", "testvalue", 0.1); 17 | var e = (Get("testcookie") == "testvalue"); 18 | Enabled = function() { return e; }; 19 | return Enabled(); 20 | }; 21 | 22 | // set cookie 23 | function Set(name, value, secs) { 24 | if (!Jar) Jar = {}; 25 | Jar[name] = value; 26 | value = String(value).replace(/\r/g, "").replace(/\n/g, LineBreak); 27 | var expires = ""; 28 | if (secs) { 29 | var date = new Date(); 30 | date.setTime(date.getTime()+(secs * 1000)); 31 | expires = "; expires="+date.toUTCString(); 32 | } 33 | document.cookie = name+"="+String(value)+expires+"; path="+location.pathname.substr(0, location.pathname.indexOf("/",1)+1); 34 | } 35 | 36 | // get cookie 37 | function Get(name) { 38 | var value = null; 39 | if (!Jar) { 40 | Jar = {}; 41 | owl.Each(document.cookie.split(";"), function(c) { 42 | c = owl.String.Trim(c); 43 | var p = c.indexOf("="); 44 | if (p > 0) Jar[c.substr(0, p)] = c.substring(p+1).replace(LineBreakRe, "\n"); 45 | }); 46 | } 47 | if (Jar[name]) value = Jar[name]; 48 | return value; 49 | } 50 | 51 | // delete cookie 52 | function Delete(name) { 53 | Set(name, '', -60); 54 | Jar[name] = null; 55 | } 56 | 57 | // stores a serialized object 58 | function Store(name, object, secs) { 59 | Set(name, owl.Object.Serialize(object), secs); 60 | } 61 | 62 | // returns a serialized object 63 | function Restore(name) { 64 | return owl.Object.DeSerialize(Get(name)); 65 | } 66 | 67 | // public methods 68 | return { 69 | Enabled: Enabled, 70 | Set: Set, 71 | Get: Get, 72 | Delete: Delete, 73 | Store: Store, 74 | Restore: Restore 75 | }; 76 | 77 | }(); -------------------------------------------------------------------------------- /js/owl/script/owl_css.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Css 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Css) owl.Css = function() { 7 | 8 | 9 | // returns true if class applied to passed elements 10 | function ClassExists(elements, name) { 11 | var cfound = true; 12 | if (name) owl.Each(owl.Array.Make(elements), function(e) { var cn = " "+e.className+" "; cfound = (cn.indexOf(" "+name+" ") >= 0); return cfound; }); 13 | return cfound; 14 | } 15 | 16 | 17 | // apply class to all elements 18 | function ClassApply(elements, name) { 19 | owl.Each(owl.Array.Make(elements), 20 | function(e) { 21 | var cn = " "+e.className+" "; 22 | if (cn.indexOf(" "+name+" ") < 0) { 23 | cn += name; 24 | e.className = owl.String.Trim(cn); 25 | } 26 | } 27 | ); 28 | } 29 | 30 | 31 | // remove class from elements (pass name of "" to remove all classes) 32 | function ClassRemove(elements, name) { 33 | owl.Each(owl.Array.Make(elements), 34 | function(e) { 35 | var cn = ""; 36 | if (name) { 37 | cn = " "+e.className+" "; 38 | cn = owl.String.Trim(cn.replace(new RegExp(" "+name+" ", "gi"), " ")); 39 | } 40 | e.className = cn; 41 | } 42 | ); 43 | } 44 | 45 | 46 | // set elements opacity (0 to 100). Set autoHide to false to keep visibility 47 | // IE5.5/6.0 elements require hasLayout and often a background colour 48 | function Opacity(elements, oVal, autoHide) { 49 | oVal = Math.min(Math.max(oVal, 0), 99.999999); 50 | var oValFrac = oVal / 100; 51 | owl.Each(owl.Array.Make(elements), 52 | function(e) { 53 | if (autoHide !== false) { 54 | if (e.style.visibility == "hidden") { if (oVal > 0) e.style.visibility = "visible"; } 55 | else { if (oVal == 0) e.style.visibility = "hidden"; } 56 | } 57 | e.style.opacity = oValFrac; 58 | e.style.MozOpacity = oValFrac; 59 | e.style.filter = "alpha(opacity:"+oVal+")"; 60 | e.style.KHTMLOpacity = oValFrac; 61 | } 62 | ); 63 | } 64 | 65 | 66 | // fetch the computed style of an element, e.g. element, "width" 67 | function ComputedStyle(element, rule) { 68 | var value = ""; 69 | if (element) { 70 | if (document.defaultView && document.defaultView.getComputedStyle) value = document.defaultView.getComputedStyle(element, "").getPropertyValue(rule); 71 | else if (element.currentStyle) { 72 | rule = rule.replace(/\-(\w)/g, function(m,c) { return c.toUpperCase(); }); 73 | value = element.currentStyle[rule]; 74 | } 75 | } 76 | return value; 77 | } 78 | 79 | 80 | return { 81 | ClassExists: ClassExists, 82 | ClassApply: ClassApply, 83 | ClassRemove: ClassRemove, 84 | Opacity: Opacity, 85 | ComputedStyle: ComputedStyle 86 | }; 87 | 88 | }(); 89 | 90 | 91 | // prevent IE CSS background flickering 92 | if (owl && owl.Browser && owl.Browser.IE && Math.floor(owl.Browser.VerNum) == 6) { 93 | try { document.execCommand("BackgroundImageCache", false, true); } 94 | catch(e) {}; 95 | } -------------------------------------------------------------------------------- /js/owl/script/owl_http.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Http 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Http) owl.Http = function() { 7 | 8 | var ArgArray, querystring; 9 | 10 | // returns an array of arguments 11 | function Arguments(arg) { 12 | if (!arg) arg = owl.String.Trim(location.search); 13 | if (arg != querystring) { 14 | querystring = arg; 15 | ArgArray = {}; 16 | var q = arg.indexOf('?'); 17 | if (q >= 0) arg = arg.substr(++q); 18 | owl.Each(arg.split('&'), function(a) { 19 | var v = a.split("="); 20 | if (v.length == 2) ArgArray[unescape(v[0])] = unescape(v[1]); 21 | }); 22 | } 23 | return ArgArray; 24 | } 25 | 26 | // returns a named argument 27 | function Argument(name) { 28 | Arguments(); 29 | return (ArgArray[name] ? ArgArray[name] : null); 30 | } 31 | 32 | // public methods 33 | return { 34 | Arguments: Arguments, 35 | Argument: Argument 36 | }; 37 | 38 | }(); -------------------------------------------------------------------------------- /js/owl/script/owl_image.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Image 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Image) owl.Image = function() { 7 | 8 | // load an image and run a callback function 9 | function Load(imgsrc, callback) { 10 | var img = new Image(); 11 | img.src = imgsrc; 12 | if (callback) { 13 | if (img.complete) callback(img); 14 | else img.onload = function() { callback(img); }; 15 | } 16 | } 17 | 18 | // load an alpha-transparent PNG in IE 19 | function IEpng(element, imgsrc, sizing) { 20 | if (owl.Browser.IE && owl.Browser.VerNum >= 5.5 && owl.Browser.VerNum < 7) { 21 | if (!sizing) sizing = "crop"; 22 | owl.Each(owl.Array.Make(element), function(e) { 23 | e.style.backgroundImage = "none"; 24 | e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgsrc+"', sizingMethod='"+sizing+"')"; 25 | }); 26 | } 27 | } 28 | 29 | // public methods 30 | return { 31 | Load: Load, 32 | IEpng: IEpng 33 | }; 34 | 35 | }(); -------------------------------------------------------------------------------- /js/owl/script/owl_innerhtml.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.innerHTML 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Dom && owl.Xml && !owl.innerHTML) owl.innerHTML = function(node, str, clear) { 7 | 8 | clear = (clear != false); 9 | node = owl.Array.Make(node); 10 | if (node.length > 0) { 11 | var xml = owl.Xml.Load(""+str+""); 12 | if (xml && xml.documentElement) owl.Each(node, function(n) { 13 | if (clear) owl.Dom.RemoveChildren(n); 14 | node = owl.Xml.Copy(xml.documentElement, n); 15 | }); 16 | } 17 | 18 | return node; 19 | }; -------------------------------------------------------------------------------- /js/owl/script/owl_overlay - fails.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Overlay 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Css && owl.Dom && owl.Screen && owl.Timer && !owl.Overlay) { 7 | 8 | owl.Overlay = function() { 9 | 10 | // default configuration 11 | var Config = { 12 | PageFadeID: "lb_pageoverlay", 13 | PageFadeMax: 80, 14 | PageFadeStep: (owl.Browser.IE ? 20 : 5), 15 | PageFadePause: 20 16 | }; 17 | 18 | // page fade out 19 | var pLayer = null, pElements = null, pTimer = null, pOpac = "opacity"; 20 | function PageFadeOut(callback, col, opacMax, opacStep, opacPause) { 21 | 22 | // define layer 23 | if (!pLayer) { 24 | var b = owl.Dom.Get("body"); 25 | if (b.length == 1) { 26 | pLayer = b[0].appendChild(document.createElement("div")); 27 | pLayer.style.position = "absolute"; 28 | pLayer.style.top = "0px"; pLayer.style.left = "0px"; 29 | pLayer.style.bottom = "0px"; pLayer.style.right = "0px"; 30 | } 31 | } 32 | 33 | // set layer defaults 34 | if (pLayer) { 35 | pLayer.id = Config.PageFadeID; 36 | if (col) pLayer.style.backgroundColor = col; 37 | owl.Property.Set(pLayer, pOpac, 0); 38 | owl.Css.Opacity(pLayer, 0); 39 | pElements = new owl.Overlay.Elements(0, 0, 99999, 99999); 40 | 41 | // start timer 42 | opacMax = (opacMax ? opacMax : Config.PageFadeMax); 43 | pTimer = new owl.Timer(0, opacMax, (opacStep ? opacStep : Config.PageFadeStep), (opacPause ? opacPause : Config.PageFadePause)); 44 | pTimer.CallBack = function(t) { owl.Css.Opacity(pLayer, t.Value); }; 45 | if (callback) pTimer.OnStop = function(t) { if (t.Value >= opacMax) callback(); }; 46 | pTimer.Start(); 47 | } 48 | } 49 | 50 | // page fade in 51 | function PageFadeIn(callback) { 52 | if (pTimer) { 53 | pTimer.Reverse(); 54 | pTimer.OnStop = function(t) { 55 | pElements.Show(); 56 | if (callback) callback(); 57 | }; 58 | pTimer.Start(); 59 | } 60 | } 61 | 62 | 63 | // create an iframe for element hiding 64 | function CreateIframe() { 65 | var ifb = document.createElement("iframe"); 66 | ifb.src = "javascript:false;"; 67 | ifb.frameBorder = "0"; ifb.scrolling = "no"; ifb.style.position = "absolute"; 68 | ifb.style.padding = "0px"; ifb.style.margin = "0px"; 69 | ifb.style.width = "50px"; ifb.style.height = "50px"; ifb.style.top = "0px"; ifb.style.left = "0px"; 70 | ifb.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'; 71 | return ifb; 72 | } 73 | 74 | // public methods 75 | return { 76 | Config: Config, 77 | PageFadeOut: PageFadeOut, 78 | PageFadeIn: PageFadeIn, 79 | CreateIframe: CreateIframe 80 | }; 81 | 82 | }(); 83 | 84 | 85 | // cover elements that cannot be overlaid in IE 86 | owl.Overlay.Elements = function(tx, ty, bx, by) { 87 | if (owl.Browser.IE && owl.Browser.VerNum < 7) { 88 | this.Hidden = null; 89 | this.HideTags = "select, iframe, applet"; 90 | this.HideID = "owlframe"; 91 | this.TX = tx; this.TY = ty; 92 | this.BX = bx; this.BY = by; 93 | this.Cover(); 94 | } 95 | }; 96 | 97 | // cover elements that cannot be overlaid in IE 98 | owl.Overlay.Elements.prototype.Cover = function() { 99 | 100 | // parse tags to hide 101 | if (this.HideTags && !this.Hidden) { 102 | 103 | var C = this; 104 | this.Hidden = []; 105 | owl.Each(owl.Dom.Get(this.HideTags), function(e) { 106 | 107 | if (!owl.Property.Exists(e, C.HideID)) { 108 | 109 | var loc = owl.Screen.Location(e); 110 | var ebox = { TX: loc.X, TY: loc.Y, BX: loc.X+e.offsetWidth, BY: loc.Y+e.offsetHeight }; 111 | if (ebox.BX > C.TX && ebox.BY > C.TY && C.BX > ebox.TX && C.BY > ebox.TY) { 112 | 113 | if (owl.Browser.VerNum < 5.5) { 114 | // hide box in IE5.0 115 | if (e.style.visibility != "hidden") { 116 | e.style.visibility = "hidden"; 117 | owl.Array.Push(C.Hidden, { Element: e, Iframe: false }); 118 | } 119 | } 120 | else { 121 | // create iframe in IE5.5 and IE6.0 122 | var eop = (e.offsetParent.nodeName.toLowerCase() == "body"); 123 | var iframe = e.parentNode.appendChild(owl.Overlay.CreateIframe()); 124 | iframe.style.left = (eop ? ebox.TX : e.offsetLeft) + Math.max(0, C.TX - ebox.TX) + "px"; 125 | iframe.style.top = (eop ? ebox.TY : e.offsetTop) + Math.max(0, C.TY - ebox.TY) + "px"; 126 | iframe.style.width = Math.min(C.BX, ebox.BX) - Math.max(C.TX, ebox.TX) + "px"; 127 | iframe.style.height = Math.min(C.BY, ebox.BY) - Math.max(C.TY, ebox.TY) + "px"; 128 | owl.Property.Set(iframe, C.HideID, true); 129 | owl.Array.Push(C.Hidden, { Element: e, Iframe: iframe }); 130 | } 131 | } 132 | 133 | } 134 | }); 135 | } 136 | }; 137 | 138 | // show hidden elements 139 | owl.Overlay.Elements.prototype.Show = function() { 140 | if (this.Hidden) owl.Each(this.Hidden, function(h) { 141 | if (h.Iframe) h.Element.parentNode.removeChild(h.Iframe); 142 | else h.Element.style.visibility = "visible"; 143 | }); 144 | this.Hidden = null; 145 | }; 146 | 147 | } -------------------------------------------------------------------------------- /js/owl/script/owl_scrollcontrol.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.ScrollControl 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Dom && owl.Event && !owl.ScrollControl) { 7 | 8 | // scroll control object 9 | owl.ScrollControl = function(node) { 10 | 11 | // ensure not already defined 12 | var $C = owl.ScrollControl.Config; 13 | if (owl.Css.ClassExists(node, $C.ActiveClass)) return; 14 | owl.Css.ClassApply(node, $C.ActiveClass); 15 | 16 | // find up/down buttons 17 | this.Node = node; 18 | 19 | this.Up = owl.Dom.Get("#"+node.id+$C.UpID); 20 | this.Up = (this.Up.length == 1 ? this.Up[0] : null); 21 | this.Down = owl.Dom.Get("#"+node.id+$C.DownID); 22 | this.Down = (this.Down.length == 1 ? this.Down[0] : null); 23 | 24 | // scroll animation properties 25 | this.Timer = null; 26 | this.Move = 0; 27 | this.Dir = 0; 28 | 29 | // up/down events 30 | var S = this; 31 | var event = ($C.ScrollOnClick ? ['mousedown', 'mouseup', 'keydown', 'keyup'] : ['mouseover', 'mouseout', 'focus', 'blur']); 32 | owl.Array.Push(event, "click"); 33 | owl.Each(event, function(e) { 34 | if (S.Up) new owl.Event(S.Up, e, function(evt) { S.Hander(evt); }); 35 | if (S.Down) new owl.Event(S.Down, e, function(evt) { S.Hander(evt); }); 36 | }); 37 | 38 | // is scrolling required now? 39 | this.Check(); 40 | 41 | // periodically check if scrolling is required 42 | var sCheck = setInterval(function() { S.Check(); }, $C.Check); 43 | new owl.Event(window, "unload", function() { clearInterval(sCheck); sCheck = null; }); 44 | }; 45 | 46 | 47 | // is scroll button required? 48 | owl.ScrollControl.prototype.Check = function() { 49 | 50 | var $C = owl.ScrollControl.Config; 51 | var active = $C.ActiveClass; 52 | var s = this.Node.scrollHeight, h = this.Node.offsetHeight, t = this.Node.scrollTop; 53 | var ms = s - h; 54 | 55 | if (ms <= 0) { 56 | // scrolling not required 57 | if (this.Up) owl.Css.ClassRemove(this.Up, active); 58 | if (this.Down) owl.Css.ClassRemove(this.Down, active); 59 | if (t > 0) this.Node.scrollTop = 0; 60 | this.CancelTimer(); 61 | } 62 | else { 63 | 64 | if (t >= ms) this.Node.scrollTop = ms; 65 | 66 | // handle scrolling 67 | if (this.Move != 0 || this.Dir != 0) { 68 | 69 | var dir = this.Dir; 70 | if (dir == 0 && this.Move != 0) dir = (this.Move > 0 ? -1 : 1); 71 | if (this.Move == 0) this.Move = dir * $C.Animate.MinMove; 72 | else this.Move += (dir * $C.Animate.IncMove); 73 | 74 | if (this.Dir == 0 && this.Move >= -$C.Animate.MinMove && this.Move <= $C.Animate.MinMove) this.CancelTimer(); 75 | this.Move = Math.max(-$C.Animate.MaxMove, Math.min(this.Move, $C.Animate.MaxMove)); 76 | 77 | this.Node.scrollTop += (this.Dir < 0 ? Math.ceil(this.Move) : Math.floor(this.Move)); 78 | t = this.Node.scrollTop; 79 | } 80 | 81 | // cancel movement 82 | if ((this.Dir < 1 && t == 0) || (this.Dir > 0 && t >= ms)) this.CancelTimer(); 83 | 84 | // up button required? 85 | if (this.Up) { 86 | var upA = owl.Css.ClassExists(this.Up, active); 87 | if (t == 0) { if (upA) owl.Css.ClassRemove(this.Up, active); } 88 | else { if (!upA) owl.Css.ClassApply(this.Up, active); } 89 | } 90 | 91 | // down button required? 92 | if (this.Down) { 93 | var dnA = owl.Css.ClassExists(this.Down, active); 94 | if (t >= ms) { if (dnA) owl.Css.ClassRemove(this.Down, active); } 95 | else { if (!dnA) owl.Css.ClassApply(this.Down, active); } 96 | } 97 | } 98 | }; 99 | 100 | 101 | // cancel scroll timer 102 | owl.ScrollControl.prototype.CancelTimer = function() { 103 | this.Dir = 0; 104 | this.Move = 0; 105 | if (this.Timer) { 106 | clearInterval(this.Timer); 107 | this.Timer = null; 108 | } 109 | }; 110 | 111 | 112 | // event handler 113 | owl.ScrollControl.prototype.Hander = function(evt) { 114 | 115 | evt.StopDefaultAction(); 116 | if (evt.Type != "click") { 117 | this.Dir = (evt.Type.indexOf("up") > 0 || evt.Type.indexOf("out") > 0 || evt.Type == "blur" ? 0 : (evt.Element == this.Up ? -1 : 1)); 118 | var S = this; 119 | if (!this.Timer) this.Timer = setInterval(function() { S.Check(); }, owl.ScrollControl.Config.Animate.Delay); 120 | } 121 | 122 | }; 123 | 124 | 125 | /* --------------------------------------------- 126 | owl.ScrollControl.Config 127 | --------------------------------------------- */ 128 | owl.ScrollControl.Config = { 129 | AutoStart: true, 130 | Element: ".scrollcontrol", 131 | UpID: "_up", 132 | DownID: "_down", 133 | ActiveClass: "active", 134 | ScrollOnClick: true, 135 | Check: 1500, 136 | Animate: { 137 | IncMove: 0.4, 138 | MinMove: 1, 139 | MaxMove: 15, 140 | Delay: 25 141 | } 142 | }; 143 | 144 | // auto-start scroll controls 145 | if (owl.ScrollControl.Config.AutoStart) new owl.Event(window, "load", function (e) { 146 | owl.Each(owl.Dom.Get(owl.ScrollControl.Config.Element), function(n) { new owl.ScrollControl(n); }); 147 | }, 99999); 148 | 149 | } -------------------------------------------------------------------------------- /js/owl/script/owl_session.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Session 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Event && !owl.Session) owl.Session = function() { 7 | 8 | // window object 9 | var win = (window.top || window); 10 | 11 | // session store 12 | var session = (win.name ? owl.Object.DeSerialize(win.name) : {}); 13 | 14 | // auto-save 15 | new owl.Event(window, "unload", SaveSession); 16 | 17 | // store a session value/object 18 | function Store(name, value) { 19 | session[name] = value; 20 | } 21 | 22 | // restore a session value 23 | function Restore(name) { 24 | return (owl.Object.Exists(session, name) ? session[name] : null); 25 | } 26 | 27 | // clear session 28 | function Clear() { session = {}; } 29 | 30 | // save session data on page unload (private) 31 | function SaveSession() { 32 | win.name = owl.Object.Serialize(session); 33 | } 34 | 35 | // public methods 36 | return { 37 | Store: Store, 38 | Restore: Restore, 39 | Clear: Clear 40 | }; 41 | 42 | }(); -------------------------------------------------------------------------------- /js/owl/script/owl_timer.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Timer 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Timer) { 7 | 8 | // define a timer 9 | owl.Timer = function(start, stop, step, pause, startPause, stopPause, callback) { 10 | 11 | var timer = null, Inc = (step || step == 0 ? step : (start < stop ? 1 : -1)); 12 | var timerDelay = (pause ? pause : 20), startDelay = (startPause ? startPause : 0), stopDelay = (stopPause ? stopPause : 0); 13 | 14 | // public properties 15 | this.StartValue = (start ? start : 0); 16 | this.StopValue = (stop || stop == 0 ? stop : 100); 17 | this.Value = this.StartValue; 18 | this.CallBack = (callback ? callback : null); 19 | this.OnStart = null; 20 | this.OnStop = null; 21 | this.OnReverse = null; 22 | var abort = false; 23 | var T = this; 24 | 25 | // set step: starts/stops timer and reverses if necessary 26 | this.SetStep = function(newInc) { 27 | if (newInc == 0) { this.Stop(); Inc = 0; } 28 | else { 29 | if ((newInc < 0 && this.StartValue < this.StopValue) || (newInc > 0 && this.StartValue > this.StopValue)) { 30 | Inc = -newInc; 31 | this.Reverse(); 32 | } 33 | else Inc = newInc; 34 | this.Start(); 35 | } 36 | }; 37 | 38 | // returns the step value 39 | this.GetStep = function() { return Inc; }; 40 | 41 | // start timer 42 | this.Start = function() { 43 | if (!timer) { 44 | abort = false; 45 | var tFunc = function(start) { 46 | if (!abort) { 47 | if (start) { if (T.OnStart) T.OnStart(T); if (T.CallBack) T.CallBack(T); } 48 | timer = setInterval( function() { T.Run(); }, timerDelay ); 49 | } 50 | }; 51 | var s = (this.Value == this.StartValue); 52 | if (s && startDelay > 0) setTimeout( function() { tFunc(s); }, startDelay ); else tFunc(s); 53 | } 54 | }; 55 | 56 | // run timer 57 | this.Run = function() { 58 | this.Value += Inc; 59 | this.Value = ( Inc > 0 ? Math.min(this.Value, this.StopValue) : Math.max(this.Value, this.StopValue) ); 60 | if (this.CallBack) this.CallBack(this); 61 | if (this.Value == this.StopValue) this.Stop(); 62 | }; 63 | 64 | // reverse timer 65 | this.Reverse = function() { 66 | var sv = this.StartValue; 67 | this.StartValue = this.StopValue; 68 | this.StopValue = sv; 69 | Inc = -Inc; 70 | if (this.OnReverse) this.OnReverse(this); 71 | }; 72 | 73 | // stop timer 74 | this.Stop = function() { 75 | abort = true; 76 | if (timer) { 77 | timer = clearInterval(timer); 78 | if (this.Value == this.StopValue) setTimeout(function() { if (T.OnStop) T.OnStop(T); }, stopDelay); 79 | } 80 | }; 81 | 82 | // start immediately if callback defined 83 | if (this.CallBack) this.Start(); 84 | }; 85 | 86 | } -------------------------------------------------------------------------------- /js/owl/script/owl_treecontrol.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.TreeControl 4 | 5 | --------------------------------------------- */ 6 | if (owl && owl.Dom && owl.Effect && owl.Session && !owl.TreeControl) { 7 | 8 | // tree control object 9 | owl.TreeControl = function(node) { 10 | 11 | // ensure not already defined 12 | var $C = owl.TreeControl.Config; 13 | if (!owl.Css.ClassExists(node, $C.ActiveClass)) return; 14 | owl.Css.ClassApply(node, $C.ActiveClass); 15 | 16 | var nName = node.nodeName, submenu = [], sopen = []; 17 | 18 | // session 19 | var session = (node.id ? $C.Session + node.id : null); 20 | 21 | // find sub-menus by deepest first 22 | var recurseNodes = function(n) { 23 | owl.Each(owl.Dom.Descendents(n, 1), function(c) { 24 | recurseNodes(c); 25 | if (c.nodeName == nName) owl.Array.Push(submenu, c); 26 | }); 27 | }; 28 | recurseNodes(node); 29 | 30 | // apply containers 31 | owl.Container.Anchor(submenu, false, true); 32 | 33 | // find submenu nodes 34 | submenu = owl.Dom.Get("."+owl.Container.Config.Class, node); 35 | 36 | // all submenus 37 | owl.Each(submenu, function(s, i) { 38 | var p = s.parentNode; 39 | owl.Property.Set(p, $C.LinkID, i); 40 | 41 | // styles 42 | owl.Css.ClassApply(p, $C.Class.Collapsible); 43 | 44 | // initial open/close branch 45 | sopen[i] = (session && owl.Session.Restore(session+i)); 46 | if (owl.Css.ClassExists(p, $C.Class.Closed)) sopen[i] = false; 47 | if (owl.Css.ClassExists(p, $C.Class.Open)) sopen[i] = true; 48 | if (sopen[i]) owl.Css.ClassApply(p, $C.Class.Open); 49 | else { sopen[i] = true; Collapse(i); } 50 | 51 | // click and keypress events 52 | p.setAttribute("tabindex", 0); 53 | new owl.Event(p, "click", ExpandCollapse); 54 | new owl.Event(p, "keypress", ExpandCollapse); 55 | new owl.Event(p, "mouseover", HoverEffect); 56 | new owl.Event(p, "mouseout", HoverEffect); 57 | new owl.Event(p, "focus", HoverEffect); 58 | new owl.Event(p, "blur", HoverEffect); 59 | }); 60 | 61 | // hover over/out effect 62 | function HoverEffect(evt) { 63 | evt.StopPropagation(); 64 | var li = owl.Dom.Ancestors(evt.Target, "li"); 65 | if (li && owl.Property.Exists(li, $C.LinkID)) { 66 | if (evt.Type == "mouseover" || evt.Type == "focus") owl.Css.ClassApply(li, $C.Class.Hover); 67 | else owl.Css.ClassRemove(li, $C.Class.Hover); 68 | } 69 | } 70 | 71 | // expand/collapse event 72 | function ExpandCollapse(evt) { 73 | evt.StopPropagation(); 74 | var li = owl.Dom.Ancestors(evt.Target, "li"); 75 | if (li && owl.Property.Exists(li, $C.LinkID)) { 76 | var m = owl.Property.Get(li, $C.LinkID); 77 | 78 | if (sopen[m]) { 79 | if (evt.Type != "keypress" || evt.Key().Function.indexOf("up") >= 0) Collapse(m); // collapse 80 | } 81 | else { 82 | if (evt.Type != "keypress" || evt.Key().Function.indexOf("down") >= 0) Expand(m); // expand 83 | } 84 | 85 | } 86 | }; 87 | 88 | // collapse menu 89 | function Collapse(m) { 90 | var li = submenu[m].parentNode; 91 | sopen[m] = !sopen[m]; 92 | owl.Css.ClassRemove(li, $C.Class.Open); 93 | owl.Css.ClassApply(li, $C.Class.Closed); 94 | owl.Effect.Collapse(submenu[m]); 95 | if (session) owl.Session.Store(session+m, sopen[m]); 96 | } 97 | 98 | // expand menu 99 | function Expand(m) { 100 | var li = submenu[m].parentNode; 101 | sopen[m] = !sopen[m]; 102 | owl.Css.ClassRemove(li, $C.Class.Closed); 103 | owl.Css.ClassApply(li, $C.Class.Open); 104 | owl.Effect.Expand(submenu[m]); 105 | if (session) owl.Session.Store(session+m, sopen[m]); 106 | } 107 | 108 | }; 109 | 110 | 111 | /* --------------------------------------------- 112 | owl.TreeControl.Config 113 | --------------------------------------------- */ 114 | owl.TreeControl.Config = { 115 | AutoStart: true, 116 | Container: { 117 | Element: ".treecontrol", 118 | ActiveClass: "active" 119 | }, 120 | LinkID: "submenu", 121 | Class: { 122 | Collapsible: "collapsible", 123 | Open: "open", 124 | Closed: "closed", 125 | Hover: "hover" 126 | }, 127 | Session: "treecontrol_" 128 | }; 129 | 130 | // auto-start tree controls 131 | if (owl.TreeControl.Config.AutoStart) new owl.Event(window, "load", function (e) { 132 | owl.Each(owl.Dom.Get(owl.TreeControl.Config.Container.Element), function(n) { new owl.TreeControl(n); }); 133 | }, 99990); 134 | 135 | } -------------------------------------------------------------------------------- /js/owl/script/owl_xml.js: -------------------------------------------------------------------------------- 1 | /* --------------------------------------------- 2 | 3 | owl.Xml 4 | 5 | --------------------------------------------- */ 6 | if (owl && !owl.Xml) owl.Xml = function() { 7 | 8 | // node types 9 | var ElementNode = 1; 10 | var AttributeNode = 2; 11 | var TextNode = 3; 12 | var CommentNode = 8; 13 | 14 | 15 | // create a new empty XML document 16 | function New() { 17 | var xml = null; 18 | if (document.implementation && document.implementation.createDocument) xml = document.implementation.createDocument("", "xml", null); 19 | else { 20 | // IE XML 21 | owl.Each( 22 | ["MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"], 23 | function(dom) { try { xml = new ActiveXObject(dom); } catch(e) {}; return !!xml; } 24 | ); 25 | } 26 | return xml; 27 | } 28 | 29 | 30 | // create an XML document from a string 31 | function Load(str) { 32 | var xml = null; 33 | if (!str) xml = New(); 34 | else { 35 | if (typeof DOMParser != "undefined") xml = (new DOMParser()).parseFromString(str, "application/xml"); 36 | else { xml = New(); if (xml) xml.loadXML(str); } 37 | } 38 | return xml; 39 | } 40 | 41 | 42 | // create node event (private) 43 | function AddEvent(node, evt, fn) { node[evt] = function() { return eval(fn); }; } 44 | 45 | 46 | // copy XML node children to DOM node 47 | function Copy(xmlDoc, domNode, level) { 48 | 49 | if (typeof level == "undefined") level = 1; 50 | if (level > 1) { 51 | 52 | if (xmlDoc.nodeType == 1) { 53 | // element node 54 | var thisNode = document.createElement(xmlDoc.nodeName); 55 | 56 | // attributes 57 | var handler = {}; 58 | for (var a = 0, attr = xmlDoc.attributes.length; a < attr; a++) { 59 | var aName = xmlDoc.attributes[a].name, aValue = xmlDoc.attributes[a].value, evt = (aName.substr(0,2) == "on"); 60 | if (evt) handler[aName] = aValue; 61 | else { 62 | switch (aName) { 63 | case "class": thisNode.className = aValue; break; 64 | case "for": thisNode.htmlFor = aValue; break; 65 | default: thisNode.setAttribute(aName, aValue); break; 66 | } 67 | } 68 | } 69 | 70 | // append node 71 | domNode = domNode.appendChild(thisNode); 72 | 73 | // attach events 74 | for (evt in handler) AddEvent(domNode, evt, handler[evt]); 75 | 76 | } 77 | else if (xmlDoc.nodeType == 3) { 78 | // text node 79 | var text = (xmlDoc.nodeValue ? xmlDoc.nodeValue : ""); 80 | var test = owl.String.Trim(text); 81 | if (test.length < 7 || (test.indexOf("") != (test.length - 3))) domNode.appendChild(document.createTextNode(text)); 82 | } 83 | } 84 | 85 | // recurse child nodes 86 | for (var i = 0; i < xmlDoc.childNodes.length; i++) Copy(xmlDoc.childNodes[i], domNode, level+1); 87 | 88 | // return last child added 89 | return (domNode.lastChild ? domNode.lastChild : domNode); 90 | } 91 | 92 | 93 | // transform XML using XSL 94 | function Transform(xml, xsl) { 95 | var trans = null; 96 | if (window.XSLTProcessor) { 97 | try { 98 | var xslp = new XSLTProcessor(); 99 | xslp.importStylesheet(xsl); 100 | trans = xslp.transformToDocument(xml, document); 101 | } catch(e) {}; 102 | } 103 | else { 104 | try { 105 | trans = this.New(); 106 | trans.loadXML( xml.transformNode(xsl) ); 107 | } catch(e) {}; 108 | } 109 | return (trans && trans.documentElement && trans.documentElement.childNodes.length ? trans : null); 110 | } 111 | 112 | 113 | return { 114 | ElementNode: ElementNode, 115 | AttributeNode: AttributeNode, 116 | TextNode: TextNode, 117 | CommentNode: CommentNode, 118 | New: New, 119 | Load: Load, 120 | Copy: Copy, 121 | Transform: Transform 122 | }; 123 | 124 | }(); -------------------------------------------------------------------------------- /js/owl/scriptdemo/doc.js: -------------------------------------------------------------------------------- 1 | // Documentation 2 | var doc = {}; 3 | 4 | doc.Expand = function() { 5 | 6 | var DocState = "docstate"; 7 | var Index = "Index"; 8 | var Collapsed = "Collapsed"; 9 | 10 | var State = owl.Cookie.Restore(DocState); 11 | if (!State) State = []; 12 | 13 | // initialise 14 | function Init() { 15 | var titles = owl.Dom.Get("h2, h3"); 16 | owl.Each(titles, function(t, i) { 17 | owl.Property.Set(t, Index, i); 18 | new owl.Event(t, "click", Collapse); 19 | if (typeof(State[i]) == 'undefined' || State[i] !== false) Collapse(t); 20 | }); 21 | 22 | } 23 | 24 | // collapse/expand 25 | function Collapse(e) { 26 | if (e && e.Element) e = e.Element; 27 | var c = !owl.Property.Get(e, Collapsed); 28 | owl.Property.Set(e, Collapsed, c); 29 | owl.Each(owl.Dom.Descendents(e.parentNode, 1), function(n, i) { n.style.display = (c && i > 0 ? "none" : "block"); }); 30 | State[owl.Property.Get(e, Index)] = c; 31 | owl.Cookie.Store(DocState, State); 32 | } 33 | 34 | return { 35 | Init: Init 36 | }; 37 | 38 | }(); 39 | 40 | 41 | // startup event 42 | new owl.Event(window, "load", doc.Expand.Init); -------------------------------------------------------------------------------- /js/owl/styles/assess.css: -------------------------------------------------------------------------------- 1 | /* Assessment functionality */ 2 | .assess ol 3 | { 4 | list-style-type: decimal; 5 | padding: 0; 6 | margin: 1em 0 1.5em 3em; 7 | } 8 | 9 | .assess ol li 10 | { 11 | padding: 0; 12 | margin: 1em 0; 13 | } 14 | 15 | .assess ol li span 16 | { 17 | padding-right: 18px; 18 | background: none 100% 50% no-repeat; 19 | } 20 | 21 | .assess.active ol li 22 | { 23 | position: absolute; 24 | visibility: hidden; 25 | cursor: pointer; 26 | } 27 | 28 | .assess ol li.yes, .assess ol li.no 29 | { 30 | position: static; 31 | visibility: visible; 32 | } 33 | 34 | .assess ol li.yes span { color: #090; background-image: url("images_assess/tick.png"); } 35 | .assess ol li.no span { font-weight: bold; color: #c00; background-image: url("images_assess/cross.png"); } 36 | 37 | .assess p 38 | { 39 | clear: both; 40 | width: 100%; 41 | text-align: center; 42 | } 43 | 44 | .assess p.ask 45 | { 46 | display: none; 47 | width: 100%; 48 | font-size: 1.25em; 49 | text-align: center; 50 | margin: 2em auto 0 auto; 51 | } 52 | 53 | .assess p.ask strong { display: block; } 54 | 55 | .assess p.restart 56 | { 57 | text-align: right; 58 | } 59 | 60 | .assess ul 61 | { 62 | display: none; 63 | width: 138px; 64 | height: 64px; 65 | list-style-type: none; 66 | padding: 0; 67 | margin: 10px auto; 68 | } 69 | 70 | .assess ul li 71 | { 72 | display: inline; 73 | float: left; 74 | padding: 0; 75 | margin: 0; 76 | } 77 | 78 | .assess ul li a 79 | { 80 | display: block; 81 | width: 64px; 82 | height: 64px; 83 | background: url("images_assess/tickbig.png") 0 0 no-repeat; 84 | } 85 | 86 | .assess ul li a.cross 87 | { 88 | background-image: url("images_assess/crossbig.png"); 89 | margin-left: 10px; 90 | } 91 | 92 | .assess ul li a strong { display: none; } -------------------------------------------------------------------------------- /js/owl/styles/container.css: -------------------------------------------------------------------------------- 1 | /* container CSS */ 2 | .econtainer 3 | { 4 | display: block; 5 | position: relative; 6 | padding: 0; 7 | margin: 0; 8 | border: 0 none; 9 | overflow: hidden; 10 | } 11 | 12 | .econtained 13 | { 14 | position: absolute !important; 15 | top: auto; 16 | bottom: auto; 17 | left: auto; 18 | right: auto; 19 | margin: 0 !important; 20 | } -------------------------------------------------------------------------------- /js/owl/styles/contextmenu.css: -------------------------------------------------------------------------------- 1 | /* owl context menu control CSS */ 2 | 3 | .contextmenu 4 | { 5 | position: relative; 6 | display: inline; 7 | float: left; 8 | cursor: pointer; 9 | outline: 0 none; 10 | z-index: 0; 11 | } 12 | 13 | .contextmenu.hover 14 | { 15 | background-color: #ccc; 16 | } 17 | 18 | .contextmenu ul 19 | { 20 | display: none; 21 | } 22 | 23 | ul.context 24 | { 25 | position: absolute; 26 | visibility: hidden; 27 | float: left; 28 | width: 8em; 29 | left: 100%; 30 | top: 100%; 31 | list-style-type: none; 32 | margin: 0; 33 | background-color: #666; 34 | z-index: 1; 35 | } 36 | 37 | ul.context li 38 | { 39 | margin: 1px; 40 | } 41 | 42 | ul.context li a 43 | { 44 | display: block; 45 | height: 1%; 46 | padding: 1px 4px; 47 | text-decoration: none; 48 | color: #fff; 49 | } 50 | 51 | ul.context li a:hover, ul.context li a:focus 52 | { 53 | background-color: #000; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /js/owl/styles/images_assess/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_assess/cross.png -------------------------------------------------------------------------------- /js/owl/styles/images_assess/crossbig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_assess/crossbig.png -------------------------------------------------------------------------------- /js/owl/styles/images_assess/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_assess/tick.png -------------------------------------------------------------------------------- /js/owl/styles/images_assess/tickbig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_assess/tickbig.png -------------------------------------------------------------------------------- /js/owl/styles/images_lightbox/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_lightbox/back.gif -------------------------------------------------------------------------------- /js/owl/styles/images_lightbox/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_lightbox/close.gif -------------------------------------------------------------------------------- /js/owl/styles/images_lightbox/description.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_lightbox/description.gif -------------------------------------------------------------------------------- /js/owl/styles/images_lightbox/load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_lightbox/load.gif -------------------------------------------------------------------------------- /js/owl/styles/images_lightbox/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigbuckler/snippets/cbe1edd546af3c39ae96cc9f4873ce86d1e35b65/js/owl/styles/images_lightbox/next.gif -------------------------------------------------------------------------------- /js/owl/styles/lightbox.css: -------------------------------------------------------------------------------- 1 | /* owl lightbox CSS */ 2 | .lightbox 3 | { 4 | width: 420px; 5 | list-style-type: none; 6 | margin: 0 auto; 7 | overflow: auto; 8 | } 9 | 10 | .lightbox li 11 | { 12 | display: inline; 13 | float: left; 14 | margin: 5px; 15 | } 16 | 17 | .lightbox li a 18 | { 19 | display: block; 20 | padding: 3px; 21 | background-color: #fff; 22 | border: 1px solid #ccc; 23 | } 24 | 25 | .lightbox li a:focus, .lightbox li a:hover { background-color: #ff9; } 26 | 27 | .lightbox li a * 28 | { 29 | display: none; 30 | } 31 | 32 | .lightbox li a img 33 | { 34 | display: block; 35 | border: 1px solid #ccc; 36 | } 37 | 38 | /* window overlay */ 39 | #lb_pageoverlay 40 | { 41 | background-color: #000; 42 | } 43 | 44 | /* lightbox window */ 45 | #lb_window 46 | { 47 | position: absolute; 48 | width: 1px; 49 | height: 1px; 50 | padding: 5px; 51 | background-color: #fff; 52 | overflow: hidden; 53 | } 54 | 55 | #lb_image 56 | { 57 | position: relative; 58 | width: 100%; 59 | height: 100%; 60 | background: #fff url("images_lightbox/load.gif") 50% 50% no-repeat; 61 | overflow: hidden; 62 | } 63 | 64 | #lb_image img 65 | { 66 | position: absolute; 67 | } 68 | 69 | #lb_bar 70 | { 71 | position: absolute; 72 | bottom: -1px; 73 | left: 0; 74 | width: 100%; 75 | min-height: 44px; 76 | height: auto !important; 77 | height: 44px; 78 | font-size: 0.85em; 79 | padding: 0; 80 | margin: 0; 81 | color: #fff; 82 | background: #000 url("images_lightbox/description.gif") 0 0 repeat-x; 83 | overflow: visible; 84 | } 85 | 86 | #lb_bar p 87 | { 88 | padding: 0; 89 | margin: 2px 5.5em 4px 5px; 90 | } 91 | 92 | #lb_bar p strong, #lb_bar p span { display: block; } 93 | 94 | #lb_bar a 95 | { 96 | position: absolute; 97 | top: 5px; 98 | right: 5px; 99 | width: 18px; 100 | height: 19px; 101 | text-decoration: none; 102 | background: url("images_lightbox/next.gif") 0 0 no-repeat; 103 | } 104 | 105 | #lb_bar a#lb_next strong, #lb_bar a#lb_back strong { display: none; } 106 | 107 | #lb_bar a#lb_back 108 | { 109 | right: 30px; 110 | background-image: url("images_lightbox/back.gif") 111 | } 112 | 113 | #lb_bar a#lb_close 114 | { 115 | top: auto; 116 | bottom: 5px; 117 | width: auto; 118 | height: auto; 119 | padding-right: 14px; 120 | color: #fff; 121 | background: url("images_lightbox/close.gif") 100% 65% no-repeat; 122 | } -------------------------------------------------------------------------------- /js/owl/styles/screen.css: -------------------------------------------------------------------------------- 1 | /* owl documentation styles */ 2 | * 3 | { 4 | padding: 0; 5 | margin: 0; 6 | } 7 | 8 | body 9 | { 10 | font-family: arial, freesans, sans-serif; 11 | font-size: 0.75em; 12 | margin: 6px; 13 | color: #444; 14 | background-color: #fff; 15 | } 16 | 17 | h1, h2, h3 18 | { 19 | font-size: 1.5em; 20 | font-weight: bold; 21 | padding: 0.1em 0.2em; 22 | margin: 0 0 0.2em 0; 23 | background-color: #bcf; 24 | } 25 | 26 | h2 27 | { 28 | font-size: 1.25em; 29 | background-color: #cdf; 30 | } 31 | 32 | h3 33 | { 34 | font-size: 1.1em; 35 | background-color: #eef; 36 | } 37 | 38 | h4 39 | { 40 | font-size: 1em; 41 | font-weight: bold; 42 | } 43 | 44 | ol 45 | { 46 | list-style-type: none; 47 | margin: 2em 0; 48 | } 49 | 50 | ol ol, ul 51 | { 52 | margin: 1em 0 1em 3em; 53 | } 54 | 55 | li 56 | { 57 | margin: 1em 0; 58 | } 59 | 60 | p 61 | { 62 | margin: 0.8em 0; 63 | } 64 | 65 | dl 66 | { 67 | margin: 0 0 1em 1em; 68 | } 69 | 70 | dt 71 | { 72 | display: block; 73 | font-weight: bold; 74 | } 75 | 76 | dd 77 | { 78 | display: block; 79 | margin: 0.2em 0 1em 3em; 80 | color: #888; 81 | } 82 | 83 | table 84 | { 85 | font-size: 1em; 86 | margin: 0.2em 0 1em 3em; 87 | border-collapse: collapse; 88 | } 89 | 90 | th 91 | { 92 | font-weight: bold; 93 | background-color: #eee; 94 | } 95 | 96 | th, td 97 | { 98 | text-align: left; 99 | vertical-align: top; 100 | padding: 1px 2px; 101 | border: 1px solid #999; 102 | } 103 | 104 | code 105 | { 106 | display: block; 107 | white-space: pre; 108 | padding: 0.2em 0.3em; 109 | margin: 0.5em 0 1em 3em; 110 | background-color: #eee; 111 | border: 1px solid #ddd; 112 | overflow: auto; 113 | } 114 | 115 | a, a:link, a:visited { text-decoration: underline; color: #00f; } 116 | a:hover { color: #f00; } -------------------------------------------------------------------------------- /js/owl/styles/test.css: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | padding: 0; 4 | margin: 0; 5 | } 6 | 7 | body 8 | { 9 | font-family: tahoma, arial, helvetica, freesans, sans-serif; 10 | font-size: 0.8em; 11 | margin: 10px; 12 | padding: 0px; /* do not use padding on body - it confuses the offset location in IE */ 13 | } 14 | 15 | h1 16 | { 17 | font-size: 1.6em; 18 | font-weight: normal; 19 | } 20 | 21 | /* if position:relative is used, ensure element hasLayout */ 22 | #seltest 23 | { 24 | position: relative; 25 | width: 50%; 26 | margin: 10px; 27 | } 28 | 29 | p 30 | { 31 | margin-bottom: 1em; 32 | } -------------------------------------------------------------------------------- /js/owl/styles/treecontrol.css: -------------------------------------------------------------------------------- 1 | /* owl tree control CSS */ 2 | .econtainer 3 | { 4 | display: block; 5 | position: relative; 6 | padding: 0; 7 | margin: 0; 8 | border: 0 none; 9 | overflow: hidden; 10 | } 11 | 12 | .econtained 13 | { 14 | position: absolute !important; 15 | top: auto; 16 | bottom: auto; 17 | left: auto; 18 | right: auto; 19 | margin: 0 !important; 20 | } 21 | 22 | ol.treecontrol 23 | { 24 | width: 12em; 25 | list-style-type: none; 26 | padding: 0; 27 | margin: 0; 28 | } 29 | 30 | ol.treecontrol ol 31 | { 32 | width: 100%; 33 | list-style-type: none; 34 | padding: 0; 35 | margin: 0; 36 | color: #000; 37 | background-color: #fff; 38 | } 39 | 40 | ol.treecontrol li 41 | { 42 | width: 100%; 43 | padding: 0; 44 | margin: 0; 45 | outline: 0 none; 46 | } 47 | 48 | li.collapsible 49 | { 50 | background-color: #ccc; 51 | } 52 | 53 | li li.collapsible 54 | { 55 | background-color: #eee; 56 | } 57 | 58 | li.collapsible ol 59 | { 60 | background-color: #fff; 61 | } 62 | 63 | li.open 64 | { 65 | color: #f00; 66 | } 67 | 68 | li.closed 69 | { 70 | color: #00f; 71 | } 72 | 73 | li.hover 74 | { 75 | background-color: #ff0; 76 | } 77 | 78 | li li.hover 79 | { 80 | background-color: #0ff; 81 | } 82 | -------------------------------------------------------------------------------- /js/owl/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

owl testbed

29 | 30 |
31 |

element 1

32 |

test

33 |
34 | 35 |
36 |

element 2

37 |

link

38 |
39 | 40 |
41 |

This is div#test2

42 |
43 | 44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 |

test

52 | 53 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /js/owl/testajax.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

owl Ajax testbed

29 | 30 |
31 | 32 |
33 | Ajax test 34 | 35 |
36 | 37 | 38 |
39 | 40 |
41 | 42 | 43 |
44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |

sum:  

55 | 56 |
57 | 58 |
59 | 60 |

abort

61 | 62 |

remote script call | abort

63 | 64 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /js/owl/testassess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

owl Q&A testbed

27 | 28 |
29 | 30 |
    31 |
  1. Are your people delivering what the business needs?
  2. 32 |
  3. Do you have the right people for the future growth of your business?
  4. 33 |
  5. Do the people that you have ensure that you retain a competitive edge?
  6. 34 |
  7. Are your most valuable people being developed fast enough?
  8. 35 |
  9. Are you developing high performance?
  10. 36 |
  11. Are your managers supporting and developing your strongest people?
  12. 37 |
  13. Do you have the internal flexibility to cope with constantly changing demands?
  14. 38 |
39 | 40 |

41 | 42 | 46 | 47 |

If you answered "no"; to one or more questions, we can guarantee that your business will benefit from using this.

48 |

Almost there - but not quite!

49 |

If you answered "yes" to everything, then you do not need this service.

50 | 51 |
52 | 53 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /js/owl/testbrowser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

owl testbed

18 | 19 |
20 |

element 1

21 |

test

22 |
23 | 24 |
25 |

element 2

26 |

link

27 |
28 | 29 |
30 |

This is div#test2

31 |
32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 |

test

41 | 42 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /js/owl/testcontainer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

owl testbed

27 | 28 |
29 |

element 1

30 |

test

31 |
32 | 33 |
34 |

element 2

35 |

link

36 |
37 | 38 |
39 |

This is div#test2

40 |
41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 |

test

50 | 51 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /js/owl/testcontextmenu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

owl context menu

29 | 30 |

This is some text!

31 |

This is some text!

32 |

This is some text!

33 |

This is some text!

34 |

This is some text!

35 |

This is some text!

36 |

This is some text!

37 |

This is some text!

38 |

This is some text!

39 |

This is some text!

40 |

This is some text!

41 |

This is some text!

42 | 43 | 44 |
click or hover for context menu 45 | 46 | 53 | 54 |
55 | 56 |

57 | 58 | 59 | -------------------------------------------------------------------------------- /js/owl/testcookie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

owl testbed

20 | 21 |
22 |

element 1

23 |

test

24 |
25 | 26 |
27 |

element 2

28 |

link

29 |
30 | 31 |
32 |

This is div#test2

33 |
34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 |

test

43 | 44 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /js/owl/testdom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

owl testbed

26 | 27 |
    28 |
  1. item 1
  2. 29 |
  3. item 2
  4. 30 |
  5. item 3
  6. 31 |
  7. item 4 32 |
      33 |
    1. item 4a
    2. 34 |
    3. item 4b
    4. 35 |
    5. item 4c
    6. 36 |
    37 |
  8. 38 |
  9. item 5
  10. 39 |
40 | 41 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /js/owl/testeffect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |

owl effect testbed

42 | 43 |

owl.Effect testing.

44 | 45 |

open/close

46 |
47 |

This is an expanding information box.

48 |

Any number of nodes can appear here.

49 |

This sentence is hidden.

50 |
51 | 52 |

End of testing effect.

53 | 54 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /js/owl/testevent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |

owl event testbed

49 | 50 |
51 | 52 |
53 |
54 | 55 |
56 | 57 | 58 | 59 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /js/owl/testhttp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

owl testbed

20 | 21 |
22 |

element 1

23 |

test

24 |
25 | 26 |
27 |

element 2

28 |

link

29 |
30 | 31 |
32 |

This is div#test2

33 |
34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 |

test

43 | 44 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /js/owl/testimage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

owl testbed

21 | 22 |
23 |

element 1

24 |

test

25 |
26 | 27 |
28 |

element 2

29 |

link

30 |
31 | 32 |
33 |

This is div#test2

34 |
35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 |

test

44 | 45 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /js/owl/testlightbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

owl lightbox

26 | 27 |

This is a test of the owl.Lightbox which converts a list of image thumbnails to a nice graphic browsing system.

28 | 29 | 51 | 52 | 53 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /js/owl/testobject.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

owl testbed

18 | 19 |
20 |

element 1

21 |

test

22 |
23 | 24 |
25 |

element 2

26 |

link

27 |
28 | 29 |
30 |

This is div#test2

31 |
32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 |

test

41 | 42 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /js/owl/testscreen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |

owl testbed

31 | 32 |
33 |

element 1

34 |

test

35 |
36 | 37 |
38 |

element 2

39 |

link

40 |
41 | 42 |
43 |

This is div#test2

44 |
45 | 46 |
47 | test moving viewport system 1 48 |
49 | 50 |
51 | test moving viewport system 2 52 |
53 | 54 |
55 | test moving viewport system 3 56 |
57 | 58 |
59 | test moving viewport system 4 60 |
61 | 62 |
63 | test moving viewport system 5 64 |
65 | 66 |
67 | test moving viewport system 6 68 |
69 | 70 |
71 | test moving viewport system 7 72 |
73 | 74 |
75 | test moving viewport system 8 76 |
77 | 78 |
79 | test moving viewport system 9 80 |
81 | 82 |
83 |
84 | 85 | 86 |
87 |
88 | 89 |

test

90 | 91 |
92 | 93 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /js/owl/testsession.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

owl testbed: session system

21 | 22 |

Optimalworks.net

23 | 24 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /js/owl/testtreecontrol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |

owl testbed: tree control

30 | 31 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /js/owl/testxml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | owl core test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

owl testbed

19 | 20 |
21 |

element 1

22 |

test

23 |
24 | 25 |
26 |

element 2

27 |

link

28 |
29 | 30 |
31 |

This is div#test2

32 |
33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | 41 |

test

42 | 43 |
44 | 45 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /js/owl/to do.txt: -------------------------------------------------------------------------------- 1 | OWL to do 2 | --------- 3 | 4 | Keyboard events: 5 | http://unixpapa.com/js/key.html 6 | 7 | JS XPath: 8 | http://coderepos.org/share/wiki/JavaScript-XPath 9 | 10 | owl.Graphics 11 | implement hex/rgb to hsv 12 | http://js.fleegix.org/plugins/color/convert 13 | http://svn.fleegix.org/fleegix_js/trunk/plugins/color/convert.js 14 | http://www.cs.rit.edu/~ncs/color/t_convert.html 15 | 16 | owl.Form 17 | hidden label effect: 18 | http://www.456bereastreet.com/archive/200710/autopopulating_text_input_fields_with_javascript/ 19 | 20 | Autocomplete box: 21 | http://www.webreference.com/programming/javascript/ncz/ 22 | http://developer.yahoo.com/ypatterns/pattern.php?pattern=autocomplete 23 | http://www.codeproject.com/KB/scripting/jsactb.aspx?df=100&forumid=92394&exp=0&fr=26&select=2145061 24 | 25 | Date Picker - small, lightweight, few features 26 | 27 | owl.Image 28 | scrolling thumbnail? 29 | Never actually used it! 30 | 31 | owl.Timer 32 | could provide function for step? Pass from, to, current - return new current? 33 | would allow variable animation e.g. fast to slow. 34 | 35 | owl.DOM 36 | onReady event - use instead on window.onload 37 | in Fx/Opera - document.addEventListener("DOMContentLoaded", funcName, false); 38 | 39 | owl.Ajax 40 | See http://snook.ca/archives/javascript/xmlhttprequest_activex_ie/ 41 | Use: ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] 42 | 43 | 44 | owl.Event - allow event triggers to be implemented. Rather than passing string such as "click", pass a registered function, e.g. owl.EventFire.TextResize. 45 | 46 | 47 | AutoSelect an element's text: 48 | 49 | function autoSelect(selectTarget) { 50 | if(selectTarget != null && ((selectTarget.childNodes.length == 1 && selectTarget.childNodes[0].nodeName == "#text") || (selectTarget.tagName == "INPUT" && selectTarget.type == "text"))) { 51 | if(selectTarget.tagName == 'TEXTAREA' || (selectTarget.tagName == "INPUT" && selectTarget.type == "text")) { // Cross-browser 52 | selectTarget.select(); 53 | } else if(window.getSelection) { // FF, Safari, Opera 54 | var sel = window.getSelection(); 55 | var range = document.createRange(); 56 | range.selectNode(selectTarget.firstChild); 57 | sel.removeAllRanges(); 58 | sel.addRange(range); 59 | } else { // IE 60 | document.selection.empty(); 61 | var range = document.body.createTextRange(); 62 | range.moveToElementText(selectTarget); 63 | range.select(); 64 | } 65 | } 66 | } 67 | 68 | 69 | DID NOT NEED: 70 | Remove owl.RegEx - put regex's into items that use them, unless it has global appeal! 71 | /* --------------------------------------------- 72 | 73 | owl.RegEx 74 | regularly used expressions 75 | 76 | --------------------------------------------- */ 77 | owl.RegEx = { 78 | 79 | toNumeric: (/[^0-9-.]/g), 80 | Trim: (/^\s*|\s*$/g), 81 | Clean: (/[^\w|\s|@|&|.|,|!|%|(|)|+|-]/g), 82 | Whitespace: (/[_|\s]+/g), 83 | 84 | // add a new regex with a unique name 85 | Add: function(name, regex) { 86 | var i = 0, eName = (name ? String(name) : "Undefined"); 87 | do { 88 | name = eName + (i > 0 ? i : ''); 89 | i++; 90 | } while (typeof owl.RegEx[name] != 'undefined'); 91 | owl.RegEx[name] = regex; 92 | return name; 93 | } 94 | 95 | } -------------------------------------------------------------------------------- /js/owl/webservices/sum.php: -------------------------------------------------------------------------------- 1 | $value) { 8 | if ($name != 'ajax') { 9 | if (get_magic_quotes_gpc()) $value = stripslashes($value); 10 | if (is_numeric($value)) $args[] = intval($value); 11 | } 12 | } 13 | 14 | // fetch all POST arguments 15 | foreach ($_POST as $name => $value) { 16 | if ($name != 'ajax') { 17 | if (get_magic_quotes_gpc()) $value = stripslashes($value); 18 | if (is_numeric($value)) $args[] = intval($value); 19 | } 20 | } 21 | 22 | sleep(2); 23 | 24 | // output XML response 25 | header('Content-type: text/xml'); 26 | print '<'.'?xml version="1.0" ?'.">\n"; 27 | print "\n"; 28 | print "\t\n"; 29 | $total = 0; 30 | foreach($args as $arg) { 31 | print "\t\t$arg\n"; 32 | $total += $arg; 33 | } 34 | print "\t\n"; 35 | print "\t$total\n"; 36 | print "\n"; 37 | 38 | ob_end_flush(); 39 | 40 | // output headers to log 41 | /* 42 | if ($fp=fopen('log.txt', 'w')) { 43 | foreach($_SERVER as $key => $value) fwrite($fp, "$key : $value\n"); 44 | fclose($fp); 45 | } 46 | */ 47 | ?> -------------------------------------------------------------------------------- /js/owl/webservices/sumjs.php: -------------------------------------------------------------------------------- 1 | $value) { 9 | if ($name != 'ajax') { 10 | if (get_magic_quotes_gpc()) $value = stripslashes($value); 11 | if (is_numeric($value)) $args[] = intval($value); 12 | } 13 | } 14 | 15 | sleep(2); 16 | 17 | // output XML response 18 | header('Content-type: text/javascript'); 19 | $total = 0; 20 | $ap = ''; 21 | foreach($args as $arg) { 22 | $ap .= $arg.','; 23 | $total += $arg; 24 | } 25 | print 'var argpassed = ['.substr($ap, 0, -1)."];\n"; 26 | print "var argtotal = $total;\n"; 27 | 28 | ob_end_flush(); 29 | 30 | // output headers to log 31 | /* 32 | if ($fp=fopen('log.txt', 'w')) { 33 | foreach($_SERVER as $key => $value) fwrite($fp, "$key : $value\n"); 34 | fclose($fp); 35 | } 36 | */ 37 | ?> -------------------------------------------------------------------------------- /js/pacparser/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Digita PAC Parser 7.0 6 | 7 | 8 | 9 | 10 |
11 |

Digita PAC Parser 7.0

12 | 13 |
14 | 15 |
or drop XML files here
16 |
17 | 18 | 19 | 20 |
21 | 22 |
23 |

ERROR: unsupported browser

24 |
25 | 26 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /wordpress/plugins/ow-twitter-feed/!dev/test.php: -------------------------------------------------------------------------------- 1 | Render(); 10 | 11 | echo $feed; -------------------------------------------------------------------------------- /wordpress/plugins/ow_functions.php: -------------------------------------------------------------------------------- 1 | 0 && strlen($v) <= $maxlength ? $v : $default); 16 | } 17 | 18 | 19 | // fetches a POST variable 20 | function ow_post($var, $default='', $maxlength=9999) { 21 | $v = (isset($_POST[$var]) ? $_POST[$var] : ''); 22 | return ow_cleanvar(strlen($v) > 0 && strlen($v) <= $maxlength ? $v : $default); 23 | } 24 | 25 | 26 | // clean a form variable 27 | function ow_cleanvar($v) { 28 | $v = (string) $v; 29 | if (get_magic_quotes_gpc()) $v = stripslashes($v); 30 | $v = trim($v); 31 | $v = str_replace("\r", '', $v); 32 | $v = preg_replace('/[ \t\f]+/', ' ', $v); 33 | $v = htmlentities($v); 34 | do { 35 | $ov = $v; 36 | $v = str_replace("\n\n", "\n", $v); 37 | } while ($v != $ov); 38 | return $v; 39 | } 40 | 41 | 42 | // returns valid email address (checks for spam attempt) 43 | function ow_emailcheck($e) { 44 | $e = strtolower($e); 45 | if ($e != '' && (preg_match('/^.+@[a-z0-9]+([_\.\-]{0,1}[a-z0-9]+)*([\.]{1}[a-z0-9]+)+$/', $e) != 1 || strpos($e, '\n') !== false || strpos($e, 'cc:') !== false)) $e = ''; 46 | return $e; 47 | } 48 | 49 | 50 | // get microtime (seconds integer) 51 | function ow_microtime_int() { 52 | list($usec, $sec) = explode(" ", microtime()); 53 | return ((int) $sec); 54 | } 55 | 56 | 57 | // encode 58 | function ow_encode($value) { 59 | $value = html_entity_decode(strval($value)); 60 | $ip = $_SERVER['REMOTE_ADDR']; 61 | $ip = preg_replace('/\D/', '', $ip); 62 | if ($ip == '') $ip = '139999205'; 63 | $ret = ''; 64 | for ($i = 0; $i < strlen($value); $i++) { 65 | $c = ord(substr($value, $i, 1)); 66 | $ic = substr($ip, $i % strlen($ip), 1) + $i; 67 | $ret .= chr($c ^ $ic); 68 | } 69 | return htmlentities($ret); 70 | } 71 | --------------------------------------------------------------------------------