first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
$q = strtolower( $_GET["q"] );
|
||||
if (!$q) return;
|
||||
|
||||
include("../connect.php");
|
||||
|
||||
// Replace "TABLE_NAME" below with the table you'd like to extract data from
|
||||
$data = $db->query( "SELECT NAMA FROM m_pasien" )
|
||||
or die( mysqli_error($connect) );
|
||||
|
||||
// Replace "COLUMN_ONE" below with the column you'd like to search through
|
||||
// In between the if/then statement, you may present a string of text
|
||||
// you'd like to appear in the textbox.
|
||||
while( $row = mysqli_fetch_array( $data )){
|
||||
if ( strpos( strtolower( $row['NAMA'] ), $q ) !== false ) {
|
||||
echo $row['NAMA']."\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Binary file not shown.
@@ -0,0 +1,416 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<style>
|
||||
html {font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
||||
body {margin:0}
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {display:block}
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {display:inline-block;vertical-align:baseline}
|
||||
audio:not([controls]) {display:none;height:0}
|
||||
[hidden],
|
||||
template {display:none}
|
||||
a {background:transparent}
|
||||
a:active,
|
||||
a:hover {outline:0}
|
||||
abbr[title] {border-bottom:1px dotted}
|
||||
b,
|
||||
strong {font-weight:bold}
|
||||
dfn {font-style:italic}
|
||||
h1 {font-size:2em;margin:0.67em 0}
|
||||
mark {background:#ff0;color:#000}
|
||||
small {font-size:80%}
|
||||
sub,
|
||||
sup {font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
||||
sup {top:-0.5em}
|
||||
sub {bottom:-0.25em}
|
||||
img {border:0}
|
||||
svg:not(:root) {overflow:hidden}
|
||||
figure {margin:1em 40px}
|
||||
hr {-moz-box-sizing:content-box;box-sizing:content-box;height:0}
|
||||
pre {overflow:auto}
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {font-family:monospace,monospace;font-size:1em}
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {color:inherit;font:inherit;margin:0}
|
||||
button {overflow:visible}
|
||||
button,
|
||||
select {text-transform:none}
|
||||
button,
|
||||
html input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"] {-webkit-appearance:button;cursor:pointer}
|
||||
button[disabled],
|
||||
html input[disabled] {cursor:default}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {border:0;padding:0}
|
||||
input {line-height:normal}
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {box-sizing:border-box;padding:0}
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {height:auto}
|
||||
input[type="search"] {-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {-webkit-appearance:none}
|
||||
fieldset {border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}
|
||||
legend {border:0;padding:0}
|
||||
textarea {overflow:auto}
|
||||
optgroup {font-weight:bold}
|
||||
table {border-collapse:collapse;border-spacing:0;table-layout:auto;word-wrap:break-word;word-break:break-all}
|
||||
td,
|
||||
th {padding:0}
|
||||
*,
|
||||
*:before,
|
||||
*:after {-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
||||
html {font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}
|
||||
body {font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:1.42857143;color:#333;background-color:#f9f9f9}
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {font-family:inherit;font-size:inherit;line-height:inherit}
|
||||
button,
|
||||
input,
|
||||
select[multiple],
|
||||
textarea {background-image:none}
|
||||
a {color:#0181b9;text-decoration:none}
|
||||
a:hover,
|
||||
a:focus {color:#001721;text-decoration:underline}
|
||||
a:focus {outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}
|
||||
img {vertical-align:middle}
|
||||
.img-responsive {display:block;max-width:100%;height:auto}
|
||||
.img-rounded {-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}
|
||||
.img-circle {border-radius:50%}
|
||||
hr {margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}
|
||||
.sr-only {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|
||||
@media print {* {text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important }a,a:visited {text-decoration:underline }a[href]:after {content:" (" attr(href) ")" }abbr[title]:after {content:" (" attr(title) ")" }a[href^="javascript:"]:after,a[href^="#"]:after {content:"" }pre,blockquote {border:1px solid #999;page-break-inside:avoid }thead {display:table-header-group }tr,img {page-break-inside:avoid }img {max-width:100% !important }p,h2,h3 {orphans:3;widows:3 }h2,h3 {page-break-after:avoid }select {background:#fff !important }.navbar {display:none }.table td,.table th {background-color:#fff !important }.btn >.caret,.dropup >.btn >.caret {border-top-color:#000 !important }.label {border:1px solid #000 }.table {border-collapse:collapse !important }.table-bordered th,.table-bordered td {border:1px solid #ddd !important }}
|
||||
.container {margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}
|
||||
@media (min-width:768px) {.container {width:750px }}
|
||||
@media (min-width:992px) {.container {width:970px }}
|
||||
@media (min-width:1200px) {.container {width:1170px }}
|
||||
.container-fluid {margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}
|
||||
.row {margin-left:-15px;margin-right:-15px}
|
||||
.row-flush {margin-left:0;margin-right:0}
|
||||
.row-flush [class*="col-"] {padding-left:0 !important;padding-right:0 !important}
|
||||
.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12 {position:relative;min-height:1px;padding-left:15px;padding-right:15px}
|
||||
.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12 {float:left}
|
||||
.col-xs-12 {width:100%}
|
||||
.col-xs-11 {width:91.66666667%}
|
||||
.col-xs-10 {width:83.33333333%}
|
||||
.col-xs-9 {width:75%}
|
||||
.col-xs-8 {width:66.66666667%}
|
||||
.col-xs-7 {width:58.33333333%}
|
||||
.col-xs-6 {width:50%}
|
||||
.col-xs-5 {width:41.66666667%}
|
||||
.col-xs-4 {width:33.33333333%}
|
||||
.col-xs-3 {width:25%}
|
||||
.col-xs-2 {width:16.66666667%}
|
||||
.col-xs-1 {width:8.33333333%}
|
||||
.col-xs-pull-12 {right:100%}
|
||||
.col-xs-pull-11 {right:91.66666667%}
|
||||
.col-xs-pull-10 {right:83.33333333%}
|
||||
.col-xs-pull-9 {right:75%}
|
||||
.col-xs-pull-8 {right:66.66666667%}
|
||||
.col-xs-pull-7 {right:58.33333333%}
|
||||
.col-xs-pull-6 {right:50%}
|
||||
.col-xs-pull-5 {right:41.66666667%}
|
||||
.col-xs-pull-4 {right:33.33333333%}
|
||||
.col-xs-pull-3 {right:25%}
|
||||
.col-xs-pull-2 {right:16.66666667%}
|
||||
.col-xs-pull-1 {right:8.33333333%}
|
||||
.col-xs-pull-0 {right:0%}
|
||||
.col-xs-push-12 {left:100%}
|
||||
.col-xs-push-11 {left:91.66666667%}
|
||||
.col-xs-push-10 {left:83.33333333%}
|
||||
.col-xs-push-9 {left:75%}
|
||||
.col-xs-push-8 {left:66.66666667%}
|
||||
.col-xs-push-7 {left:58.33333333%}
|
||||
.col-xs-push-6 {left:50%}
|
||||
.col-xs-push-5 {left:41.66666667%}
|
||||
.col-xs-push-4 {left:33.33333333%}
|
||||
.col-xs-push-3 {left:25%}
|
||||
.col-xs-push-2 {left:16.66666667%}
|
||||
.col-xs-push-1 {left:8.33333333%}
|
||||
.col-xs-push-0 {left:0%}
|
||||
.col-xs-offset-12 {margin-left:100%}
|
||||
.col-xs-offset-11 {margin-left:91.66666667%}
|
||||
.col-xs-offset-10 {margin-left:83.33333333%}
|
||||
.col-xs-offset-9 {margin-left:75%}
|
||||
.col-xs-offset-8 {margin-left:66.66666667%}
|
||||
.col-xs-offset-7 {margin-left:58.33333333%}
|
||||
.col-xs-offset-6 {margin-left:50%}
|
||||
.col-xs-offset-5 {margin-left:41.66666667%}
|
||||
.col-xs-offset-4 {margin-left:33.33333333%}
|
||||
.col-xs-offset-3 {margin-left:25%}
|
||||
.col-xs-offset-2 {margin-left:16.66666667%}
|
||||
.col-xs-offset-1 {margin-left:8.33333333%}
|
||||
.col-xs-offset-0 {margin-left:0%}
|
||||
@media (min-width:768px) {.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12 {float:left }.col-sm-12 {width:100% }.col-sm-11 {width:91.66666667% }.col-sm-10 {width:83.33333333% }.col-sm-9 {width:75% }.col-sm-8 {width:66.66666667% }.col-sm-7 {width:58.33333333% }.col-sm-6 {width:50% }.col-sm-5 {width:41.66666667% }.col-sm-4 {width:33.33333333% }.col-sm-3 {width:25% }.col-sm-2 {width:16.66666667% }.col-sm-1 {width:8.33333333% }.col-sm-pull-12 {right:100% }.col-sm-pull-11 {right:91.66666667% }.col-sm-pull-10 {right:83.33333333% }.col-sm-pull-9 {right:75% }.col-sm-pull-8 {right:66.66666667% }.col-sm-pull-7 {right:58.33333333% }.col-sm-pull-6 {right:50% }.col-sm-pull-5 {right:41.66666667% }.col-sm-pull-4 {right:33.33333333% }.col-sm-pull-3 {right:25% }.col-sm-pull-2 {right:16.66666667% }.col-sm-pull-1 {right:8.33333333% }.col-sm-pull-0 {right:0% }.col-sm-push-12 {left:100% }.col-sm-push-11 {left:91.66666667% }.col-sm-push-10 {left:83.33333333% }.col-sm-push-9 {left:75% }.col-sm-push-8 {left:66.66666667% }.col-sm-push-7 {left:58.33333333% }.col-sm-push-6 {left:50% }.col-sm-push-5 {left:41.66666667% }.col-sm-push-4 {left:33.33333333% }.col-sm-push-3 {left:25% }.col-sm-push-2 {left:16.66666667% }.col-sm-push-1 {left:8.33333333% }.col-sm-push-0 {left:0% }.col-sm-offset-12 {margin-left:100% }.col-sm-offset-11 {margin-left:91.66666667% }.col-sm-offset-10 {margin-left:83.33333333% }.col-sm-offset-9 {margin-left:75% }.col-sm-offset-8 {margin-left:66.66666667% }.col-sm-offset-7 {margin-left:58.33333333% }.col-sm-offset-6 {margin-left:50% }.col-sm-offset-5 {margin-left:41.66666667% }.col-sm-offset-4 {margin-left:33.33333333% }.col-sm-offset-3 {margin-left:25% }.col-sm-offset-2 {margin-left:16.66666667% }.col-sm-offset-1 {margin-left:8.33333333% }.col-sm-offset-0 {margin-left:0% }}
|
||||
@media (min-width:992px) {.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12 {float:left }.col-md-12 {width:100% }.col-md-11 {width:91.66666667% }.col-md-10 {width:83.33333333% }.col-md-9 {width:75% }.col-md-8 {width:66.66666667% }.col-md-7 {width:58.33333333% }.col-md-6 {width:50% }.col-md-5 {width:41.66666667% }.col-md-4 {width:33.33333333% }.col-md-3 {width:25% }.col-md-2 {width:16.66666667% }.col-md-1 {width:8.33333333% }.col-md-pull-12 {right:100% }.col-md-pull-11 {right:91.66666667% }.col-md-pull-10 {right:83.33333333% }.col-md-pull-9 {right:75% }.col-md-pull-8 {right:66.66666667% }.col-md-pull-7 {right:58.33333333% }.col-md-pull-6 {right:50% }.col-md-pull-5 {right:41.66666667% }.col-md-pull-4 {right:33.33333333% }.col-md-pull-3 {right:25% }.col-md-pull-2 {right:16.66666667% }.col-md-pull-1 {right:8.33333333% }.col-md-pull-0 {right:0% }.col-md-push-12 {left:100% }.col-md-push-11 {left:91.66666667% }.col-md-push-10 {left:83.33333333% }.col-md-push-9 {left:75% }.col-md-push-8 {left:66.66666667% }.col-md-push-7 {left:58.33333333% }.col-md-push-6 {left:50% }.col-md-push-5 {left:41.66666667% }.col-md-push-4 {left:33.33333333% }.col-md-push-3 {left:25% }.col-md-push-2 {left:16.66666667% }.col-md-push-1 {left:8.33333333% }.col-md-push-0 {left:0% }.col-md-offset-12 {margin-left:100% }.col-md-offset-11 {margin-left:91.66666667% }.col-md-offset-10 {margin-left:83.33333333% }.col-md-offset-9 {margin-left:75% }.col-md-offset-8 {margin-left:66.66666667% }.col-md-offset-7 {margin-left:58.33333333% }.col-md-offset-6 {margin-left:50% }.col-md-offset-5 {margin-left:41.66666667% }.col-md-offset-4 {margin-left:33.33333333% }.col-md-offset-3 {margin-left:25% }.col-md-offset-2 {margin-left:16.66666667% }.col-md-offset-1 {margin-left:8.33333333% }.col-md-offset-0 {margin-left:0% }}
|
||||
@media (min-width:1200px) {.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12 {float:left }.col-lg-12 {width:100% }.col-lg-11 {width:91.66666667% }.col-lg-10 {width:83.33333333% }.col-lg-9 {width:75% }.col-lg-8 {width:66.66666667% }.col-lg-7 {width:58.33333333% }.col-lg-6 {width:50% }.col-lg-5 {width:41.66666667% }.col-lg-4 {width:33.33333333% }.col-lg-3 {width:25% }.col-lg-2 {width:16.66666667% }.col-lg-1 {width:8.33333333% }.col-lg-pull-12 {right:100% }.col-lg-pull-11 {right:91.66666667% }.col-lg-pull-10 {right:83.33333333% }.col-lg-pull-9 {right:75% }.col-lg-pull-8 {right:66.66666667% }.col-lg-pull-7 {right:58.33333333% }.col-lg-pull-6 {right:50% }.col-lg-pull-5 {right:41.66666667% }.col-lg-pull-4 {right:33.33333333% }.col-lg-pull-3 {right:25% }.col-lg-pull-2 {right:16.66666667% }.col-lg-pull-1 {right:8.33333333% }.col-lg-pull-0 {right:0% }.col-lg-push-12 {left:100% }.col-lg-push-11 {left:91.66666667% }.col-lg-push-10 {left:83.33333333% }.col-lg-push-9 {left:75% }.col-lg-push-8 {left:66.66666667% }.col-lg-push-7 {left:58.33333333% }.col-lg-push-6 {left:50% }.col-lg-push-5 {left:41.66666667% }.col-lg-push-4 {left:33.33333333% }.col-lg-push-3 {left:25% }.col-lg-push-2 {left:16.66666667% }.col-lg-push-1 {left:8.33333333% }.col-lg-push-0 {left:0% }.col-lg-offset-12 {margin-left:100% }.col-lg-offset-11 {margin-left:91.66666667% }.col-lg-offset-10 {margin-left:83.33333333% }.col-lg-offset-9 {margin-left:75% }.col-lg-offset-8 {margin-left:66.66666667% }.col-lg-offset-7 {margin-left:58.33333333% }.col-lg-offset-6 {margin-left:50% }.col-lg-offset-5 {margin-left:41.66666667% }.col-lg-offset-4 {margin-left:33.33333333% }.col-lg-offset-3 {margin-left:25% }.col-lg-offset-2 {margin-left:16.66666667% }.col-lg-offset-1 {margin-left:8.33333333% }.col-lg-offset-0 {margin-left:0% }}
|
||||
.clearfix:before,
|
||||
.clearfix:after,
|
||||
.container:before,
|
||||
.container:after,
|
||||
.container-fluid:before,
|
||||
.container-fluid:after,
|
||||
.row:before,
|
||||
.row:after {content:" ";display:table}
|
||||
.clearfix:after,
|
||||
.container:after,
|
||||
.container-fluid:after,
|
||||
.row:after {clear:both}
|
||||
.center-block {display:block;margin-left:auto;margin-right:auto}
|
||||
.pull-right {float:right !important}
|
||||
.pull-left {float:left !important}
|
||||
.hide {display:none !important}
|
||||
.show {display:block !important}
|
||||
.invisible {visibility:hidden}
|
||||
.text-hide {font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}
|
||||
.hidden {display:none !important;visibility:hidden !important}
|
||||
.affix {position:fixed}
|
||||
@-ms-viewport {width:device-width}
|
||||
.visible-xs,
|
||||
.visible-sm,
|
||||
.visible-md,
|
||||
.visible-lg {display:none !important}
|
||||
@media (max-width:767px) {.visible-xs {display:block !important }table.visible-xs {display:table }tr.visible-xs {display:table-row !important }th.visible-xs,td.visible-xs {display:table-cell !important }}
|
||||
@media (min-width:768px) and (max-width:991px) {.visible-sm {display:block !important }table.visible-sm {display:table }tr.visible-sm {display:table-row !important }th.visible-sm,td.visible-sm {display:table-cell !important }}
|
||||
@media (min-width:992px) and (max-width:1199px) {.visible-md {display:block !important }table.visible-md {display:table }tr.visible-md {display:table-row !important }th.visible-md,td.visible-md {display:table-cell !important }}
|
||||
@media (min-width:1200px) {.visible-lg {display:block !important }table.visible-lg {display:table }tr.visible-lg {display:table-row !important }th.visible-lg,td.visible-lg {display:table-cell !important }}
|
||||
@media (max-width:767px) {.hidden-xs {display:none !important }}
|
||||
@media (min-width:768px) and (max-width:991px) {.hidden-sm {display:none !important }}
|
||||
@media (min-width:992px) and (max-width:1199px) {.hidden-md {display:none !important }}
|
||||
@media (min-width:1200px) {.hidden-lg {display:none !important }}
|
||||
.visible-print {display:none !important}
|
||||
@media print {.visible-print {display:block !important }table.visible-print {display:table }tr.visible-print {display:table-row !important }th.visible-print,td.visible-print {display:table-cell !important }}
|
||||
@media print {.hidden-print {display:none !important }}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {font-family:inherit;font-weight:400;line-height:1.1;color:inherit}
|
||||
h1 small,
|
||||
h2 small,
|
||||
h3 small,
|
||||
h4 small,
|
||||
h5 small,
|
||||
h6 small,
|
||||
.h1 small,
|
||||
.h2 small,
|
||||
.h3 small,
|
||||
.h4 small,
|
||||
.h5 small,
|
||||
.h6 small,
|
||||
h1 .small,
|
||||
h2 .small,
|
||||
h3 .small,
|
||||
h4 .small,
|
||||
h5 .small,
|
||||
h6 .small,
|
||||
.h1 .small,
|
||||
.h2 .small,
|
||||
.h3 .small,
|
||||
.h4 .small,
|
||||
.h5 .small,
|
||||
.h6 .small {font-weight:normal;line-height:1;color:#999}
|
||||
h1,
|
||||
.h1,
|
||||
h2,
|
||||
.h2,
|
||||
h3,
|
||||
.h3 {margin-top:20px;margin-bottom:10px}
|
||||
h1 small,
|
||||
.h1 small,
|
||||
h2 small,
|
||||
.h2 small,
|
||||
h3 small,
|
||||
.h3 small,
|
||||
h1 .small,
|
||||
.h1 .small,
|
||||
h2 .small,
|
||||
.h2 .small,
|
||||
h3 .small,
|
||||
.h3 .small {font-size:65%}
|
||||
h4,
|
||||
.h4,
|
||||
h5,
|
||||
.h5,
|
||||
h6,
|
||||
.h6 {margin-top:10px;margin-bottom:10px}
|
||||
h4 small,
|
||||
.h4 small,
|
||||
h5 small,
|
||||
.h5 small,
|
||||
h6 small,
|
||||
.h6 small,
|
||||
h4 .small,
|
||||
.h4 .small,
|
||||
h5 .small,
|
||||
.h5 .small,
|
||||
h6 .small,
|
||||
.h6 .small {font-size:75%}
|
||||
h1,
|
||||
.h1 {font-size:36px}
|
||||
h2,
|
||||
.h2 {font-size:30px}
|
||||
h3,
|
||||
.h3 {font-size:24px}
|
||||
h4,
|
||||
.h4 {font-size:18px}
|
||||
h5,
|
||||
.h5 {font-size:14px}
|
||||
h6,
|
||||
.h6 {font-size:12px}
|
||||
p {margin:0 0 10px}
|
||||
.lead {margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}
|
||||
@media (min-width:768px) {.lead {font-size:21px }}
|
||||
small,
|
||||
.small {font-size:85%}
|
||||
cite {font-style:normal}
|
||||
.text-left {text-align:left}
|
||||
.text-right {text-align:right}
|
||||
.text-center {text-align:center}
|
||||
.text-justify {text-align:justify}
|
||||
.text-muted {color:#999}
|
||||
.text-primary {color:#34495e}
|
||||
a.text-primary:hover {color:#222f3d}
|
||||
.text-success {color:#3c763d}
|
||||
a.text-success:hover {color:#2b542c}
|
||||
.text-info {color:#31708f}
|
||||
a.text-info:hover {color:#245269}
|
||||
.text-warning {color:#8a6d3b}
|
||||
a.text-warning:hover {color:#66512c}
|
||||
.text-danger {color:#a94442}
|
||||
a.text-danger:hover {color:#843534}
|
||||
.bg-primary {color:#fff;background-color:#34495e}
|
||||
a.bg-primary:hover {background-color:#222f3d}
|
||||
.bg-success {background-color:#dff0d8}
|
||||
a.bg-success:hover {background-color:#c1e2b3}
|
||||
.bg-info {background-color:#d9edf7}
|
||||
a.bg-info:hover {background-color:#afd9ee}
|
||||
.bg-warning {background-color:#fcf8e3}
|
||||
a.bg-warning:hover {background-color:#f7ecb5}
|
||||
.bg-danger {background-color:#f2dede}
|
||||
a.bg-danger:hover {background-color:#e4b9b9}
|
||||
.page-header {padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}
|
||||
ul,
|
||||
ol {margin-top:0;margin-bottom:10px}
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol,
|
||||
ol ol {margin-bottom:0}
|
||||
.list-unstyled {padding-left:0;list-style:none}
|
||||
.list-inline {padding-left:0;list-style:none;margin-left:-5px}
|
||||
.list-inline >li {display:inline-block;padding-left:5px;padding-right:5px}
|
||||
dl {margin-top:0;margin-bottom:20px}
|
||||
dt,
|
||||
dd {line-height:1.42857143}
|
||||
dt {font-weight:bold}
|
||||
dd {margin-left:0}
|
||||
@media (min-width:768px) {.dl-horizontal dt {float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap }.dl-horizontal dd {margin-left:180px }}
|
||||
abbr[title],
|
||||
abbr[data-original-title] {cursor:help;border-bottom:1px dotted #999}
|
||||
.initialism {font-size:90%;text-transform:uppercase}
|
||||
blockquote {padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}
|
||||
blockquote p:last-child,
|
||||
blockquote ul:last-child,
|
||||
blockquote ol:last-child {margin-bottom:0}
|
||||
blockquote footer,
|
||||
blockquote small,
|
||||
blockquote .small {display:block;font-size:80%;line-height:1.42857143;color:#999}
|
||||
blockquote footer:before,
|
||||
blockquote small:before,
|
||||
blockquote .small:before {content:'\2014 \00A0'}
|
||||
.blockquote-reverse,
|
||||
blockquote.pull-right {padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}
|
||||
.blockquote-reverse footer:before,
|
||||
blockquote.pull-right footer:before,
|
||||
.blockquote-reverse small:before,
|
||||
blockquote.pull-right small:before,
|
||||
.blockquote-reverse .small:before,
|
||||
blockquote.pull-right .small:before {content:''}
|
||||
.blockquote-reverse footer:after,
|
||||
blockquote.pull-right footer:after,
|
||||
.blockquote-reverse small:after,
|
||||
blockquote.pull-right small:after,
|
||||
.blockquote-reverse .small:after,
|
||||
blockquote.pull-right .small:after {content:'\00A0 \2014'}
|
||||
blockquote:before,
|
||||
blockquote:after {content:""}
|
||||
address {margin-bottom:20px;font-style:normal;line-height:1.42857143}
|
||||
|
||||
.oc-icon-chain:before,
|
||||
.icon-chain:before,
|
||||
|
||||
.oc-icon-chain-broken:before,
|
||||
.icon-chain-broken:before {content:"\f127"}
|
||||
|
||||
.close {float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;font-family:sans-serif;opacity:0.2;filter:alpha(opacity=20)}
|
||||
.close:hover,
|
||||
.close:focus {color:#000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}
|
||||
button.close {padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}
|
||||
@font-face {font-family:'FontAwesome';src:url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.eot?v=1.0.1');src:url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=1.0.1') format('embedded-opentype'),url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.woff?v=1.0.1') format('woff'),url('../ui/font/fontawesome-webfont.ttf?v=1.0.1') format('truetype'),url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.svg#fontawesomeregular?v=1.0.1') format('svg');font-weight:normal;font-style:normal}
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0}
|
||||
[class^="icon-"]:before,
|
||||
[class*=" icon-"]:before {text-decoration:inherit;display:inline-block;speak:none}
|
||||
[class^="icon-"].pull-left,
|
||||
[class*=" icon-"].pull-left {margin-right:.3em}
|
||||
[class^="icon-"].pull-right,
|
||||
[class*=" icon-"].pull-right {margin-left:.3em}
|
||||
[class^="oc-icon-"]:before,
|
||||
[class*=" oc-icon-"]:before {display:inline-block;margin-right:8px;font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;vertical-align:baseline}
|
||||
[class^="oc-icon-"].empty:before,
|
||||
[class*=" oc-icon-"].empty:before {margin-right:0}
|
||||
.icon-lg {font-size:1.33333333em;line-height:0.75em;vertical-align:-15%}
|
||||
.icon-2x {font-size:2em}
|
||||
.icon-3x {font-size:3em}
|
||||
.icon-4x {font-size:4em}
|
||||
.icon-5x {font-size:5em}
|
||||
body {padding-top:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";background:#f3f3f3;color:#405261}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5 {font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-transform:uppercase}
|
||||
h1 {font-weight:300;font-size:50px;margin-bottom:15px}
|
||||
h1 i[class^="icon-"]:before {font-size:46px}
|
||||
i[class^="icon-"].warning {color:#c84530}
|
||||
h3 {font-size:24px;font-weight:300}
|
||||
p.lead {font-size:16px;font-weight:300}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1><i class="icon-chain-broken warning"></i> Page not found</h1>
|
||||
<p class="lead">The requested page cannot be found.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
moo.fx, simple effects library built with prototype.js (http://prototype.conio.net).
|
||||
by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE.
|
||||
for more info (http://moofx.mad4milk.net).
|
||||
Friday, February 24, 2006
|
||||
v 1.2.2
|
||||
*/
|
||||
|
||||
var fx = new Object();
|
||||
//base
|
||||
fx.Base = function(){};
|
||||
fx.Base.prototype = {
|
||||
setOptions: function(options) {
|
||||
this.options = {
|
||||
duration: 500,
|
||||
onComplete: '',
|
||||
transition: fx.sinoidal
|
||||
}
|
||||
Object.extend(this.options, options || {});
|
||||
},
|
||||
|
||||
go: function() {
|
||||
this.startTime = (new Date).getTime();
|
||||
this.timer = setInterval (this.step.bind(this), 13);
|
||||
},
|
||||
|
||||
step: function() {
|
||||
var time = (new Date).getTime();
|
||||
if (time >= this.options.duration+this.startTime) {
|
||||
this.now = this.to;
|
||||
clearInterval (this.timer);
|
||||
this.timer = null;
|
||||
if (this.options.onComplete) setTimeout(this.options.onComplete.bind(this), 10);
|
||||
}
|
||||
else {
|
||||
var Tpos = (time - this.startTime) / (this.options.duration);
|
||||
this.now = this.options.transition(Tpos) * (this.to-this.from) + this.from;
|
||||
}
|
||||
this.increase();
|
||||
},
|
||||
|
||||
custom: function(from, to) {
|
||||
if (this.timer != null) return;
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
this.go();
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
this.now = 0;
|
||||
this.increase();
|
||||
},
|
||||
|
||||
clearTimer: function() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
//stretchers
|
||||
fx.Layout = Class.create();
|
||||
fx.Layout.prototype = Object.extend(new fx.Base(), {
|
||||
initialize: function(el, options) {
|
||||
this.el = $(el);
|
||||
this.el.style.overflow = "hidden";
|
||||
this.el.iniWidth = this.el.offsetWidth;
|
||||
this.el.iniHeight = this.el.offsetHeight;
|
||||
this.setOptions(options);
|
||||
}
|
||||
});
|
||||
|
||||
fx.Height = Class.create();
|
||||
Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), {
|
||||
increase: function() {
|
||||
this.el.style.height = this.now + "px";
|
||||
},
|
||||
|
||||
toggle: function() {
|
||||
if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0);
|
||||
else this.custom(0, this.el.scrollHeight);
|
||||
}
|
||||
});
|
||||
|
||||
fx.Width = Class.create();
|
||||
Object.extend(Object.extend(fx.Width.prototype, fx.Layout.prototype), {
|
||||
increase: function() {
|
||||
this.el.style.width = this.now + "px";
|
||||
},
|
||||
|
||||
toggle: function(){
|
||||
if (this.el.offsetWidth > 0) this.custom(this.el.offsetWidth, 0);
|
||||
else this.custom(0, this.el.iniWidth);
|
||||
}
|
||||
});
|
||||
|
||||
//fader
|
||||
fx.Opacity = Class.create();
|
||||
fx.Opacity.prototype = Object.extend(new fx.Base(), {
|
||||
initialize: function(el, options) {
|
||||
this.el = $(el);
|
||||
this.now = 1;
|
||||
this.increase();
|
||||
this.setOptions(options);
|
||||
},
|
||||
|
||||
increase: function() {
|
||||
if (this.now == 1 && (/Firefox/.test(navigator.userAgent))) this.now = 0.9999;
|
||||
this.setOpacity(this.now);
|
||||
},
|
||||
|
||||
setOpacity: function(opacity) {
|
||||
if (opacity == 0) this.el.style.visibility = "hidden";
|
||||
else this.el.style.visibility = "visible";
|
||||
if (window.ActiveXObject) this.el.style.filter = "alpha(opacity=" + opacity*100 + ")";
|
||||
this.el.style.opacity = opacity;
|
||||
},
|
||||
|
||||
toggle: function() {
|
||||
if (this.now > 0) this.custom(1, 0);
|
||||
else this.custom(0, 1);
|
||||
}
|
||||
});
|
||||
|
||||
//transitions
|
||||
fx.sinoidal = function(pos){
|
||||
return ((-Math.cos(pos*Math.PI)/2) + 0.5);
|
||||
//this transition is from script.aculo.us
|
||||
}
|
||||
fx.linear = function(pos){
|
||||
return pos;
|
||||
}
|
||||
fx.cubic = function(pos){
|
||||
return Math.pow(pos, 3);
|
||||
}
|
||||
fx.circ = function(pos){
|
||||
return Math.sqrt(pos);
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
/*
|
||||
moo.fx pack, effects extensions for moo.fx.
|
||||
by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE
|
||||
for more info visit (http://moofx.mad4milk.net).
|
||||
Friday, February 24, 2006
|
||||
v 1.2.2
|
||||
*/
|
||||
|
||||
//smooth scroll
|
||||
fx.Scroll = Class.create();
|
||||
fx.Scroll.prototype = Object.extend(new fx.Base(), {
|
||||
initialize: function(options) {
|
||||
this.setOptions(options);
|
||||
},
|
||||
|
||||
scrollTo: function(el){
|
||||
var dest = Position.cumulativeOffset($(el))[1];
|
||||
var client = window.innerHeight || document.documentElement.clientHeight;
|
||||
var full = document.documentElement.scrollHeight;
|
||||
var top = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (dest+client > full) this.custom(top, dest - client + (full-dest));
|
||||
else this.custom(top, dest);
|
||||
},
|
||||
|
||||
increase: function(){
|
||||
window.scrollTo(0, this.now);
|
||||
}
|
||||
});
|
||||
|
||||
//text size modify, now works with pixels too.
|
||||
fx.Text = Class.create();
|
||||
fx.Text.prototype = Object.extend(new fx.Base(), {
|
||||
initialize: function(el, options) {
|
||||
this.el = $(el);
|
||||
this.setOptions(options);
|
||||
if (!this.options.unit) this.options.unit = "em";
|
||||
},
|
||||
|
||||
increase: function() {
|
||||
this.el.style.fontSize = this.now + this.options.unit;
|
||||
}
|
||||
});
|
||||
|
||||
//composition effect: widht/height/opacity
|
||||
fx.Combo = Class.create();
|
||||
fx.Combo.prototype = {
|
||||
setOptions: function(options) {
|
||||
this.options = {
|
||||
opacity: true,
|
||||
height: true,
|
||||
width: false
|
||||
}
|
||||
Object.extend(this.options, options || {});
|
||||
},
|
||||
|
||||
initialize: function(el, options) {
|
||||
this.el = $(el);
|
||||
this.setOptions(options);
|
||||
if (this.options.opacity) {
|
||||
this.el.o = new fx.Opacity(el, options);
|
||||
options.onComplete = null;
|
||||
}
|
||||
if (this.options.height) {
|
||||
this.el.h = new fx.Height(el, options);
|
||||
options.onComplete = null;
|
||||
}
|
||||
if (this.options.width) this.el.w = new fx.Width(el, options);
|
||||
},
|
||||
|
||||
toggle: function() { this.checkExec('toggle'); },
|
||||
|
||||
hide: function(){ this.checkExec('hide'); },
|
||||
|
||||
clearTimer: function(){ this.checkExec('clearTimer'); },
|
||||
|
||||
checkExec: function(func){
|
||||
if (this.el.o) this.el.o[func]();
|
||||
if (this.el.h) this.el.h[func]();
|
||||
if (this.el.w) this.el.w[func]();
|
||||
},
|
||||
|
||||
//only if width+height
|
||||
resizeTo: function(hto, wto) {
|
||||
if (this.el.h && this.el.w) {
|
||||
this.el.h.custom(this.el.offsetHeight, this.el.offsetHeight + hto);
|
||||
this.el.w.custom(this.el.offsetWidth, this.el.offsetWidth + wto);
|
||||
}
|
||||
},
|
||||
|
||||
customSize: function(hto, wto) {
|
||||
if (this.el.h && this.el.w) {
|
||||
this.el.h.custom(this.el.offsetHeight, hto);
|
||||
this.el.w.custom(this.el.offsetWidth, wto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fx.Accordion = Class.create();
|
||||
fx.Accordion.prototype = {
|
||||
setOptions: function(options) {
|
||||
this.options = {
|
||||
delay: 100,
|
||||
opacity: false
|
||||
}
|
||||
Object.extend(this.options, options || {});
|
||||
},
|
||||
|
||||
initialize: function(togglers, elements, options) {
|
||||
this.elements = elements;
|
||||
this.setOptions(options);
|
||||
var options = options || '';
|
||||
elements.each(function(el, i){
|
||||
options.onComplete = function(){
|
||||
if (el.offsetHeight > 0) el.style.height = '1%';
|
||||
}
|
||||
el.fx = new fx.Combo(el, options);
|
||||
el.fx.hide();
|
||||
});
|
||||
|
||||
togglers.each(function(tog, i){
|
||||
tog.onclick = function(){
|
||||
this.showThisHideOpen(elements[i]);
|
||||
}.bind(this);
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
showThisHideOpen: function(toShow){
|
||||
if (toShow.offsetHeight == 0) setTimeout(function(){this.clearAndToggle(toShow);}.bind(this), this.options.delay);
|
||||
this.elements.each(function(el, i){
|
||||
if (el.offsetHeight > 0 && el != toShow) this.clearAndToggle(el);
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
clearAndToggle: function(el){
|
||||
el.fx.clearTimer();
|
||||
el.fx.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
var Remember = new Object();
|
||||
Remember = function(){};
|
||||
Remember.prototype = {
|
||||
initialize: function(el, options){
|
||||
this.el = $(el);
|
||||
this.days = 365;
|
||||
this.options = options;
|
||||
this.effect();
|
||||
var cookie = this.readCookie();
|
||||
if (cookie) {
|
||||
this.fx.now = cookie;
|
||||
this.fx.increase();
|
||||
}
|
||||
},
|
||||
|
||||
//cookie functions based on code by Peter-Paul Koch
|
||||
setCookie: function(value) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(this.days*24*60*60*1000));
|
||||
var expires = "; expires="+date.toGMTString();
|
||||
document.cookie = this.el+this.el.id+this.prefix+"="+value+expires+"; path=/";
|
||||
},
|
||||
|
||||
readCookie: function() {
|
||||
var nameEQ = this.el+this.el.id+this.prefix + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;c=ca[i];i++) {
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
custom: function(from, to){
|
||||
if (this.fx.now != to) {
|
||||
this.setCookie(to);
|
||||
this.fx.custom(from, to);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fx.RememberHeight = Class.create();
|
||||
fx.RememberHeight.prototype = Object.extend(new Remember(), {
|
||||
effect: function(){
|
||||
this.fx = new fx.Height(this.el, this.options);
|
||||
this.prefix = 'height';
|
||||
},
|
||||
|
||||
toggle: function(){
|
||||
if (this.el.offsetHeight == 0) this.setCookie(this.el.scrollHeight);
|
||||
else this.setCookie(0);
|
||||
this.fx.toggle();
|
||||
},
|
||||
|
||||
resize: function(to){
|
||||
this.setCookie(this.el.offsetHeight+to);
|
||||
this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to);
|
||||
},
|
||||
|
||||
hide: function(){
|
||||
if (!this.readCookie()) {
|
||||
this.fx.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
fx.RememberText = Class.create();
|
||||
fx.RememberText.prototype = Object.extend(new Remember(), {
|
||||
effect: function(){
|
||||
this.fx = new fx.Text(this.el, this.options);
|
||||
this.prefix = 'text';
|
||||
}
|
||||
});
|
||||
|
||||
//useful for-replacement
|
||||
Array.prototype.each = function(func){
|
||||
for(var i=0;ob=this[i];i++) func(ob, i);
|
||||
}
|
||||
|
||||
//Easing Equations (c) 2003 Robert Penner, all rights reserved.
|
||||
//This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html.
|
||||
|
||||
//expo
|
||||
fx.expoIn = function(pos){
|
||||
return Math.pow(2, 10 * (pos - 1));
|
||||
}
|
||||
fx.expoOut = function(pos){
|
||||
return (-Math.pow(2, -10 * pos) + 1);
|
||||
}
|
||||
|
||||
//quad
|
||||
fx.quadIn = function(pos){
|
||||
return Math.pow(pos, 2);
|
||||
}
|
||||
fx.quadOut = function(pos){
|
||||
return -(pos)*(pos-2);
|
||||
}
|
||||
|
||||
//circ
|
||||
fx.circOut = function(pos){
|
||||
return Math.sqrt(1 - Math.pow(pos-1,2));
|
||||
}
|
||||
fx.circIn = function(pos){
|
||||
return -(Math.sqrt(1 - Math.pow(pos, 2)) - 1);
|
||||
}
|
||||
|
||||
//back
|
||||
fx.backIn = function(pos){
|
||||
return (pos)*pos*((2.7)*pos - 1.7);
|
||||
}
|
||||
fx.backOut = function(pos){
|
||||
return ((pos-1)*(pos-1)*((2.7)*(pos-1) + 1.7) + 1);
|
||||
}
|
||||
|
||||
//sine
|
||||
fx.sineOut = function(pos){
|
||||
return Math.sin(pos * (Math.PI/2));
|
||||
}
|
||||
fx.sineIn = function(pos){
|
||||
return -Math.cos(pos * (Math.PI/2)) + 1;
|
||||
}
|
||||
fx.sineInOut = function(pos){
|
||||
return -(Math.cos(Math.PI*pos) - 1)/2;
|
||||
}
|
||||
Vendored
+131
@@ -0,0 +1,131 @@
|
||||
/* Prototype JavaScript framework
|
||||
* (c) 2005 Sam Stephenson <sam@conio.net>
|
||||
* Prototype is freely distributable under the terms of an MIT-style license.
|
||||
* For details, see the Prototype web site: http://prototype.conio.net/
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
//note: modified & stripped down version of prototype, to be used with moo.fx by mad4milk (http://moofx.mad4milk.net).
|
||||
|
||||
var Class = {
|
||||
create: function() {
|
||||
return function() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Object.extend = function(destination, source) {
|
||||
for (property in source) destination[property] = source[property];
|
||||
return destination;
|
||||
}
|
||||
|
||||
Function.prototype.bind = function(object) {
|
||||
var __method = this;
|
||||
return function() {
|
||||
return __method.apply(object, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
Function.prototype.bindAsEventListener = function(object) {
|
||||
var __method = this;
|
||||
return function(event) {
|
||||
__method.call(object, event || window.event);
|
||||
}
|
||||
}
|
||||
|
||||
function $() {
|
||||
if (arguments.length == 1) return get$(arguments[0]);
|
||||
var elements = [];
|
||||
$c(arguments).each(function(el){
|
||||
elements.push(get$(el));
|
||||
});
|
||||
return elements;
|
||||
|
||||
function get$(el){
|
||||
if (typeof el == 'string') el = document.getElementById(el);
|
||||
return el;
|
||||
}
|
||||
}
|
||||
|
||||
if (!window.Element) var Element = new Object();
|
||||
|
||||
Object.extend(Element, {
|
||||
remove: function(element) {
|
||||
element = $(element);
|
||||
element.parentNode.removeChild(element);
|
||||
},
|
||||
|
||||
hasClassName: function(element, className) {
|
||||
element = $(element);
|
||||
if (!element) return;
|
||||
var hasClass = false;
|
||||
element.className.split(' ').each(function(cn){
|
||||
if (cn == className) hasClass = true;
|
||||
});
|
||||
return hasClass;
|
||||
},
|
||||
|
||||
addClassName: function(element, className) {
|
||||
element = $(element);
|
||||
Element.removeClassName(element, className);
|
||||
element.className += ' ' + className;
|
||||
},
|
||||
|
||||
removeClassName: function(element, className) {
|
||||
element = $(element);
|
||||
if (!element) return;
|
||||
var newClassName = '';
|
||||
element.className.split(' ').each(function(cn, i){
|
||||
if (cn != className){
|
||||
if (i > 0) newClassName += ' ';
|
||||
newClassName += cn;
|
||||
}
|
||||
});
|
||||
element.className = newClassName;
|
||||
},
|
||||
|
||||
cleanWhitespace: function(element) {
|
||||
element = $(element);
|
||||
$c(element.childNodes).each(function(node){
|
||||
if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) Element.remove(node);
|
||||
});
|
||||
},
|
||||
|
||||
find: function(element, what) {
|
||||
element = $(element)[what];
|
||||
while (element.nodeType != 1) element = element[what];
|
||||
return element;
|
||||
}
|
||||
});
|
||||
|
||||
var Position = {
|
||||
cumulativeOffset: function(element) {
|
||||
var valueT = 0, valueL = 0;
|
||||
do {
|
||||
valueT += element.offsetTop || 0;
|
||||
valueL += element.offsetLeft || 0;
|
||||
element = element.offsetParent;
|
||||
} while (element);
|
||||
return [valueL, valueT];
|
||||
}
|
||||
};
|
||||
|
||||
document.getElementsByClassName = function(className) {
|
||||
var children = document.getElementsByTagName('*') || document.all;
|
||||
var elements = [];
|
||||
$c(children).each(function(child){
|
||||
if (Element.hasClassName(child, className)) elements.push(child);
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
|
||||
//useful array functions
|
||||
Array.prototype.each = function(func){
|
||||
for(var i=0;ob=this[i];i++) func(ob, i);
|
||||
}
|
||||
|
||||
function $c(array){
|
||||
var nArray = [];
|
||||
for (i=0;el=array[i];i++) nArray.push(el);
|
||||
return nArray;
|
||||
}
|
||||
@@ -0,0 +1,669 @@
|
||||
/*! SWFObject v2.0 <http://code.google.com/p/swfobject/>
|
||||
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
|
||||
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
||||
*/
|
||||
|
||||
var swfobject = function() {
|
||||
|
||||
var UNDEF = "undefined",
|
||||
OBJECT = "object",
|
||||
SHOCKWAVE_FLASH = "Shockwave Flash",
|
||||
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
|
||||
FLASH_MIME_TYPE = "application/x-shockwave-flash",
|
||||
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
|
||||
|
||||
win = window,
|
||||
doc = document,
|
||||
nav = navigator,
|
||||
|
||||
domLoadFnArr = [],
|
||||
regObjArr = [],
|
||||
timer = null,
|
||||
storedAltContent = null,
|
||||
storedAltContentId = null,
|
||||
isDomLoaded = false,
|
||||
isExpressInstallActive = false;
|
||||
|
||||
/* Centralized function for browser feature detection
|
||||
- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
|
||||
- User agent string detection is only used when no alternative is possible
|
||||
- Is executed directly for optimal performance
|
||||
*/
|
||||
var ua = function() {
|
||||
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,
|
||||
playerVersion = [0,0,0],
|
||||
d = null;
|
||||
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
|
||||
d = nav.plugins[SHOCKWAVE_FLASH].description;
|
||||
if (d) {
|
||||
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
|
||||
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
|
||||
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
|
||||
playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
|
||||
}
|
||||
}
|
||||
else if (typeof win.ActiveXObject != UNDEF) {
|
||||
var a = null, fp6Crash = false;
|
||||
try {
|
||||
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
|
||||
}
|
||||
catch(e) {
|
||||
try {
|
||||
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
|
||||
playerVersion = [6,0,21];
|
||||
a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
|
||||
}
|
||||
catch(e) {
|
||||
if (playerVersion[0] == 6) {
|
||||
fp6Crash = true;
|
||||
}
|
||||
}
|
||||
if (!fp6Crash) {
|
||||
try {
|
||||
a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
}
|
||||
if (!fp6Crash && a) { // a will return null when ActiveX is disabled
|
||||
try {
|
||||
d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
|
||||
if (d) {
|
||||
d = d.split(" ")[1].split(",");
|
||||
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
|
||||
}
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
}
|
||||
var u = nav.userAgent.toLowerCase(),
|
||||
p = nav.platform.toLowerCase(),
|
||||
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
|
||||
ie = false,
|
||||
windows = p ? /win/.test(p) : /win/.test(u),
|
||||
mac = p ? /mac/.test(p) : /mac/.test(u);
|
||||
/*@cc_on
|
||||
ie = true;
|
||||
@if (@_win32)
|
||||
windows = true;
|
||||
@elif (@_mac)
|
||||
mac = true;
|
||||
@end
|
||||
@*/
|
||||
return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
|
||||
}();
|
||||
|
||||
/* Cross-browser onDomLoad
|
||||
- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
|
||||
- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
|
||||
*/
|
||||
var onDomLoad = function() {
|
||||
if (!ua.w3cdom) {
|
||||
return;
|
||||
}
|
||||
addDomLoadEvent(main);
|
||||
if (ua.ie && ua.win) {
|
||||
try { // Avoid a possible Operation Aborted error
|
||||
doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
|
||||
var s = getElementById("__ie_ondomload");
|
||||
if (s) {
|
||||
s.onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
this.parentNode.removeChild(this);
|
||||
callDomLoadFunctions();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
if (ua.webkit && typeof doc.readyState != UNDEF) {
|
||||
timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
|
||||
}
|
||||
if (typeof doc.addEventListener != UNDEF) {
|
||||
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
|
||||
}
|
||||
addLoadEvent(callDomLoadFunctions);
|
||||
}();
|
||||
|
||||
function callDomLoadFunctions() {
|
||||
if (isDomLoaded) {
|
||||
return;
|
||||
}
|
||||
if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
|
||||
var s = createElement("span");
|
||||
try { // Avoid a possible Operation Aborted error
|
||||
var t = doc.getElementsByTagName("body")[0].appendChild(s);
|
||||
t.parentNode.removeChild(t);
|
||||
}
|
||||
catch (e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
isDomLoaded = true;
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
var dl = domLoadFnArr.length;
|
||||
for (var i = 0; i < dl; i++) {
|
||||
domLoadFnArr[i]();
|
||||
}
|
||||
}
|
||||
|
||||
function addDomLoadEvent(fn) {
|
||||
if (isDomLoaded) {
|
||||
fn();
|
||||
}
|
||||
else {
|
||||
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
|
||||
}
|
||||
}
|
||||
|
||||
/* Cross-browser onload
|
||||
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
|
||||
- Will fire an event as soon as a web page including all of its assets are loaded
|
||||
*/
|
||||
function addLoadEvent(fn) {
|
||||
if (typeof win.addEventListener != UNDEF) {
|
||||
win.addEventListener("load", fn, false);
|
||||
}
|
||||
else if (typeof doc.addEventListener != UNDEF) {
|
||||
doc.addEventListener("load", fn, false);
|
||||
}
|
||||
else if (typeof win.attachEvent != UNDEF) {
|
||||
win.attachEvent("onload", fn);
|
||||
}
|
||||
else if (typeof win.onload == "function") {
|
||||
var fnOld = win.onload;
|
||||
win.onload = function() {
|
||||
fnOld();
|
||||
fn();
|
||||
};
|
||||
}
|
||||
else {
|
||||
win.onload = fn;
|
||||
}
|
||||
}
|
||||
|
||||
/* Main function
|
||||
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
|
||||
*/
|
||||
function main() { // Static publishing only
|
||||
var rl = regObjArr.length;
|
||||
for (var i = 0; i < rl; i++) { // For each registered object element
|
||||
var id = regObjArr[i].id;
|
||||
if (ua.pv[0] > 0) {
|
||||
var obj = getElementById(id);
|
||||
if (obj) {
|
||||
regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
|
||||
regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
|
||||
if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
|
||||
if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
|
||||
fixParams(obj);
|
||||
}
|
||||
setVisibility(id, true);
|
||||
}
|
||||
else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
|
||||
showExpressInstall(regObjArr[i]);
|
||||
}
|
||||
else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
|
||||
displayAltContent(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // If no fp is installed, we let the object element do its job (show alternative content)
|
||||
setVisibility(id, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix nested param elements, which are ignored by older webkit engines
|
||||
- This includes Safari up to and including version 1.2.2 on Mac OS 10.3
|
||||
- Fall back to the proprietary embed element
|
||||
*/
|
||||
function fixParams(obj) {
|
||||
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
|
||||
if (nestedObj) {
|
||||
var e = createElement("embed"), a = nestedObj.attributes;
|
||||
if (a) {
|
||||
var al = a.length;
|
||||
for (var i = 0; i < al; i++) {
|
||||
if (a[i].nodeName.toLowerCase() == "data") {
|
||||
e.setAttribute("src", a[i].nodeValue);
|
||||
}
|
||||
else {
|
||||
e.setAttribute(a[i].nodeName, a[i].nodeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
var c = nestedObj.childNodes;
|
||||
if (c) {
|
||||
var cl = c.length;
|
||||
for (var j = 0; j < cl; j++) {
|
||||
if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") {
|
||||
e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.parentNode.replaceChild(e, obj);
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix hanging audio/video threads and force open sockets and NetConnections to disconnect
|
||||
- Occurs when unloading a web page in IE using fp8+ and innerHTML/outerHTML
|
||||
- Dynamic publishing only
|
||||
*/
|
||||
function fixObjectLeaks(id) {
|
||||
if (ua.ie && ua.win && hasPlayerVersion("8.0.0")) {
|
||||
win.attachEvent("onunload", function () {
|
||||
var obj = getElementById(id);
|
||||
if (obj) {
|
||||
for (var i in obj) {
|
||||
if (typeof obj[i] == "function") {
|
||||
obj[i] = function() {};
|
||||
}
|
||||
}
|
||||
obj.parentNode.removeChild(obj);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Show the Adobe Express Install dialog
|
||||
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
|
||||
*/
|
||||
function showExpressInstall(regObj) {
|
||||
isExpressInstallActive = true;
|
||||
var obj = getElementById(regObj.id);
|
||||
if (obj) {
|
||||
if (regObj.altContentId) {
|
||||
var ac = getElementById(regObj.altContentId);
|
||||
if (ac) {
|
||||
storedAltContent = ac;
|
||||
storedAltContentId = regObj.altContentId;
|
||||
}
|
||||
}
|
||||
else {
|
||||
storedAltContent = abstractAltContent(obj);
|
||||
}
|
||||
if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
|
||||
regObj.width = "310";
|
||||
}
|
||||
if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
|
||||
regObj.height = "137";
|
||||
}
|
||||
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
|
||||
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
|
||||
dt = doc.title,
|
||||
fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
|
||||
replaceId = regObj.id;
|
||||
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
|
||||
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
|
||||
if (ua.ie && ua.win && obj.readyState != 4) {
|
||||
var newObj = createElement("div");
|
||||
replaceId += "SWFObjectNew";
|
||||
newObj.setAttribute("id", replaceId);
|
||||
obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
|
||||
obj.style.display = "none";
|
||||
win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
|
||||
}
|
||||
createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
|
||||
}
|
||||
}
|
||||
|
||||
/* Functions to abstract and display alternative content
|
||||
*/
|
||||
function displayAltContent(obj) {
|
||||
if (ua.ie && ua.win && obj.readyState != 4) {
|
||||
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
|
||||
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
|
||||
var el = createElement("div");
|
||||
obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
|
||||
el.parentNode.replaceChild(abstractAltContent(obj), el);
|
||||
obj.style.display = "none";
|
||||
win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
|
||||
}
|
||||
else {
|
||||
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
|
||||
}
|
||||
}
|
||||
|
||||
function abstractAltContent(obj) {
|
||||
var ac = createElement("div");
|
||||
if (ua.win && ua.ie) {
|
||||
ac.innerHTML = obj.innerHTML;
|
||||
}
|
||||
else {
|
||||
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
|
||||
if (nestedObj) {
|
||||
var c = nestedObj.childNodes;
|
||||
if (c) {
|
||||
var cl = c.length;
|
||||
for (var i = 0; i < cl; i++) {
|
||||
if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) {
|
||||
ac.appendChild(c[i].cloneNode(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ac;
|
||||
}
|
||||
|
||||
/* Cross-browser dynamic SWF creation
|
||||
*/
|
||||
function createSWF(attObj, parObj, id) {
|
||||
var r, el = getElementById(id);
|
||||
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
|
||||
attObj.id = id;
|
||||
}
|
||||
if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
|
||||
var att = "";
|
||||
for (var i in attObj) {
|
||||
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
|
||||
if (i == "data") {
|
||||
parObj.movie = attObj[i];
|
||||
}
|
||||
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
|
||||
att += ' class="' + attObj[i] + '"';
|
||||
}
|
||||
else if (i != "classid") {
|
||||
att += ' ' + i + '="' + attObj[i] + '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
var par = "";
|
||||
for (var j in parObj) {
|
||||
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
|
||||
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
|
||||
}
|
||||
}
|
||||
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
|
||||
fixObjectLeaks(attObj.id); // This bug affects dynamic publishing only
|
||||
r = getElementById(attObj.id);
|
||||
}
|
||||
else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
|
||||
var e = createElement("embed");
|
||||
e.setAttribute("type", FLASH_MIME_TYPE);
|
||||
for (var k in attObj) {
|
||||
if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
|
||||
if (k == "data") {
|
||||
e.setAttribute("src", attObj[k]);
|
||||
}
|
||||
else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
|
||||
e.setAttribute("class", attObj[k]);
|
||||
}
|
||||
else if (k != "classid") { // Filter out IE specific attribute
|
||||
e.setAttribute(k, attObj[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var l in parObj) {
|
||||
if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
|
||||
if (l != "movie") { // Filter out IE specific param element
|
||||
e.setAttribute(l, parObj[l]);
|
||||
}
|
||||
}
|
||||
}
|
||||
el.parentNode.replaceChild(e, el);
|
||||
r = e;
|
||||
}
|
||||
else { // Well-behaving browsers
|
||||
var o = createElement(OBJECT);
|
||||
o.setAttribute("type", FLASH_MIME_TYPE);
|
||||
for (var m in attObj) {
|
||||
if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
|
||||
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
|
||||
o.setAttribute("class", attObj[m]);
|
||||
}
|
||||
else if (m != "classid") { // Filter out IE specific attribute
|
||||
o.setAttribute(m, attObj[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var n in parObj) {
|
||||
if (parObj[n] != Object.prototype[n] && n != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
|
||||
createObjParam(o, n, parObj[n]);
|
||||
}
|
||||
}
|
||||
el.parentNode.replaceChild(o, el);
|
||||
r = o;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
function createObjParam(el, pName, pValue) {
|
||||
var p = createElement("param");
|
||||
p.setAttribute("name", pName);
|
||||
p.setAttribute("value", pValue);
|
||||
el.appendChild(p);
|
||||
}
|
||||
|
||||
function getElementById(id) {
|
||||
return doc.getElementById(id);
|
||||
}
|
||||
|
||||
function createElement(el) {
|
||||
return doc.createElement(el);
|
||||
}
|
||||
|
||||
function hasPlayerVersion(rv) {
|
||||
var pv = ua.pv, v = rv.split(".");
|
||||
v[0] = parseInt(v[0], 10);
|
||||
v[1] = parseInt(v[1], 10);
|
||||
v[2] = parseInt(v[2], 10);
|
||||
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
|
||||
}
|
||||
|
||||
/* Cross-browser dynamic CSS creation
|
||||
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
|
||||
*/
|
||||
function createCSS(sel, decl) {
|
||||
if (ua.ie && ua.mac) {
|
||||
return;
|
||||
}
|
||||
var h = doc.getElementsByTagName("head")[0], s = createElement("style");
|
||||
s.setAttribute("type", "text/css");
|
||||
s.setAttribute("media", "screen");
|
||||
if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
|
||||
s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
|
||||
}
|
||||
h.appendChild(s);
|
||||
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
|
||||
var ls = doc.styleSheets[doc.styleSheets.length - 1];
|
||||
if (typeof ls.addRule == OBJECT) {
|
||||
ls.addRule(sel, decl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setVisibility(id, isVisible) {
|
||||
var v = isVisible ? "visible" : "hidden";
|
||||
if (isDomLoaded) {
|
||||
getElementById(id).style.visibility = v;
|
||||
}
|
||||
else {
|
||||
createCSS("#" + id, "visibility:" + v);
|
||||
}
|
||||
}
|
||||
|
||||
function getTargetVersion(obj) {
|
||||
if (!obj)
|
||||
return 0;
|
||||
var c = obj.childNodes;
|
||||
var cl = c.length;
|
||||
for (var i = 0; i < cl; i++) {
|
||||
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
|
||||
c = c[i].childNodes;
|
||||
cl = c.length;
|
||||
i = 0;
|
||||
}
|
||||
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "swfversion") {
|
||||
return c[i].getAttribute("value");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getExpressInstall(obj) {
|
||||
if (!obj)
|
||||
return "";
|
||||
var c = obj.childNodes;
|
||||
var cl = c.length;
|
||||
for (var i = 0; i < cl; i++) {
|
||||
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
|
||||
c = c[i].childNodes;
|
||||
cl = c.length;
|
||||
i = 0;
|
||||
}
|
||||
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "expressinstall") {
|
||||
return c[i].getAttribute("value");
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
return {
|
||||
/* Public API
|
||||
- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
|
||||
*/
|
||||
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
|
||||
if (!ua.w3cdom || !objectIdStr) {
|
||||
return;
|
||||
}
|
||||
var obj = document.getElementById(objectIdStr);
|
||||
var xi = getExpressInstall(obj);
|
||||
var regObj = {};
|
||||
regObj.id = objectIdStr;
|
||||
regObj.swfVersion = swfVersionStr ? swfVersionStr : getTargetVersion(obj);
|
||||
regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : ((xi != "") ? xi : false);
|
||||
regObjArr[regObjArr.length] = regObj;
|
||||
setVisibility(objectIdStr, false);
|
||||
},
|
||||
|
||||
getObjectById: function(objectIdStr) {
|
||||
var r = null;
|
||||
if (ua.w3cdom && isDomLoaded) {
|
||||
var o = getElementById(objectIdStr);
|
||||
if (o) {
|
||||
var n = o.getElementsByTagName(OBJECT)[0];
|
||||
if (!n || (n && typeof o.SetVariable != UNDEF)) {
|
||||
r = o;
|
||||
}
|
||||
else if (typeof n.SetVariable != UNDEF) {
|
||||
r = n;
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
},
|
||||
|
||||
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
|
||||
if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
|
||||
return;
|
||||
}
|
||||
widthStr += ""; // Auto-convert to string to make it idiot proof
|
||||
heightStr += "";
|
||||
if (hasPlayerVersion(swfVersionStr)) {
|
||||
setVisibility(replaceElemIdStr, false);
|
||||
var att = (typeof attObj == OBJECT) ? attObj : {};
|
||||
att.data = swfUrlStr;
|
||||
att.width = widthStr;
|
||||
att.height = heightStr;
|
||||
var par = (typeof parObj == OBJECT) ? parObj : {};
|
||||
if (typeof flashvarsObj == OBJECT) {
|
||||
for (var i in flashvarsObj) {
|
||||
if (flashvarsObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
|
||||
if (typeof par.flashvars != UNDEF) {
|
||||
par.flashvars += "&" + i + "=" + flashvarsObj[i];
|
||||
}
|
||||
else {
|
||||
par.flashvars = i + "=" + flashvarsObj[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
addDomLoadEvent(function() {
|
||||
createSWF(att, par, replaceElemIdStr);
|
||||
if (att.id == replaceElemIdStr) {
|
||||
setVisibility(replaceElemIdStr, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
|
||||
setVisibility(replaceElemIdStr, false);
|
||||
addDomLoadEvent(function() {
|
||||
var regObj = {};
|
||||
regObj.id = regObj.altContentId = replaceElemIdStr;
|
||||
regObj.width = widthStr;
|
||||
regObj.height = heightStr;
|
||||
regObj.expressInstall = xiSwfUrlStr;
|
||||
showExpressInstall(regObj);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getFlashPlayerVersion: function() {
|
||||
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
|
||||
},
|
||||
|
||||
hasFlashPlayerVersion:hasPlayerVersion,
|
||||
|
||||
createSWF: function(attObj, parObj, replaceElemIdStr) {
|
||||
if (ua.w3cdom && isDomLoaded) {
|
||||
return createSWF(attObj, parObj, replaceElemIdStr);
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
|
||||
createCSS: function(sel, decl) {
|
||||
if (ua.w3cdom) {
|
||||
createCSS(sel, decl);
|
||||
}
|
||||
},
|
||||
|
||||
addDomLoadEvent:addDomLoadEvent,
|
||||
|
||||
addLoadEvent:addLoadEvent,
|
||||
|
||||
getQueryParamValue: function(param) {
|
||||
var q = doc.location.search || doc.location.hash;
|
||||
if (param == null) {
|
||||
return q;
|
||||
}
|
||||
if(q) {
|
||||
var pairs = q.substring(1).split("&");
|
||||
for (var i = 0; i < pairs.length; i++) {
|
||||
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
|
||||
return pairs[i].substring((pairs[i].indexOf("=") + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
// For internal usage only
|
||||
expressInstallCallback: function() {
|
||||
if (isExpressInstallActive && storedAltContent) {
|
||||
var obj = getElementById(EXPRESS_INSTALL_ID);
|
||||
if (obj) {
|
||||
obj.parentNode.replaceChild(storedAltContent, obj);
|
||||
if (storedAltContentId) {
|
||||
setVisibility(storedAltContentId, true);
|
||||
if (ua.ie && ua.win) {
|
||||
storedAltContent.style.display = "block";
|
||||
}
|
||||
}
|
||||
storedAltContent = null;
|
||||
storedAltContentId = null;
|
||||
isExpressInstallActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
Reference in New Issue
Block a user