var logLevel=4;var contextPath="";var ctx="";var childBrowserFunction;function registerChildBrowserFunction(a){childBrowserFunction=a}function openChildBrowser(a){try{top.window.plugins.childBrowser.showWebPage(a);debug("ChildBrowser OK")}catch(c){try{childBrowserFunction(a)}catch(b){log("ChildBrowser not Present "+b+" falling back to changing the location of the current page");document.location=a}}}function initialiseLogging(){jQuery.fn.log=function(b){try{if(console==null){$("#logging").append(b+"
")}else{console.log(b,this)}}catch(a){}return this};if($("#logging").length==0){$("body").prepend("");if(getUrlParameter("debug")=="true"||getUrlParameter("debug")=="1"){$("#logging").show()}$(window).keypress(function(a){if(a!=null&&a.which==93&&a.ctrlKey){$("#logging").toggle()}else{if(window.event!=null&&window.event.keyCode==29&&window.event.ctrlKey==true){$("#logging").toggle()}else{}}});$("#logging").bind("tap",function(){$("#logging").hide()})}}function getStyleProp(a,e){var c=$("
");$(document.body).append(c);c.addClass(a);var b=c.css(e);c.remove();return b}function getStylePropAsInt(b,c){var a=getStyleProp(b,c);return parseInt(a.substring(0,a.indexOf("px")))}function stripUrl(d){var c=d.toLowerCase().indexOf("url(");var a=d.indexOf(")",c);if(c>=0&&a>c){var b=d.substring(c+4,a);if(b.indexOf('"')>=0||b.indexOf('"')){b=b.substring(1,b.length-1)}return b}else{return d}}function error(a){if(logLevel>=1){log(a)}}function warn(a){if(logLevel>=2){log(a)}}function info(a){if(logLevel>=3){log(a)}}function trace(a){if(logLevel>=5){log(a)}}function debug(a){if(logLevel>=4){log(a)}}function log(b){if(logLevel>0){try{$("").log(b)}catch(a){}if($("#logging").html()!=null&&$("#logging").html().length>20000){$("#logging").html("")}$("#logging").append(b+"
")}}function removeCSS(a){}function loadCSS(b){var a=document.getElementsByTagName("head")[0];$(document.createElement("link")).attr({type:"text/css",href:b,rel:"stylesheet",media:"screen"}).appendTo(a)}function isIDevice(){if(isIPad()||isIPod()||isIPhone()){return true}else{return false}}function isIPad(){try{return navigator.platform=="iPad"}catch(a){return navigator.userAgent.match(/iPad/i)}}function isIPod(){try{return navigator.platform=="iPod"}catch(a){return navigator.userAgent.match(/iPod/i)}}function isIPhone(){try{return navigator.platform=="iPhone"}catch(a){return navigator.userAgent.match(/iPhone/i)}}function isIE(){return navigator.appName=="Microsoft Internet Explorer"}function isAndroid21(){try{return navigator.userAgent.match(/Android 2.1/)}catch(a){return false}}function isAndroid23(){try{return navigator.userAgent.match(/Android 2.3/)}catch(a){return false}}function loadjscssfile(a,b){if(b=="js"){var c=document.createElement("script");c.setAttribute("type","text/javascript");c.setAttribute("src",a)}else{if(b=="css"){var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",a)}}if(typeof c!="undefined"){document.getElementsByTagName("head")[0].appendChild(c)}}function hsv2rgb(h,d,c){var e,m,k,g,j,b,a,l;h%=360;if(c==0){return({r:0,g:0,v:0})}d/=100;c/=100;h/=60;g=Math.floor(h);j=h-g;b=c*(1-d);a=c*(1-(d*j));l=c*(1-(d*(1-j)));if(g==0){e=c;m=l;k=b}else{if(g==1){e=a;m=c;k=b}else{if(g==2){e=b;m=c;k=l}else{if(g==3){e=b;m=a;k=c}else{if(g==4){e=l;m=b;k=c}else{if(g==5){e=c;m=b;k=a}}}}}}e=Math.floor(e*255);m=Math.floor(m*255);k=Math.floor(k*255);return({r:e,g:m,b:k})}function rgb2hsv(c,k,h){var j,b,g,d,e,a,b;c/=255;k/=255;h/=255;j=Math.min(Math.min(c,k),h);b=Math.max(Math.max(c,k),h);if(j==b){return({h:undefined,s:0,v:b*100})}g=(c==j)?k-h:((k==j)?h-c:c-k);d=(c==j)?3:((k==j)?5:1);e=Math.floor((d-g/(b-j))*60)%360;a=Math.floor(((b-j)/b)*100);b=Math.floor(b*100);return({h:e,s:a,v:b})}function RGBtoHex(b,a,c){return toHex(b)+toHex(a)+toHex(c)}function toHex(a){if(a==null){return"00"}a=parseInt(a);if(a==0||isNaN(a)){return"00"}a=Math.max(0,a);a=Math.min(a,255);a=Math.round(a);return"0123456789ABCDEF".charAt((a-a%16)/16)+"0123456789ABCDEF".charAt(a%16)}function getStackTraceAsStr(a){var b="Error:
";b+=a.message+"
";if(a.stackTrace!=null){for(i in a.stackTrace){b+=a.stackTrace[i].className+"."+a.stackTrace[i].methodName+":"+a.stackTrace[i].lineNumber+"
"}}else{if(a.lineNumber!=null&&a.message!=null){b="Line:"+a.lineNumber+"
"+a.message}else{b="ERROR "+a.message}}b+="
";return b}var perfomanceLevel;function getPerformanceLevel(){if(perfomanceLevel==null){var a=0;var b=new Date().getTime();while(new Date().getTime()-b<20){Math.random();a++}perfomanceLevel=a/1000;info("perfomanceLevel="+perfomanceLevel)}return perfomanceLevel}function getDocumentSummary(){try{var d="";var a;var c=[];for(i=0;i"}return d}catch(b){showWarning(b)}}function getCookie(b){var a=document.cookie.match("(^|;) ?"+b+"=([^;]*)(;|$)");if(a){return(unescape(a[2]))}else{return""}}function setCookie(c,e,a,g,d,f){var b=c+"="+escape(e);if(a){b+="; expires="+a.toGMTString()}if(g){b+="; path="+escape(g)}if(d){b+="; domain="+escape(d)}if(f){b+="; secure"}document.cookie=b}function addWiggleAnimation1(a,c,b){if(c==null){c=8}if(b==null){b=2000}a.animate({top:"-="+c+"px"},50).animate({top:"+="+(c+2)+"px"},50).animate({top:"-=2px"},25,function(){setTimeout(function(){addWiggleAnimation1(a)},2000)})}function addWiggleAnimation2(a,c,b){if(c==null){c=8}if(b==null){b=2000}a.animate({top:"-="+c+"px"},25).animate({top:"+="+(c*2)+"px"},50).animate({top:"-="+(c*2)+"px"},50).animate({top:"+="+(c*2)+"px"},50).animate({top:"-="+(c*2)+"px"},50).animate({top:"+="+(c*2)+"px"},50).animate({top:"-="+(c*2)+"px"},50).animate({top:"+="+(c)+"px"},25,function(){setTimeout(function(){addWiggleAnimation2(a)},2000)})}function addGlareAnimation(a){var c=$("");a.append(c);var b=c.height();c.css("top","-"+b+"px");c.show();c.animate({top:"+="+b*2+"px"},1300,function(){c.remove();setTimeout(function(){addGlareAnimation(a)},5000)})}function addPulse(f,e){if(e==null){e=0.75}var c=e*20+"px";var b=(e*20)*2+"px";var j=f.attr("data-margin-left");var d=f.attr("data-margin-right");var g=f.attr("data-height");if(j==null){j=f.css("margin-left");d=f.css("margin-right");g=f.css("height");f.attr("data-margin-left",j);f.attr("data-margin-right",d);f.attr("data-height",g)}f.animate({"margin-left":"-="+c,height:"+="+b,"margin-top":"-="+c},1000).animate({"margin-left":"+="+c,height:"-="+b,"margin-top":"+="+c},1000,function(){f.css("margin-left",j);f.css("margin-right",d);f.css("height",g);setTimeout(function(){addPulse(f,e)},3000)})}function clickEffect(b){var a=0.05;b.animate({"margin-left":"-="+a+"em","margin-top":"-="+a+"em"},0).animate({"margin-left":"+="+a+"em","margin-top":"+="+a+"em"},50,function(){b.css("margin-left","auto");b.css("margin-top","auto")})}function addFlash(a){a.css("background","#0000ff");a.animate({"background-color":"#ff0000"},500).animate({"background-color":"#00ff00"},500).animate({"background-color":"#0000ff"},500,function(){addFlash(a)})}function slideOnThenOffAnimation(b,c){var a=b.css("left");b.css("left","-15em");b.show();b.animate({left:a},300,function(){setTimeout(function(){b.animate({left:"+=15em"},300,function(){b.hide();c()})},1500)})}function myLoad(c,b,a){$.ajax({url:c,data:{},success:function(f){f=f.replace(/