diff --git a/main/admin/calendar_tbl_change.js b/main/admin/calendar_tbl_change.js index a4f3b06bac..d51a366087 100755 --- a/main/admin/calendar_tbl_change.js +++ b/main/admin/calendar_tbl_change.js @@ -60,7 +60,7 @@ function initCalendar() { if (!year && !month && !day) { day = window.opener.day; month = window.opener.month; - year = window.opener.year; + year = window.opener.year; if (isNaN(year) || isNaN(month) || isNaN(day) || day == 0) { dt = new Date(); year = dt.getFullYear(); diff --git a/main/blog/tbl_change.js b/main/blog/tbl_change.js index b90da5286e..a33cd4accb 100644 --- a/main/blog/tbl_change.js +++ b/main/blog/tbl_change.js @@ -60,7 +60,7 @@ function initCalendar() { if (!year && !month && !day) { day = window.opener.day; month = window.opener.month; - year = window.opener.year; + year = window.opener.year; if (isNaN(year) || isNaN(month) || isNaN(day) || day == 0) { dt = new Date(); year = dt.getFullYear(); diff --git a/main/calendar/tbl_change.js b/main/calendar/tbl_change.js index 43bdeed95b..2d537f1bf9 100644 --- a/main/calendar/tbl_change.js +++ b/main/calendar/tbl_change.js @@ -60,7 +60,7 @@ function initCalendar() { if (!year && !month && !day) { day = window.opener.day; month = window.opener.month; - year = window.opener.year; + year = window.opener.year; if (isNaN(year) || isNaN(month) || isNaN(day) || day == 0) { dt = new Date(); year = dt.getFullYear(); diff --git a/main/inc/lib/asciimath/ASCIIMathML.js b/main/inc/lib/asciimath/ASCIIMathML.js index 1086abcf61..f5f2f533f2 100644 --- a/main/inc/lib/asciimath/ASCIIMathML.js +++ b/main/inc/lib/asciimath/ASCIIMathML.js @@ -3,8 +3,8 @@ ASCIIMathML.js ============== This file contains JavaScript functions to convert ASCII math notation and LaTeX to Presentation MathML. Simple graphics commands are also -translated to SVG images. The conversion is done while the (X)HTML -page loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet +translated to SVG images. The conversion is done while the (X)HTML +page loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet Explorer 6/7 + MathPlayer (http://www.dessci.com/en/products/mathplayer/) + Adobe SVGview 3.03 (http://www.adobe.com/svg/viewer/install/). @@ -28,22 +28,22 @@ it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License (at http://www.gnu.org/licences/lgpl.html) for more details. */ var mathcolor = "blue"; // change it to "" (to inherit) or another color //var mathfontsize = "1em"; // change to e.g. 1.2em for larger math var mathfontsize = "1.2em"; // Modified by Ivan Tcholakov, 10-AUG-2009. -var mathfontfamily = "serif"; // change to "" to inherit (works in IE) +var mathfontfamily = "serif"; // change to "" to inherit (works in IE) // or another family (e.g. "arial") var automathrecognize = false; // writing "amath" on page makes this true var checkForMathML = true; // check if browser can display MathML var notifyIfNoMathML = true; // display note at top if no MathML capability var alertIfNoMathML = false; // show alert box if no MathML capability -var translateOnLoad = true; // set to false to do call translators from js +var translateOnLoad = true; // set to false to do call translators from js var translateLaTeX = true; // false to preserve $..$, $$..$$ var translateLaTeXformatting = true; // false to preserve \emph,\begin{},\end{} var translateASCIIMath = true; // false to preserve `..` @@ -59,7 +59,7 @@ var dsvglocation = ""; // path to d.svg (blank if same as ASCIIMathML.js loc) var isIE = document.createElementNS==null; -if (document.getElementById==null) +if (document.getElementById==null) alert("This webpage requires a recent browser such as\ \nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") @@ -79,7 +79,7 @@ function AMnoMathMLNote() { an.appendChild(document.createTextNode("ASCIIMathML")); an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"); nd.appendChild(an); - nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); + nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); an = AMcreateElementXHTML("a"); an.appendChild(document.createTextNode("MathPlayer")); an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); @@ -90,7 +90,7 @@ function AMnoMathMLNote() { } function AMisMathMLavailable() { - if (navigator.appName.slice(0,8)=="Netscape") + if (navigator.appName.slice(0,8)=="Netscape") if (navigator.appVersion.slice(0,1)>="5") return null; else return AMnoMathMLNote(); else if (navigator.appName.slice(0,9)=="Microsoft") @@ -121,7 +121,7 @@ var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; -var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, +var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, LEFTRIGHT = 9, TEXT = 10; // token types @@ -358,8 +358,8 @@ var AMnames = []; //list of input symbols function AMinitSymbols() { var texsymbols = [], i; for (i=0; i=n where str appears or would be inserted // assumes arr is sorted if (n==0) { @@ -439,7 +439,7 @@ function AMgetSymbol(str) { AMpreviousSymbol=AMcurrentSymbol; if (match!=""){ AMcurrentSymbol=AMsymbols[mk].ttype; - return AMsymbols[mk]; + return AMsymbols[mk]; } // if str[0] is a digit or - return maxsubstring of digits.digits AMcurrentSymbol=CONST; @@ -510,21 +510,21 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] return [null,str]; } if (symbol.ttype == DEFINITION) { - str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); + str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); symbol = AMgetSymbol(str); } switch (symbol.ttype) { case UNDEROVER: case CONST: - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); return [AMcreateMmlNode(symbol.tag, //its a constant document.createTextNode(symbol.output)),str]; case LEFTBRACKET: //read (expr+) AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); result = AMparseExpr(str,true); AMnestingDepth--; - if (typeof symbol.invisible == "boolean" && symbol.invisible) + if (typeof symbol.invisible == "boolean" && symbol.invisible) node = AMcreateMmlNode("mrow",result[0]); else { node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); @@ -556,7 +556,7 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] str = AMremoveCharsAndBlanks(str,i+1); return [AMcreateMmlNode("mrow",newFrag),str]; case UNARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); result = AMparseSexpr(str); if (result[0]==null) return [AMcreateMmlNode(symbol.tag, document.createTextNode(symbol.output)),str]; @@ -602,7 +602,7 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] return [node,result[1]]; } case BINARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); result = AMparseSexpr(str); if (result[0]==null) return [AMcreateMmlNode("mo", document.createTextNode(symbol.input)),str]; @@ -611,16 +611,16 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] if (result2[0]==null) return [AMcreateMmlNode("mo", document.createTextNode(symbol.input)),str]; AMremoveBrackets(result2[0]); - if (symbol.input=="root" || symbol.input=="stackrel") + if (symbol.input=="root" || symbol.input=="stackrel") newFrag.appendChild(result2[0]); newFrag.appendChild(result[0]); if (symbol.input=="frac") newFrag.appendChild(result2[0]); return [AMcreateMmlNode(symbol.tag,newFrag),result2[1]]; case INFIX: - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)),str]; case SPACE: - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); node = AMcreateElementMathML("mspace"); node.setAttribute("width","1ex"); newFrag.appendChild(node); @@ -633,7 +633,7 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] case LEFTRIGHT: // if (rightvert) return [null,str]; else rightvert = true; AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); result = AMparseExpr(str,false); AMnestingDepth--; var st = ""; @@ -651,7 +651,7 @@ function AMparseSexpr(str) { //parses str and returns [node,tailstr] } default: //alert("default"); - str = AMremoveCharsAndBlanks(str,symbol.input.length); + str = AMremoveCharsAndBlanks(str,symbol.input.length); return [AMcreateMmlNode(symbol.tag, //its a constant document.createTextNode(symbol.output)),str]; } @@ -719,9 +719,9 @@ function AMparseExpr(str,rightbracket) { node.appendChild(result[0]); newFrag.appendChild(node); symbol = AMgetSymbol(str); - } + } else if (node!=undefined) newFrag.appendChild(node); - } while ((symbol.ttype != RIGHTBRACKET && + } while ((symbol.ttype != RIGHTBRACKET && (symbol.ttype != LEFTRIGHT || rightbracket) || AMnestingDepth == 0) && symbol!=null && symbol.output!=""); if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) { @@ -733,7 +733,7 @@ function AMparseExpr(str,rightbracket) { var right = newFrag.childNodes[len-1].lastChild.firstChild.nodeValue; if (right==")" || right=="]") { var left = newFrag.childNodes[len-1].firstChild.firstChild.nodeValue; - if (left=="(" && right==")" && symbol.output != "}" || + if (left=="(" && right==")" && symbol.output != "}" || left=="[" && right=="]") { var pos = []; // positions of commas var matrix = true; @@ -741,12 +741,12 @@ function AMparseExpr(str,rightbracket) { for (i=0; matrix && i= xmax) + if (typeof xmin != "number" || typeof xmax != "number" || xmin >= xmax) alert("Picture requires at least two numbers: xmin < xmax"); - else if (y_max != null && (typeof y_min != "number" || + else if (y_max != null && (typeof y_min != "number" || typeof y_max != "number" || y_min >= y_max)) alert("initPicture(xmin,xmax,ymin,ymax) requires numbers ymin < ymax"); else { @@ -2633,7 +2633,7 @@ function initPicture(x_min,x_max,y_min,y_max) { // set up the graph if (width==null || width=="") width=defaultwidth; } picture.setAttribute("width",width); - if (height==null) { + if (height==null) { height = picture.getAttribute("height"); if (height==null || height=="") height=defaultheight; } @@ -2661,15 +2661,15 @@ function initPicture(x_min,x_max,y_min,y_max) { // set up the graph throw "wait"; } svgpicture = picture.getSVGDocument().getElementById("root"); - while (svgpicture.childNodes.length>0) - svgpicture.removeChild(svgpicture.lastChild); + while (svgpicture.childNodes.length>0) + svgpicture.removeChild(svgpicture.lastChild); svgpicture.setAttribute("width",width); svgpicture.setAttribute("height",height); svgpicture.setAttribute("name",picture.getAttribute("id")); doc = picture.getSVGDocument(); var nd = document.getElementById(picture.getAttribute("id")+"mml"); if (nd!=null) // clear out MathML layer - while (nd.childNodes.length>0) nd.removeChild(nd.lastChild); + while (nd.childNodes.length>0) nd.removeChild(nd.lastChild); } else { var qnode = document.createElementNS("http://www.w3.org/2000/svg","svg"); qnode.setAttribute("id",picture.getAttribute("id")); @@ -2729,7 +2729,7 @@ function line(p,q,id,endpts) { // segment connecting points p,q (coordinates in (height-p[1]*yunitlength-origin[1])+" "+ (q[0]*xunitlength+origin[0])+","+(height-q[1]*yunitlength-origin[1])); node.setAttribute("stroke-width", strokewidth); - if (strokedasharray!=null) + if (strokedasharray!=null) node.setAttribute("stroke-dasharray", strokedasharray); node.setAttribute("stroke", stroke); node.setAttribute("fill", fill); @@ -2771,7 +2771,7 @@ function path(plist,id,c,endpts) { } node.setAttribute("d", st); node.setAttribute("stroke-width", strokewidth); - if (strokedasharray!=null) + if (strokedasharray!=null) node.setAttribute("stroke-dasharray", strokedasharray); node.setAttribute("stroke", stroke); node.setAttribute("fill", fill); @@ -2818,11 +2818,11 @@ function circle(center,radius,id) { // coordinates in units node.setAttribute("fill-opacity", fillopacity); } -function loop(p,d,id) { +function loop(p,d,id) { // d is a direction vector e.g. [1,0] means loop starts in that direction if (d==null) d=[1,0]; path([p,[p[0]+d[0],p[1]+d[1]],[p[0]-d[1],p[1]+d[0]],p],id,"C"); - if (marker=="arrow" || marker=="arrowdot") + if (marker=="arrow" || marker=="arrowdot") arrowhead([p[0]+Math.cos(1.4)*d[0]-Math.sin(1.4)*d[1], p[1]+Math.sin(1.4)*d[0]+Math.cos(1.4)*d[1]],p); } @@ -2925,7 +2925,7 @@ function text(p,st,pos,id,fontsty) { node.style.position = "absolute"; dnode.appendChild(node); } - while (node.childNodes.length>0) node.removeChild(node.lastChild); + while (node.childNodes.length>0) node.removeChild(node.lastChild); node.appendChild(document.createTextNode(st)); // node.lastChild.nodeValue = st; node.style.left = ""+(p[0]*xunitlength+origin[0])+"px"; @@ -2958,7 +2958,7 @@ function text(p,st,pos,id,fontsty) { svgpicture.appendChild(node); node.appendChild(doc.createTextNode(st)); } - while (node.childNodes.length>1) node.removeChild(node.lastChild); + while (node.childNodes.length>1) node.removeChild(node.lastChild); // node.appendChild(document.createTextNode("\xA0"+st+"\xA0")); //alert("here"); node.lastChild.nodeValue = "\xA0"+st+"\xA0"; @@ -3075,7 +3075,7 @@ function dot(center, typ, label, pos, id) { node.setAttribute("fill", (typ=="open"?"white": (typ=="closed"?stroke:markerfill))); } - if (label!=null) + if (label!=null) text(center,label,(pos==null?"below":pos),(id==null?id:id+"label")) } @@ -3099,7 +3099,7 @@ function arrowhead(p,q) { // draw arrowhead at q (in units) add size param node.setAttribute("fill", stroke); /*was arrowfill*/ node.setAttribute("stroke-opacity", strokeopacity); node.setAttribute("fill-opacity", fillopacity); - svgpicture.appendChild(node); + svgpicture.appendChild(node); } } @@ -3253,7 +3253,7 @@ function mathjs(st) { j--; while (j>=0 && (ch=st.charAt(j))>="a" && ch<="z" || ch>="A" && ch<="Z") j--; - } else { + } else { return "Error: incorrect syntax in "+st+" at position "+j; } //find right argument @@ -3280,7 +3280,7 @@ function mathjs(st) { k++; while (k="a" && ch<="z" || ch>="A" && ch<="Z") k++; - } else { + } else { return "Error: incorrect syntax in "+st+" at position "+k; } st = st.slice(0,j+1)+"Math.pow("+st.slice(j+1,i)+","+st.slice(i+1,k)+")"+ @@ -3313,7 +3313,7 @@ function mathjs(st) { j--; while (j>=0 && (ch=st.charAt(j))>="a" && ch<="z" || ch>="A" && ch<="Z") j--; - } else { + } else { return "Error: incorrect syntax in "+st+" at position "+j; } st = st.slice(0,j+1)+"factorial("+st.slice(j+1,i)+")"+st.slice(i+1); @@ -3325,7 +3325,7 @@ function plot(fun,x_min,x_max,points,id,endpts) { var pth = []; var f = function(x) { return x }, g = fun; var name = null; - if (typeof fun=="string") + if (typeof fun=="string") eval("g = function(x){ with(Math) return "+mathjs(fun)+" }"); else if (typeof fun=="object") { eval("f = function(t){ with(Math) return "+mathjs(fun[0])+" }"); @@ -3353,7 +3353,7 @@ function plot(fun,x_min,x_max,points,id,endpts) { function slopefield(fun,dx,dy) { var g = fun; - if (typeof fun=="string") + if (typeof fun=="string") eval("g = function(x,y){ with(Math) return "+mathjs(fun)+" }"); var gxy,x,y,u,v,dz; if (dx==null) dx=1; @@ -3427,8 +3427,8 @@ function calculate(inputId,outputId) { } catch(e) { err = "syntax incomplete"; } - if (!isNaN(res) && res!="Infinity") - str = "`"+str+" =` "+(Math.abs(res-Math.round(res*1000000)/1000000)<1e-15?Math.round(res*1000000)/1000000:res)+err; + if (!isNaN(res) && res!="Infinity") + str = "`"+str+" =` "+(Math.abs(res-Math.round(res*1000000)/1000000)<1e-15?Math.round(res*1000000)/1000000:res)+err; else if (str!="") str = "`"+str+"` = undefined"; //debug:+mathjs(str); var outnode = document.getElementById(outputId); var n = outnode.childNodes.length; diff --git a/main/inc/lib/javascript/jquery.autocomplete.js b/main/inc/lib/javascript/jquery.autocomplete.js index 5ad9178f86..eb23bad248 100644 --- a/main/inc/lib/javascript/jquery.autocomplete.js +++ b/main/inc/lib/javascript/jquery.autocomplete.js @@ -12,7 +12,7 @@ */ ;(function($) { - + $.fn.extend({ autocomplete: function(urlOrData, options) { var isUrl = typeof urlOrData == "string"; @@ -22,13 +22,13 @@ $.fn.extend({ delay: isUrl ? $.Autocompleter.defaults.delay : 10, max: options && !options.scroll ? 10 : 150 }, options); - + // if highlight is set to false, replace it with a do-nothing function options.highlight = options.highlight || function(value) { return value; }; - + // if the formatMatch option is not specified, then use formatItem for backwards compatibility options.formatMatch = options.formatMatch || options.formatItem; - + return this.each(function() { new $.Autocompleter(this, options); }); @@ -77,9 +77,9 @@ $.Autocompleter = function(input, options) { mouseDownOnSelect: false }; var select = $.Autocompleter.Select(options, input, selectCurrent, config); - + var blockSubmit; - + // prevent form submit in opera when selecting with return key $.browser.opera && $(input.form).bind("submit.autocomplete", function() { if (blockSubmit) { @@ -87,13 +87,13 @@ $.Autocompleter = function(input, options) { return false; } }); - + // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { // track last key pressed lastKeyPressCode = event.keyCode; switch(event.keyCode) { - + case KEY.UP: event.preventDefault(); if ( select.visible() ) { @@ -102,7 +102,7 @@ $.Autocompleter = function(input, options) { onChange(0, true); } break; - + case KEY.DOWN: event.preventDefault(); if ( select.visible() ) { @@ -111,7 +111,7 @@ $.Autocompleter = function(input, options) { onChange(0, true); } break; - + case KEY.PAGEUP: event.preventDefault(); if ( select.visible() ) { @@ -120,7 +120,7 @@ $.Autocompleter = function(input, options) { onChange(0, true); } break; - + case KEY.PAGEDOWN: event.preventDefault(); if ( select.visible() ) { @@ -129,7 +129,7 @@ $.Autocompleter = function(input, options) { onChange(0, true); } break; - + // matches also semicolon case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: case KEY.TAB: @@ -141,11 +141,11 @@ $.Autocompleter = function(input, options) { return false; } break; - + case KEY.ESC: select.hide(); break; - + default: clearTimeout(timeout); timeout = setTimeout(onChange, options.delay); @@ -196,16 +196,16 @@ $.Autocompleter = function(input, options) { $input.unbind(); $(input.form).unbind(".autocomplete"); }); - - + + function selectCurrent() { var selected = select.selected(); if( !selected ) return false; - + var v = selected.result; previousValue = v; - + if ( options.multiple ) { var words = trimWords($input.val()); if ( words.length > 1 ) { @@ -213,26 +213,26 @@ $.Autocompleter = function(input, options) { } v += options.multipleSeparator; } - + $input.val(v); hideResultsNow(); $input.trigger("result", [selected.data, selected.value]); return true; } - + function onChange(crap, skipPrevCheck) { if( lastKeyPressCode == KEY.DEL ) { select.hide(); return; } - + var currentValue = $input.val(); - + if ( !skipPrevCheck && currentValue == previousValue ) return; - + previousValue = currentValue; - + currentValue = lastWord(currentValue); if ( currentValue.length >= options.minChars) { $input.addClass(options.loadingClass); @@ -244,7 +244,7 @@ $.Autocompleter = function(input, options) { select.hide(); } }; - + function trimWords(value) { if ( !value ) { return [""]; @@ -257,14 +257,14 @@ $.Autocompleter = function(input, options) { }); return result; } - + function lastWord(value) { if ( !options.multiple ) return value; var words = trimWords(value); return words[words.length - 1]; } - + // fills in the input box w/the first match (assumed to be the best match) // q: the term entered // sValue: the first matching result @@ -330,14 +330,14 @@ $.Autocompleter = function(input, options) { success(term, data); // if an AJAX url has been supplied, try loading the data now } else if( (typeof options.url == "string") && (options.url.length > 0) ){ - + var extraParams = { timestamp: +new Date() }; $.each(options.extraParams, function(key, param) { extraParams[key] = typeof param == "function" ? param() : param; }); - + $.ajax({ // try to leverage ajaxQueue plugin to abort previous requests mode: "abort", @@ -361,7 +361,7 @@ $.Autocompleter = function(input, options) { failure(term); } }; - + function parse(data) { var parsed = []; var rows = data.split("\n"); @@ -416,25 +416,25 @@ $.Autocompleter.Cache = function(options) { var data = {}; var length = 0; - + function matchSubset(s, sub) { - if (!options.matchCase) + if (!options.matchCase) s = s.toLowerCase(); var i = s.indexOf(sub); if (i == -1) return false; return i == 0 || options.matchContains; }; - + function add(q, value) { if (length > options.cacheLength){ flush(); } - if (!data[q]){ + if (!data[q]){ length++; } data[q] = value; } - + function populate(){ if( !options.data ) return false; // track the matches @@ -443,23 +443,23 @@ $.Autocompleter.Cache = function(options) { // no url was specified, we need to adjust the cache length to make sure it fits the local data store if( !options.url ) options.cacheLength = 1; - + // track all options for minChars = 0 stMatchSets[""] = []; - + // loop through the array and create a lookup structure for ( var i = 0, ol = options.data.length; i < ol; i++ ) { var rawValue = options.data[i]; // if rawValue is a string, make an array otherwise just reference the array rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; - + var value = options.formatMatch(rawValue, i+1, options.data.length); if ( value === false ) continue; - + var firstChar = value.charAt(0).toLowerCase(); // if no lookup array for this character exists, look it up now - if( !stMatchSets[firstChar] ) + if( !stMatchSets[firstChar] ) stMatchSets[firstChar] = []; // if the match is a string @@ -468,7 +468,7 @@ $.Autocompleter.Cache = function(options) { data: rawValue, result: options.formatResult && options.formatResult(rawValue) || value }; - + // push the current match into the set list stMatchSets[firstChar].push(row); @@ -486,15 +486,15 @@ $.Autocompleter.Cache = function(options) { add(i, value); }); } - + // populate any existing data setTimeout(populate, 25); - + function flush(){ data = {}; length = 0; } - + return { flush: flush, add: add, @@ -502,7 +502,7 @@ $.Autocompleter.Cache = function(options) { load: function(q) { if (!options.cacheLength || !length) return null; - /* + /* * if dealing w/local data and matchContains than we must make sure * to loop through all the data collections looking for matches */ @@ -522,9 +522,9 @@ $.Autocompleter.Cache = function(options) { } }); } - } + } return csub; - } else + } else // if the exact item exists, use it if (data[q]){ return data[q]; @@ -552,7 +552,7 @@ $.Autocompleter.Select = function (options, input, select, config) { var CLASSES = { ACTIVE: "ac_over" }; - + var listItems, active = -1, data, @@ -560,7 +560,7 @@ $.Autocompleter.Select = function (options, input, select, config) { needsInit = true, element, list; - + // Create results function init() { if (!needsInit) @@ -570,11 +570,11 @@ $.Autocompleter.Select = function (options, input, select, config) { .addClass(options.resultsClass) .css("position", "absolute") .appendTo(document.body); - + list = $("
    ").appendTo(element).mouseover( function(event) { if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); - $(target(event)).addClass(CLASSES.ACTIVE); + $(target(event)).addClass(CLASSES.ACTIVE); } }).click(function(event) { $(target(event)).addClass(CLASSES.ACTIVE); @@ -587,13 +587,13 @@ $.Autocompleter.Select = function (options, input, select, config) { }).mouseup(function() { config.mouseDownOnSelect = false; }); - + if( options.width > 0 ) element.css("width", options.width); - + needsInit = false; - } - + } + function target(event) { var element = event.target; while(element && element.tagName != "LI") @@ -620,7 +620,7 @@ $.Autocompleter.Select = function (options, input, select, config) { } } }; - + function movePosition(step) { active += step; if (active < 0) { @@ -629,13 +629,13 @@ $.Autocompleter.Select = function (options, input, select, config) { active = 0; } } - + function limitNumberOfItems(available) { return options.max && options.max < available ? options.max : available; } - + function fillList() { list.empty(); var max = limitNumberOfItems(data.length); @@ -657,7 +657,7 @@ $.Autocompleter.Select = function (options, input, select, config) { if ( $.fn.bgiframe ) list.bgiframe(); } - + return { display: function(d, q) { init(); @@ -709,7 +709,7 @@ $.Autocompleter.Select = function (options, input, select, config) { maxHeight: options.scrollHeight, overflow: 'auto' }); - + if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { var listHeight = 0; listItems.each(function() { @@ -722,7 +722,7 @@ $.Autocompleter.Select = function (options, input, select, config) { listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); } } - + } }, selected: function() { diff --git a/main/inc/lib/javascript/jquery.customselect.js b/main/inc/lib/javascript/jquery.customselect.js index 3f82a31dbe..5e728ed771 100644 --- a/main/inc/lib/javascript/jquery.customselect.js +++ b/main/inc/lib/javascript/jquery.customselect.js @@ -3,201 +3,201 @@ ;(function($){ $.fn.extend({ - + //計算文字Byte數,並回傳 getByteLength: function(strIN){ var i, cnt=0; - - for (i=0; i= 4) cnt+=2; - else cnt++; - } - + else cnt++; + } + return cnt; - } - + } + }); - + $.fn.extend({ - + //檢查文字的Byte數,超�?�limit指定的個數的話,就回傳true 和 未超�?�之�?的文字index getIndexByByte: function(strIN,limit){ var i, cnt=0; - - for (i=0; i= 4) cnt+=2; - else cnt++; - + else cnt++; + if(cnt>limit) { return [true,i]; } - } - + } + return false; - } - + } + }); - + $.fn.extend({ finalselect: function(options) { - + var settings = - { + { id:null, animalSpeed:100, - selectWidth:"190px", + selectWidth:"190px", selectImage:"image/select.png", selectText:"My friend", - zIndex: 0, + zIndex: 0, viewHeight:"100px", viewWidth:"300px", viewMouseoverColor:"#cfdfff",//#dcdcdc viewTop:"28px",//top,bottom viewLeft:" -1px"//left,right }; - - + + if (typeof(options)!='undefined') { //將整批options的值assign給settings jQuery.extend(settings, options); } - + var tmp='
    ' tmp+='
    '; tmp+='
    '+settings.selectText+'
    '; - + - + var _handler = function() { // 從這裡開始 $(this).html(tmp); bindArrowClick(); bindSelectMouseover(); bindSelectMouseleave(); - + }; - - - + + + var bindArrowClick=function(){ var tmp=$('#'+settings.id+'-Text'); - $("#"+settings.id+'-Text').bind("click", function(e){ + $("#"+settings.id+'-Text').bind("click", function(e){ var obj=$('#'+settings.id+'-selectshow'); if(obj.css('display')=='none') { - // obj.slide(); - obj.slideDown(settings.animalSpeed,function(){ - obj.show(); + // obj.slide(); + obj.slideDown(settings.animalSpeed,function(){ + obj.show(); obj.css('overflow','auto'); obj.css('overflow-x','hidden'); }); } else { - obj.slideUp(settings.animalSpeed,function(){ + obj.slideUp(settings.animalSpeed,function(){ obj.hide(); }); } - + }); }; - + var bindItemMouseover=function(){ - + var inx=0; while($(".selectitem",$("#"+settings.id+"-selectshow")).get(inx)!=null) { var item=$(".selectitem",$("#"+settings.id+"-selectshow")).get(inx); - + $(item).bind("mouseover", function(e){ $(this).css('background-color',settings.viewMouseoverColor); }); - + $(item).bind("mouseout", function(e){ $(this).css('background-color','#fff'); }); - + $(item).bind("click", function(e){ - - var tmpstr=$(".thistext",$(this)).html(); - var arr=$().getIndexByByte(tmpstr,30); + + var tmpstr=$(".thistext",$(this)).html(); + var arr=$().getIndexByByte(tmpstr,30); if(arr[0]==true) - tmpstr=tmpstr.substring(0,arr[1])+'...'; + tmpstr=tmpstr.substring(0,arr[1])+'...'; $(".textshow",$("#"+settings.id+"-Text")).html(tmpstr); document.getElementById(settings.id+'-selectshow').style.display="none"; - + $(".valueshow",$("#"+settings.id+"-Text")).html($(".selectvalue",$(this)).html()); - + }); inx++; } } - + var bindSelectMouseover=function(){ $('#'+settings.id+'-Text').bind("mouseover",function(){ if($.browser.msie==false) $('#'+settings.id+'-Text').css("background-position","0 -21px"); }); } - + var bindSelectMouseleave=function(){ $('#'+settings.id+'-Text').bind("mouseout",function(){ if($.browser.msie==false) $('#'+settings.id+'-Text').css("background-position","0 0px"); }); } - + this.setViewTop = function(top){ $('#'+settings.id+'-selectshow').css('top',top+'px'); - } - + } + this.setViewLeft = function(left){ $('#'+settings.id+'-selectshow').css('left',left+'px'); - } - + } + this.getLength = function(){ return $('.selectitem',$('#'+settings.id+'-selectshow')).length; - } - - + } + + //add item到select裡�?� //在傳itemtext時,用包起�?顯示的 "文字" //例如:哇哈哈,這樣select�?�擇後,就會顯示 "哇哈哈" - this.addItem = function(itemtext,itemvalue){ - + this.addItem = function(itemtext,itemvalue){ + var itemhtml='
    '+itemtext +'
    '+itemvalue+'
    '; - - $("#"+settings.id+'-selectshow').html($("#"+settings.id+'-selectshow').html()+itemhtml); - - bindItemMouseover(); + + $("#"+settings.id+'-selectshow').html($("#"+settings.id+'-selectshow').html()+itemhtml); + + bindItemMouseover(); }; - + this.removeItem = function(index){ if($('.selectitem',$('#'+settings.id+'-selectshow')).length>index) $($('.selectitem',$('#'+settings.id+'-selectshow')).get(index)).remove(); if($('.selectborder',$('#'+settings.id+'-selectshow')).length>index) $($('.selectborder',$('#'+settings.id+'-selectshow')).get(index)).remove(); } - - - + + + this.getValue = function(){ return $('.valueshow',$('#'+settings.id+'-Text')).html(); } - + this.getText = function(){ return $('.textshow',$('#'+settings.id+'-Text')).html(); } - + - return this.each(_handler); + return this.each(_handler); } }); diff --git a/main/inc/lib/javascript/jquery.js b/main/inc/lib/javascript/jquery.js index 88e661eec8..2c04438968 100644 --- a/main/inc/lib/javascript/jquery.js +++ b/main/inc/lib/javascript/jquery.js @@ -582,7 +582,7 @@ jQuery.extend = jQuery.fn.extend = function() { // Recurse if we're merging object values if ( deep && copy && typeof copy == "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, + target[ name ] = jQuery.extend( deep, // Never move original objects, clone them src || ( copy.length != null ? [ ] : { } ) , copy ); @@ -2882,7 +2882,7 @@ jQuery.extend({ if ( xml && data.documentElement.tagName == "parsererror" ) throw "parsererror"; - + // Allow a pre-filtering function to sanitize the response if( filter ) data = filter( data, type ); @@ -3469,7 +3469,7 @@ jQuery.fn.extend({ parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft + // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= num( this, 'marginTop' ); offset.left -= num( this, 'marginLeft' ); @@ -3500,7 +3500,7 @@ jQuery.fn.extend({ // Create scrollLeft and scrollTop methods jQuery.each( ['Left', 'Top'], function(i, name) { var method = 'scroll' + name; - + jQuery.fn[ method ] = function(val) { if (!this[0]) return; diff --git a/main/inc/lib/javascript/jquery.tabs.js b/main/inc/lib/javascript/jquery.tabs.js index cd68cf2e1e..135dd25280 100755 --- a/main/inc/lib/javascript/jquery.tabs.js +++ b/main/inc/lib/javascript/jquery.tabs.js @@ -470,7 +470,7 @@ $.fn.tabs = function(initial, settings) { if (!$.browser.msie) { // not in IE to prevent ClearType font issue resetCSS['opacity'] = ''; } - + // switch tab, animation prevents browser scrolling to the fragment function switchTab() { if (settings.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click @@ -478,7 +478,7 @@ $.fn.tabs = function(initial, settings) { } toHide.animate(hideAnim, hideSpeed, function() { // $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass); - toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. + toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. if (typeof onHide == 'function') { onHide(clicked, toShow[0], toHide[0]); } diff --git a/main/inc/lib/javascript/thickbox.js b/main/inc/lib/javascript/thickbox.js index 0bbea01a3a..f0536d2bbe 100644 --- a/main/inc/lib/javascript/thickbox.js +++ b/main/inc/lib/javascript/thickbox.js @@ -4,13 +4,13 @@ * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ - + var tb_pathToImage = "main/img/loadingAnimation.gif"; /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ //on page load call tb_init -$(document).ready(function(){ +$(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox imgLoader = new Image();// preload image imgLoader.src = tb_pathToImage; @@ -18,7 +18,7 @@ $(document).ready(function(){ // function load_thick (hrefinfo,textinfo) { imgLoader = new Image();// preload image - imgLoader.src = tb_pathToImage; + imgLoader.src = tb_pathToImage; name_user=textinfo.replace(/\+/g," "); tb_show(name_user,hrefinfo, ''); } @@ -50,29 +50,29 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic $("#TB_overlay").click(tb_remove); } } - + if(tb_detectMacXFF()){ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } - + if(caption===null){caption="";} $("body").append("
    ");//add loader to the page $('#TB_load').show();//show loader - + var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved baseURL = url.substr(0, url.indexOf("?")); - }else{ + }else{ baseURL = url; } - + var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images - + TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; @@ -85,7 +85,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic TB_TempArray = $("a[@rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); - if (!(TB_TempArray[TB_Counter].href == url)) { + if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; @@ -97,15 +97,15 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic } } else { TB_FoundURL = true; - TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); } } } imgPreloader = new Image(); - imgPreloader.onload = function(){ + imgPreloader.onload = function(){ imgPreloader.onload = null; - + // Resizing large images - orginal by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; @@ -113,51 +113,51 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { - imageHeight = imageHeight * (x / imageWidth); - imageWidth = x; - if (imageHeight > y) { - imageWidth = imageWidth * (y / imageHeight); - imageHeight = y; + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; } - } else if (imageHeight > y) { - imageWidth = imageWidth * (y / imageHeight); - imageHeight = y; - if (imageWidth > x) { - imageHeight = imageHeight * (x / imageWidth); + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing - + TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; - $("#TB_window").append(""+caption+"" + "
    "+caption+"
    " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
    close or Esc Key
    "); - + $("#TB_window").append(""+caption+"" + "
    "+caption+"
    " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
    close or Esc Key
    "); + $("#TB_closeWindowButton").click(tb_remove); - + if (!(TB_PrevHTML === "")) { function goPrev(){ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} $("#TB_window").remove(); $("body").append("
    "); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); - return false; + return false; } $("#TB_prev").click(goPrev); } - - if (!(TB_NextHTML === "")) { + + if (!(TB_NextHTML === "")) { function goNext(){ $("#TB_window").remove(); $("body").append("
    "); - tb_show(TB_NextCaption, TB_NextURL, imageGroup); - return false; + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; } $("#TB_next").click(goNext); - + } - document.onkeydown = function(e){ + document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla @@ -175,18 +175,18 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic document.onkeydown = ""; goPrev(); } - } + } }; - + tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"}); //for safari using css instead of show }; - + imgPreloader.src = url; }else{//code to show html - + var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); @@ -194,8 +194,8 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; - - if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window + + if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal @@ -210,7 +210,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic $("#TB_window").append("
    "+caption+"
    close or Esc Key
    "); }else{//ajax modal $("#TB_overlay").unbind(); - $("#TB_window").append("
    "); + $("#TB_window").append("
    "); } }else{//this means the window is already up, we are just loading new content via ajax $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; @@ -219,17 +219,17 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic $("#TB_ajaxWindowTitle").html(caption); } } - + $("#TB_closeWindowButton").click(tb_remove); - - if(url.indexOf('TB_inline') != -1){ + + if(url.indexOf('TB_inline') != -1){ $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function () { $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); + $("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){//safari needs help because it will not fire iframe onload @@ -244,11 +244,11 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic $("#TB_window").css({display:"block"}); }); } - + } if(!params['modal']){ - document.onkeyup = function(e){ + document.onkeyup = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla @@ -256,10 +256,10 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic } if(keycode == 27){ // close tb_remove(); - } + } }; } - + } catch(e) { //nothing here } @@ -325,10 +325,10 @@ function tb_detectMacXFF() { function TB_special(pi_href){ // get caption: either title or name attribute var caption = this.title || this.name || ""; - + // get rel attribute for image groups var group = this.rel || false; - + // display the box for the elements href TB_show(caption, pi_href, group); } diff --git a/main/inc/lib/javascript/upload.js b/main/inc/lib/javascript/upload.js index d196e38b52..75161b5fec 100644 --- a/main/inc/lib/javascript/upload.js +++ b/main/inc/lib/javascript/upload.js @@ -6,10 +6,10 @@ * Upload class. Used to pack functions into one practical object. * Call like this: var myUpload = new upload(5); */ -function upload(latency){ +function upload(latency){ /** * Starts the timer - * Call like this: + * Call like this: * @param string Name of the DOM element we need to update * @param string Loading image to display * @return true @@ -21,7 +21,7 @@ function upload(latency){ __progress_bar_interval = setTimeout(__display_progress_bar,latency,__progress_bar_text); __upload_form_domid = formid; } - + /** * Starts the timer of the real upload progress */ @@ -30,22 +30,22 @@ function upload(latency){ __progress_bar_uploadid = upload_id; __progress_bar_waitAfterUpload = waitAfterUpload; __upload_form_domid = formid; - __progress_bar_interval = setInterval(__refreshUpload,latency); + __progress_bar_interval = setInterval(__refreshUpload,latency); document.getElementById(domid+'_container').style.display = 'block'; if(waitAfterUpload){ document.getElementById(domid+'_waiter_container').style.display = 'block'; } - - + + } - + /** * Function called by a timer to update every x seconds the progress bar */ function __refreshUpload(){ xajax_updateProgress(__progress_bar_domid, __progress_bar_uploadid, __progress_bar_waitAfterUpload); } - + /** * Displays the progress bar in the given DOM element */ diff --git a/main/inc/lib/mediaplayer/swfobject.js b/main/inc/lib/mediaplayer/swfobject.js index 17af9229b5..d2f995d763 100644 --- a/main/inc/lib/mediaplayer/swfobject.js +++ b/main/inc/lib/mediaplayer/swfobject.js @@ -7,7 +7,7 @@ */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; -/* SWFObject v2.2 - is released under the MIT License +/* SWFObject v2.2 + is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; -/* SWFObject v2.2 - is released under the MIT License +/* SWFObject v2.2 + is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab - is released under the MIT License +/*! SWFObject v2.2 + is released under the MIT License */ var swfobject = function() { - + var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", @@ -292,11 +292,11 @@ var swfobject = function() { FLASH_MIME_TYPE = "application/x-shockwave-flash", EXPRESS_INSTALL_ID = "SWFObjectExprInst", ON_READY_STATE_CHANGE = "onreadystatechange", - + win = window, doc = document, nav = navigator, - + plugin = false, domLoadFnArr = [main], regObjArr = [], @@ -311,11 +311,11 @@ var swfobject = function() { dynamicStylesheet, dynamicStylesheetMedia, autoHideShow = true, - + /* Centralized function for browser feature detection - User agent string detection is only used when no good alternative is possible - Is executed directly for optimal performance - */ + */ ua = function() { var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, u = nav.userAgent.toLowerCase(), @@ -353,21 +353,21 @@ var swfobject = function() { } return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; }(), - + /* Cross-browser onDomLoad - Will fire an event as soon as the DOM of a web page is loaded - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/ - Regular onload serves as fallback - */ + */ onDomLoad = function() { if (!ua.w3) { return; } - if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically + if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically callDomLoadFunctions(); } if (!isDomLoaded) { if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); - } + } if (ua.ie && ua.win) { doc.attachEvent(ON_READY_STATE_CHANGE, function() { if (doc.readyState == "complete") { @@ -402,7 +402,7 @@ var swfobject = function() { addLoadEvent(callDomLoadFunctions); } }(); - + function callDomLoadFunctions() { if (isDomLoaded) { return; } try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early @@ -416,19 +416,19 @@ var swfobject = function() { domLoadFnArr[i](); } } - + function addDomLoadEvent(fn) { if (isDomLoaded) { fn(); } - else { + 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 + - 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) { @@ -451,11 +451,11 @@ var swfobject = function() { win.onload = fn; } } - + /* Main function - Will preferably execute onDomLoad, otherwise onload (as a fallback) */ - function main() { + function main() { if (plugin) { testPlayerVersion(); } @@ -463,7 +463,7 @@ var swfobject = function() { matchVersions(); } } - + /* Detect the Flash Player version for non-Internet Explorer browsers - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: a. Both release and build numbers can be detected @@ -500,7 +500,7 @@ var swfobject = function() { matchVersions(); } } - + /* Perform Flash Player and SWF version matching; static publishing only */ function matchVersions() { @@ -549,7 +549,7 @@ var swfobject = function() { setVisibility(id, true); if (cb) { var o = getObjectById(id); // test whether there is an HTML object element or not - if (o && typeof o.SetVariable != UNDEF) { + if (o && typeof o.SetVariable != UNDEF) { cbObj.success = true; cbObj.ref = o; } @@ -559,7 +559,7 @@ var swfobject = function() { } } } - + function getObjectById(objectIdStr) { var r = null; var o = getElementById(objectIdStr); @@ -576,7 +576,7 @@ var swfobject = function() { } return r; } - + /* Requirements for Adobe Express Install - only one instance can be active at a time - fp 6.0.65 or higher @@ -586,7 +586,7 @@ var swfobject = function() { function canExpressInstall() { return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); } - + /* Show the Adobe Express Install dialog - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 */ @@ -636,7 +636,7 @@ var swfobject = function() { createSWF(att, par, replaceElemIdStr); } } - + /* Functions to abstract and display alternative content */ function displayAltContent(obj) { @@ -659,7 +659,7 @@ var swfobject = function() { else { obj.parentNode.replaceChild(abstractAltContent(obj), obj); } - } + } function abstractAltContent(obj) { var ac = createElement("div"); @@ -682,7 +682,7 @@ var swfobject = function() { } return ac; } - + /* Cross-browser dynamic SWF creation */ function createSWF(attObj, parObj, id) { @@ -715,7 +715,7 @@ var swfobject = function() { } el.outerHTML = '' + par + ''; objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) - r = getElementById(attObj.id); + r = getElementById(attObj.id); } else { // well-behaving browsers var o = createElement(OBJECT); @@ -741,14 +741,14 @@ var swfobject = function() { } return r; } - + function createObjParam(el, pName, pValue) { var p = createElement("param"); - p.setAttribute("name", pName); + p.setAttribute("name", pName); p.setAttribute("value", pValue); el.appendChild(p); } - + /* Cross-browser SWF removal - Especially needed to safely and completely remove a SWF in Internet Explorer */ @@ -771,7 +771,7 @@ var swfobject = function() { } } } - + function removeObjectInIE(id) { var obj = getElementById(id); if (obj) { @@ -783,7 +783,7 @@ var swfobject = function() { obj.parentNode.removeChild(obj); } } - + /* Functions to optimize JavaScript compression */ function getElementById(id) { @@ -794,19 +794,19 @@ var swfobject = function() { catch (e) {} return el; } - + function createElement(el) { return doc.createElement(el); } - + /* Updated attachEvent function for Internet Explorer - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks - */ + */ function addListener(target, eventType, fn) { target.attachEvent(eventType, fn); listenersArr[listenersArr.length] = [target, eventType, fn]; } - + /* Flash Player and SWF content version matching */ function hasPlayerVersion(rv) { @@ -816,10 +816,10 @@ var swfobject = function() { v[2] = parseInt(v[2], 10) || 0; 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, media, newStyle) { if (ua.ie && ua.mac) { return; } var h = doc.getElementsByTagName("head")[0]; @@ -829,7 +829,7 @@ var swfobject = function() { dynamicStylesheet = null; dynamicStylesheetMedia = null; } - if (!dynamicStylesheet || dynamicStylesheetMedia != m) { + if (!dynamicStylesheet || dynamicStylesheetMedia != m) { // create dynamic stylesheet + get a global reference to it var s = createElement("style"); s.setAttribute("type", "text/css"); @@ -852,7 +852,7 @@ var swfobject = function() { } } } - + function setVisibility(id, isVisible) { if (!autoHideShow) { return; } var v = isVisible ? "visible" : "hidden"; @@ -871,7 +871,7 @@ var swfobject = function() { var hasBadChars = regex.exec(s) != null; return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; } - + /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) */ var cleanup = function() { @@ -899,11 +899,11 @@ var swfobject = function() { }); } }(); - + return { /* Public API - Reference: http://code.google.com/p/swfobject/wiki/documentation - */ + */ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { if (ua.w3 && objectIdStr && swfVersionStr) { var regObj = {}; @@ -918,13 +918,13 @@ var swfobject = function() { callbackFn({success:false, id:objectIdStr}); } }, - + getObjectById: function(objectIdStr) { if (ua.w3) { return getObjectById(objectIdStr); } }, - + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { var callbackObj = {success:false, id:replaceElemIdStr}; if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { @@ -941,7 +941,7 @@ var swfobject = function() { att.data = swfUrlStr; att.width = widthStr; att.height = heightStr; - var par = {}; + var par = {}; if (parObj && typeof parObj === OBJECT) { for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs par[j] = parObj[j]; @@ -978,19 +978,19 @@ var swfobject = function() { } else if (callbackFn) { callbackFn(callbackObj); } }, - + switchOffAutoHideShow: function() { autoHideShow = false; }, - + ua: ua, - + getFlashPlayerVersion: function() { return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; }, - + hasFlashPlayerVersion: hasPlayerVersion, - + createSWF: function(attObj, parObj, replaceElemIdStr) { if (ua.w3) { return createSWF(attObj, parObj, replaceElemIdStr); @@ -999,29 +999,29 @@ var swfobject = function() { return undefined; } }, - + showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { if (ua.w3 && canExpressInstall()) { showExpressInstall(att, par, replaceElemIdStr, callbackFn); } }, - + removeSWF: function(objElemIdStr) { if (ua.w3) { removeSWF(objElemIdStr); } }, - + createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { if (ua.w3) { createCSS(selStr, declStr, mediaStr, newStyleBoolean); } }, - + addDomLoadEvent: addDomLoadEvent, - + addLoadEvent: addLoadEvent, - + getQueryParamValue: function(param) { var q = doc.location.search || doc.location.hash; if (q) { @@ -1038,7 +1038,7 @@ var swfobject = function() { } return ""; }, - + // For internal usage only expressInstallCallback: function() { if (isExpressInstallActive) { @@ -1052,7 +1052,7 @@ var swfobject = function() { if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } } isExpressInstallActive = false; - } + } } }; }(); diff --git a/main/inc/lib/xajax/xajax_js/xajax_uncompressed.js b/main/inc/lib/xajax/xajax_js/xajax_uncompressed.js index df51ccdeb2..2105796532 100644 --- a/main/inc/lib/xajax/xajax_js/xajax_uncompressed.js +++ b/main/inc/lib/xajax/xajax_js/xajax_uncompressed.js @@ -27,11 +27,11 @@ function Xajax() alert("Xajax Debug:\n " + text); } }; - + this.workId = 'xajaxWork'+ new Date().getTime(); this.depth = 0; this.responseErrorsForAlert = ["400","401","402","403","404","500","501","502","503"]; - + //Get the XMLHttpRequest Object this.getRequestObject = function() { @@ -65,9 +65,9 @@ function Xajax() } if(!req && window.createRequest) req = window.createRequest(); - + if (!req) this.DebugMessage("Request Object Instantiation failed."); - + return req; } @@ -86,7 +86,7 @@ function Xajax() } return returnObj; } - + // xajax.include(sFileName) dynamically includes an external javascript file this.include = function(sFileName) { @@ -96,7 +96,7 @@ function Xajax() objScript.src = sFileName; objHead[0].appendChild(objScript); } - + this.stripOnPrefix = function(sEventName) { sEventName = sEventName.toLowerCase(); @@ -104,10 +104,10 @@ function Xajax() { sEventName = sEventName.replace(/on/,''); } - + return sEventName; } - + this.addOnPrefix = function(sEventName) { sEventName = sEventName.toLowerCase(); @@ -115,10 +115,10 @@ function Xajax() { sEventName = 'on' + sEventName; } - + return sEventName; } - + // xajax.addHandler adds an event handler to an element this.addHandler = function(sElementId, sEvent, sFunctionName) { @@ -133,7 +133,7 @@ function Xajax() eval("this.$('"+sElementId+"').attachEvent('"+sAltEvent+"',"+sFunctionName+",false);"); } } - + // xajax.removeHandler removes an event handler from an element this.removeHandler = function(sElementId, sEvent, sFunctionName) { @@ -148,7 +148,7 @@ function Xajax() eval("this.$('"+sElementId+"').detachEvent('"+sAltEvent+"',"+sFunctionName+",false);"); } } - + // xajax.create creates a new child node under a parent this.create = function(sParentId, sTag, sId) { @@ -158,7 +158,7 @@ function Xajax() if (objParent) objParent.appendChild(objElement); } - + // xajax.insert inserts a new node before another node this.insert = function(sBeforeId, sTag, sId) { @@ -176,7 +176,7 @@ function Xajax() objElement.setAttribute('id',sId); objSibling.parentNode.insertBefore(objElement, objSibling.nextSibling); } - + this.getInput = function(sType, sName, sId) { var Obj; @@ -193,7 +193,7 @@ function Xajax() } return Obj; } - + // xajax.createInput creates a new input node under a parent this.createInput = function(sParentId, sType, sName, sId) { @@ -202,7 +202,7 @@ function Xajax() if (objParent && objElement) objParent.appendChild(objElement); } - + // xajax.insertInput creates a new input node before another node this.insertInput = function(sBeforeId, sType, sName, sId) { @@ -221,7 +221,7 @@ function Xajax() objSibling.parentNode.insertBefore(objElement, objSibling.nextSibling); } } - + // xajax.remove deletes an element this.remove = function(sId) { @@ -231,16 +231,16 @@ function Xajax() objElement.parentNode.removeChild(objElement); } } - + //xajax.replace searches for text in an attribute of an element and replaces it //with a different text this.replace = function(sId,sAttribute,sSearch,sReplace) { var bFunction = false; - + if (sAttribute == "innerHTML") sSearch = this.getBrowserHTML(sSearch); - + eval("var txt=this.$('"+sId+"')."+sAttribute); if (typeof txt == "function") { @@ -267,7 +267,7 @@ function Xajax() } } } - + // xajax.getFormValues() builds a query string XML message from the elements of a form object // * The first argument is the id of the form // * The second argument (optional) can be set to true if you want to submit disabled elements @@ -282,7 +282,7 @@ function Xajax() var prefix=""; if(arguments.length > 2) prefix = arguments[2]; - + if (typeof(frm) == "string") objForm = this.$(frm); else @@ -318,15 +318,15 @@ function Xajax() { sXml += name+"="+encodeURIComponent(formElements[i].value); } - } + } } } - + sXml +=""; - + return sXml; } - + // Generates an XML message that xajax can understand from a javascript object this.objectToXML = function(obj) { @@ -339,7 +339,7 @@ function Xajax() continue; if (obj[i] && typeof(obj[i]) == 'function') continue; - + var key = i; var value = obj[i]; if (value && typeof(value)=="object" && this.depth <= 50) @@ -348,9 +348,9 @@ function Xajax() value = this.objectToXML(value); this.depth--; } - + sXml += ""+key+""+value+""; - + } catch(e) { @@ -358,7 +358,7 @@ function Xajax() } } sXml += ""; - + return sXml; } @@ -394,7 +394,7 @@ function Xajax() } } return data; - } + } } this.loadingFunction = function(){}; @@ -473,7 +473,7 @@ function Xajax() { if (r.readyState != 4) return; - + if (r.status==200) { if (xajaxDebug) xajax.DebugMessage("Received:\n" + r.responseText); @@ -488,7 +488,7 @@ function Xajax() errorString += "\nYou have whitespace in your response."; alert(errorString); document.body.style.cursor = 'default'; - if (xajaxStatusMessages == true) window.status = 'Invalid XML response error'; + if (xajaxStatusMessages == true) window.status = 'Invalid XML response error'; } } else { @@ -498,9 +498,9 @@ function Xajax() alert(errorString); } document.body.style.cursor = 'default'; - if (xajaxStatusMessages == true) window.status = 'Invalid XML response error'; + if (xajaxStatusMessages == true) window.status = 'Invalid XML response error'; } - + delete r; r = null; } @@ -510,7 +510,7 @@ function Xajax() delete r; return true; } - + //Gets the text as it would be if it were being retrieved from //the innerHTML property in the current browser this.getBrowserHTML = function(html) @@ -526,11 +526,11 @@ function Xajax() } tmpXajax.innerHTML = html; var browserHTML = tmpXajax.innerHTML; - tmpXajax.innerHTML = ''; - + tmpXajax.innerHTML = ''; + return browserHTML; } - + // Tests if the new Data is the same as the extant data this.willChange = function(element, attribute, newData) { @@ -544,7 +544,7 @@ function Xajax() } elementObject = this.$(element); if (elementObject) { - var oldData; + var oldData; eval("oldData=this.$('"+element+"')."+attribute); if (newData !== oldData) return true; @@ -552,13 +552,13 @@ function Xajax() return false; } - + //Returns the source code of the page after it's been modified by xajax this.viewSource = function() { return ""+document.getElementsByTagName("HTML")[0].innerHTML+""; } - + //Process XML xajaxResponses returned from the request this.processResponse = function(xml) { @@ -569,7 +569,7 @@ function Xajax() xml = xml.documentElement; if (xml == null) return; - + var skipCommands = 0; for (var i=0; i0 ) { - + mostrar_aviso() setTimeout("ocultar_aviso()",7000); } @@ -84,39 +84,39 @@ function stateChanged() } function GetXmlHttpObject(handler) -{ +{ var objXmlHttp=null if (navigator.userAgent.indexOf("Opera")>=0) { objXmlHttp=new XMLHttpRequest() objXmlHttp.onload=handler - objXmlHttp.onerror=handler + objXmlHttp.onerror=handler return objXmlHttp } if (navigator.userAgent.indexOf("MSIE")>=0) - { + { var strName="Msxml2.XMLHTTP" if (navigator.appVersion.indexOf("MSIE 5.5")>=0) { strName="Microsoft.XMLHTTP" - } + } try - { + { objXmlHttp=new ActiveXObject(strName) - objXmlHttp.onreadystatechange=handler + objXmlHttp.onreadystatechange=handler return objXmlHttp - } + } catch(e) - { - alert("Error. Scripting for ActiveX might be disabled") - return - } - } + { + alert("Error. Scripting for ActiveX might be disabled") + return + } + } if (navigator.userAgent.indexOf("Mozilla")>=0) { objXmlHttp=new XMLHttpRequest() objXmlHttp.onload=handler - objXmlHttp.onerror=handler + objXmlHttp.onerror=handler return objXmlHttp - } -} + } +} diff --git a/main/newscorm/dtree.js b/main/newscorm/dtree.js index fa78064c02..5a4c1e5729 100644 --- a/main/newscorm/dtree.js +++ b/main/newscorm/dtree.js @@ -81,11 +81,11 @@ function dTree(objName) { inOrder : false } - + this.icon = { root : '../img/lp.gif', - + folder : '../img/folder.gif', folderOpen : '../img/folderopen.gif', @@ -523,7 +523,7 @@ dTree.prototype.closeAllChildren = function(node) { this.aNodes[n]._io = false; - this.closeAllChildren(this.aNodes[n]); + this.closeAllChildren(this.aNodes[n]); } diff --git a/main/newscorm/js/api_wrapper.js b/main/newscorm/js/api_wrapper.js index 7c2221c2fc..23666cbe1a 100644 --- a/main/newscorm/js/api_wrapper.js +++ b/main/newscorm/js/api_wrapper.js @@ -7,7 +7,7 @@ * @package scorm.js */ /** - * Initialisation of the SCORM API section. + * Initialisation of the SCORM API section. * Find the SCO functions (startTimer, computeTime, etc in the second section) * Find the Dokeos-proper functions (checkAnswers, etc in the third section) */ @@ -215,7 +215,7 @@ function doLMSSetValue(name, value) function doLMSCommit() { if(API == null) - { + { alert(errMsgLocate +"\nLMSCommit was not successful."); return "false"; } @@ -329,7 +329,7 @@ function convertTotalSeconds(ts) var strSec = new String(sec); var strWholeSec = strSec; var strFractionSec = ""; - + if (strSec.indexOf(".") != -1) { strWholeSec = strSec.substring(0, strSec.indexOf(".")); @@ -361,7 +361,7 @@ function convertTotalSeconds(ts) * Handles the use of the back button (saves data and closes SCO) */ function doBack() -{ +{ checkAnswers(true); doLMSSetValue( "cmi.core.exit", "suspend" ); computeTime(); @@ -451,7 +451,7 @@ function checkAnswers(interrupted) { interactionAnswers += idAnswer+'__|';// changed by isaac flores myScore +=questions_answers_ponderation[idQuestion][idAnswer]; - + /*for(k=0;k