Commit 3a401c1f authored by Claudio Valerio's avatar Claudio Valerio

changed name

parent 5f48b68e
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/htmleditor"
version="1.1"
width="542"
height="350"
ub:resizable="true">
<name>Html Editor</name>
<author href="http://www.getuniboard.com"
email="info@mnemis.com">Mnemis SA</author>
<description>Simple Html editor</description>
<content src="index.html"/>
</widget>
body {
font: 13px "Trebuchet MS", Arial, Verdana;
padding-top:0px;
color: gray;
}
a {
text-decoration:none;
color:#3C769D;
}
h1 a,
p em a {
display:block;
overflow:hidden;
text-indent:-1000px;
position:absolute;
top:0px; left:0px;
}
h1 a {
width:245px; height:85px;
top:28px;
}
p em a {
width:120px; height:28px;
left:30px;
}
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>markItUp! Universal markup editor</title>
<link rel="stylesheet" type="text/css" href="images/style.css" />
<script type="text/javascript" src="jquery.pack.js"></script>
<script type="text/javascript" src="languages.js"></script>
<script type="text/javascript" src="markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="markitup/sets/html/set.js"></script>
<link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" />
<link rel="stylesheet" type="text/css" href="markitup/sets/html/style.css" />
</head>
<body>
<script type="text/javascript" >
var lang = "";
if(window.sankore){
try{
lang = sankore.locale().substr(0,2);
sankoreLang[lang].welcome;
} catch(e){
lang = "en";
}
} else
lang = "en";
$(document).ready(function(){
$("#reset-btn").hide();
$('#markItUp').markItUp(mySettings);
$("#markItUp").width($(window).width()-100)
.height($(window).height()-80);
$('iframe').width($(window).width()-24)
.height($(window).height()-46);
if(window.sankore){
var html = window.sankore.preference("iHtml", sankoreLang[lang].welcome);
$("#markItUp").val(html);
};
$("#markItUp").keyup(function(){
if(window.sankore){
window.sankore.setPreference("iHtml", $("#markItUp").val());
}
});
$("li").mouseout(function(){
if(window.sankore){
window.sankore.setPreference("iHtml", $("#markItUp").val());
}
});
$("#reset-btn").click(function(){
$(this).data("hidden", true).hide();
$('textarea').show();
$('iframe').remove();
$("#fakebar").show();
$("#menu").show();
});
});
$(window).resize(function(){
$("#markItUp").width($(window).width()-100)
.height($(window).height()-80);
$('iframe').width($(window).width()-24)
.height($(window).height()-46);
$('#markItUpFooter').width($(window).width()-30);
$("#markitUp").html(sankoreLang[lang].welcome);
});
</script>
<div id='fakebar'></div>
<textarea id="markItUp" cols="80" rows="20">
Welcome to HTML EDITOR
</textarea>
<img id="reset-btn" src="images/bts.png" style="position:absolute; top:0; left:5"/>
</body>
</html>
/*
* jQuery 1.2.3 - New Wave Javascript
*
* Copyright (c) 2008 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
* $Rev: 4663 $
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i<M;i++)7((11=18[i])!=V)Q(L a 1p 11){7(b===11[a])6w;7(5c&&11[a]&&1o 11[a]=="3V"&&b[a]&&!11[a].15)b[a]=E.1s(b[a],11[a]);N 7(11[a]!=10)b[a]=11[a]}K b};L F="3N"+(1B 3v()).3L(),6t=0,5b={};L H=/z-?4X|86-?84|1w|6k|7Z-?1R/i;E.1s({7Y:J(a){1e.$=D;7(a)1e.3N=w;K E},1q:J(a){K!!a&&1o a!="25"&&!a.12&&a.1k!=1M&&/J/i.17(a+"")},3E:J(a){K a.1F&&!a.1h||a.28&&a.2i&&!a.2i.1h},5g:J(a){a=E.3g(a);7(a){L b=T.3S("6f")[0]||T.1F,1m=T.3s("1m");1m.U="1u/4m";7(E.14.1d)1m.1u=a;N 1m.38(T.5r(a));b.38(1m);b.34(1m)}},12:J(b,a){K b.12&&b.12.2E()==a.2E()},1T:{},O:J(c,d,b){c=c==1e?5b:c;L a=c[F];7(!a)a=c[F]=++6t;7(d&&!E.1T[a])E.1T[a]={};7(b!=10)E.1T[a][d]=b;K d?E.1T[a][d]:a},35:J(c,b){c=c==1e?5b:c;L a=c[F];7(b){7(E.1T[a]){2V E.1T[a][b];b="";Q(b 1p E.1T[a])1Q;7(!b)E.35(c)}}N{1S{2V c[F]}1X(e){7(c.52)c.52(F)}2V E.1T[a]}},R:J(c,a,b){7(b){7(c.M==10){Q(L d 1p c)7(a.1i(c[d],b)===S)1Q}N Q(L i=0,M=c.M;i<M;i++)7(a.1i(c[i],b)===S)1Q}N{7(c.M==10){Q(L d 1p c)7(a.1P(c[d],d,c[d])===S)1Q}N Q(L i=0,M=c.M,1A=c[0];i<M&&a.1P(1A,i,1A)!==S;1A=c[++i]){}}K c},1l:J(b,a,c,i,d){7(E.1q(a))a=a.1P(b,i);K a&&a.1k==51&&c=="2o"&&!H.17(d)?a+"2S":a},1t:{1b:J(c,b){E.R((b||"").23(/\\s+/),J(i,a){7(c.15==1&&!E.1t.3Y(c.1t,a))c.1t+=(c.1t?" ":"")+a})},1V:J(c,b){7(c.15==1)c.1t=b!=10?E.3y(c.1t.23(/\\s+/),J(a){K!E.1t.3Y(b,a)}).6a(" "):""},3Y:J(b,a){K E.33(a,(b.1t||b).3X().23(/\\s+/))>-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i<f.M;i++)7(f[i]!=V)2C[i].W.19=f[i]}7(k=="1w"&&d=="")d="1"}N 7(e.4n){L g=k.1r(/\\-(\\w)/g,J(a,b){K b.2E()});d=e.4n[k]||e.4n[g];7(!/^\\d+(2S)?$/i.17(d)&&/^\\d/.17(d)){L l=e.W.26,3K=e.3K.26;e.3K.26=e.4n.26;e.W.26=d||0;d=e.W.7f+"2S";e.W.26=l;e.3K.26=3K}}K d},4a:J(l,h){L k=[];h=h||T;7(1o h.3s==\'10\')h=h.2i||h[0]&&h[0].2i||T;E.R(l,J(i,d){7(!d)K;7(d.1k==51)d=d.3X();7(1o d=="25"){d=d.1r(/(<(\\w+)[^>]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+"></"+c+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>","</2k>"]||!f.1f("<9M")&&[1,"<73>","</73>"]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>","</1O>"]||!f.1f("<4v")&&[2,"<1O><1U>","</1U></1O>"]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>","</4v></1U></1O>"]||!f.1f("<7e")&&[2,"<1O><1U></1U><6V>","</6V></1O>"]||E.14.1d&&[1,"1x<1x>","</1x>"]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i<M;i++)a.1g(b[i]);N a=b.2K(0);K a},33:J(b,a){Q(L i=0,M=a.M;i<M;i++)7(a[i]==b)K i;K-1},37:J(a,b){7(E.14.1d){Q(L i=0;b[i];i++)7(b[i].15!=8)a.1g(b[i])}N Q(L i=0;b[i];i++)a.1g(b[i]);K a},57:J(a){L c=[],2r={};1S{Q(L i=0,M=a.M;i<M;i++){L b=E.O(a[i]);7(!2r[b]){2r[b]=P;c.1g(a[i])}}}1X(e){c=a}K c},3y:J(c,a,d){L b=[];Q(L i=0,M=c.M;i<M;i++)7(!d&&a(c[i],i)||d&&!a(c[i],i))b.1g(c[i]);K b},2c:J(d,a){L c=[];Q(L i=0,M=d.M;i<M;i++){L b=a(d[i],i);7(b!==V&&b!=10){7(b.1k!=1M)b=[b];c=c.71(b)}}K c}});L v=8Y.8W.2h();E.14={5K:(v.1D(/.+(?:8T|8S|8R|8O)[\\/: ]([\\d.]+)/)||[])[1],2d:/77/.17(v),2z:/2z/.17(v),1d:/1d/.17(v)&&!/2z/.17(v),48:/48/.17(v)&&!/(8L|77)/.17(v)};L y=E.14.1d?"6H":"75";E.1s({8I:!E.14.1d||T.6F=="79",46:{"Q":"8F","8E":"1t","4g":y,75:y,6H:y,3d:"3d",1t:"1t",1A:"1A",2Y:"2Y",3k:"3k",8C:"8B",2p:"2p",8A:"8z",3T:"3T",6C:"6C",28:"28",12:"12"}});E.R({6B:J(a){K a.1a},8y:J(a){K E.4u(a,"1a")},8x:J(a){K E.2Z(a,2,"2B")},8v:J(a){K E.2Z(a,2,"4t")},8u:J(a){K E.4u(a,"2B")},8t:J(a){K E.4u(a,"4t")},8s:J(a){K E.5i(a.1a.1C,a)},8r:J(a){K E.5i(a.1C)},6z:J(a){K E.12(a,"8q")?a.8o||a.8n.T:E.2I(a.3p)}},J(c,d){E.1n[c]=J(b){L a=E.2c(6,d);7(b&&1o b=="25")a=E.3e(b,a);K 6.2F(E.57(a))}});E.R({6y:"3t",8m:"6q",3o:"6o",8l:"5a",8k:"6S"},J(c,b){E.1n[c]=J(){L a=18;K 6.R(J(){Q(L i=0,M=a.M;i<M;i++)E(a[i])[b](6)})}});E.R({8j:J(a){E.1J(6,a,"");7(6.15==1)6.52(a)},8i:J(a){E.1t.1b(6,a)},8h:J(a){E.1t.1V(6,a)},8g:J(a){E.1t[E.1t.3Y(6,a)?"1V":"1b"](6,a)},1V:J(a){7(!a||E.1E(a,[6]).r.M){E("*",6).1b(6).R(J(){E.16.1V(6);E.35(6)});7(6.1a)6.1a.34(6)}},4x:J(){E(">*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K i<m[3]-0},88:J(a,i,m){K i>m[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i<T.4L.M;i++)7(T.4L[i].2Y){3z(18.3R,0);K}E.21()},S);7(E.14.2d){L a;(J(){7(E.2Q)K;7(T.39!="5V"&&T.39!="1y"){3z(18.3R,0);K}7(a===10)a=E("W, 7a[7A=7z]").M;7(T.4L.M!=a){3z(18.3R,0);K}E.21()})()}E.16.1b(1e,"3U",E.21)}E.R(("7y,7x,3U,7w,5d,4H,4V,7v,"+"7G,7u,7t,4P,4O,7s,2k,"+"58,7K,7q,7p,3a").23(","),J(i,b){E.1n[b]=J(a){K a?6.2j(b,a):6.1N(b)}});L I=J(a,c){L b=a.4S;2b(b&&b!=c)1S{b=b.1a}1X(3a){b=c}K b==c};E(1e).2j("4H",J(){E("*").1b(T).3w()});E.1n.1s({3U:J(g,d,c){7(E.1q(g))K 6.2j("3U",g);L e=g.1f(" ");7(e>=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i<a.M;i++)7(!a[i]())a.72(i--,1);7(!a.M){6I(E.3W);E.3W=V}},13)}},1G:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1G=P;6.45(0,6.2m());7(6.1l=="27"||6.1l=="1R")6.Y.W[6.1l]="8N";E(6.Y).1G()},1I:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1I=P;6.45(6.2m(),0)},30:J(a){L t=(1B 3v()).3L();7(a||t>6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{}))
\ No newline at end of file
var sankoreLang = {
"en":{
"enter_title": "Enter yuor title here...",
"welcome":"Welcome to HTML Editor",
"source":"Source",
"link":"Link",
"preview":"Preview",
"text_to_link":"Your text to link",
"alt_text":"Alternative text"
},
"ru":{
"enter_title": "Введите Ваш заголовок ...",
"welcome":"Добро пожаловать в HTML-редактор",
"source":"Источник",
"link":"Ссылка",
"preview":"Предпросмотр",
"text_to_link":"Текст ссылки",
"alt_text":"Альтернативный текст"
},
"fr":{
"enter_title": "Entrer le titre yuor ici ...",
"welcome":"Bienvenue sur HTML Editor",
"source":"Source",
"link":"Lien",
"preview":"Aperçu",
"text_to_link":"Votre texte à lier",
"alt_text":"Texte alternatif"
}
};
\ No newline at end of file
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.5
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
(function($) {
$.fn.markItUp = function(settings, extraSettings) {
var options, ctrlKey, shiftKey, altKey;
ctrlKey = shiftKey = altKey = false;
options = { id: '',
nameSpace: '',
root: '',
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
previewAutoRefresh: true,
previewPosition: 'after',
previewTemplatePath: '~/templates/preview.html',
previewParserPath: '',
previewParserVar: 'data',
resizeHandle: true,
beforeInsert: '',
afterInsert: '',
onEnter: {},
onShiftEnter: {},
onCtrlEnter: {},
onTab: {},
markupSet: [ { /* set */ } ]
};
$.extend(options, settings, extraSettings);
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
});
}
return this.each(function() {
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset,
clicked, hash, header, footer, previewWindow, template, iFrame, abort;
$$ = $(this);
textarea = this;
levels = [];
abort = false;
scrollPosition = caretPosition = 0;
caretOffset = -1;
options.previewParserPath = localize(options.previewParserPath);
options.previewTemplatePath = localize(options.previewTemplatePath);
// apply the computed path to ~/
function localize(data, inText) {
if (inText) {
return data.replace(/("|')~\//g, "$1"+options.root);
}
return data.replace(/^~\//, options.root);
}
// init and build editor
function init() {
id = ''; nameSpace = '';
if (options.id) {
id = 'id="'+options.id+'"';
} else if ($$.attr("id")) {
id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"';
}
if (options.nameSpace) {
nameSpace = 'class="'+options.nameSpace+'"';
}
$$.wrap('<div '+nameSpace+'></div>');
$$.wrap('<div '+id+' class="markItUp"></div>');
$$.wrap('<div class="markItUpContainer"></div>');
$$.addClass("markItUpEditor");
// add the header before the textarea
header = $('<div id="menu" class="markItUpHeader"></div>').insertBefore($$);
$(dropMenus(options.markupSet)).appendTo(header);
// add the footer after the textarea
footer = $('<div class="markItUpFooter"></div>').insertAfter($$);
// add the resize handle after textarea
if (options.resizeHandle === true && $.browser.safari !== true) {
resizeHandle = $('<div class="markItUpResizeHandle"></div>');
footer.insertAfter($$)
footer.bind("mousedown", function(e) {
var h = $$.height(), y = e.clientY, mouseMove, mouseUp;
mouseMove = function(e) {
$$.css("height", Math.max(20, e.clientY+h-y)+"px");
return false;
};
mouseUp = function(e) {
$("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp);
return false;
};
$("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp);
});
footer.append(resizeHandle);
}
// listen key events
$$.keydown(keyPressed).keyup(keyPressed);
// bind an event to catch external calls
$$.bind("insertion", function(e, settings) {
if (settings.target !== false) {
get();
}
if (textarea === $.markItUp.focused) {
markup(settings);
}
});
// remember the last focus
$$.focus(function() {
$.markItUp.focused = this;
});
}
// recursively build header with dropMenus from markupset
function dropMenus(markupSet) {
var ul = $('<ul></ul>'), i = 0;
$('li:hover > ul', ul).css('display', 'block');
$.each(markupSet, function() {
var button = this, t = '', title, li, j;
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
if (button.separator) {
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
} else {
i++;
for (j = levels.length -1; j >= 0; j--) {
t += levels[j]+"-";
}
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>')
.bind("contextmenu", function() { // prevent contextmenu on mac and allow ctrl+click
return false;
}).click(function() {
return false;
}).mouseup(function() {
if (button.call) {
eval(button.call)();
}
markup(button);
return false;
}).hover(function() {
$('> ul', this).show();
$(document).one('click', function() { // close dropmenu if click outside
$('ul ul', header).hide();
}
);
}, function() {
$('> ul', this).hide();
}
).appendTo(ul);
if (button.dropMenu) {
levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
}
}
});
levels.pop();
return ul;
}
// markItUp! markups
function magicMarkups(string) {
if (string) {
string = string.toString();
string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
function(x, a) {
var b = a.split('|!|');
if (altKey === true) {
return (b[1] !== undefined) ? b[1] : b[0];
} else {
return (b[1] === undefined) ? "" : b[0];
}
}
);
// [![prompt]!], [![prompt:!:value]!]
string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
function(x, a) {
var b = a.split(':!:');
if (abort === true) {
return false;
}
value = prompt(b[0], (b[1]) ? b[1] : '');
if (value === null) {
abort = true;
}
return value;
}
);
return string;
}
return "";
}
// prepare action
function prepare(action) {
if ($.isFunction(action)) {
action = action(hash);
}
return magicMarkups(action);
}
// build block to insert
function build(string) {
openWith = prepare(clicked.openWith);
placeHolder = prepare(clicked.placeHolder);
replaceWith = prepare(clicked.replaceWith);
closeWith = prepare(clicked.closeWith);
if (replaceWith !== "") {
block = openWith + replaceWith + closeWith;
} else if (selection === '' && placeHolder !== '') {
block = openWith + placeHolder + closeWith;
} else {
block = openWith + (string||selection) + closeWith;
}
return { block:block,
openWith:openWith,
replaceWith:replaceWith,
placeHolder:placeHolder,
closeWith:closeWith
};
}
// define markup to insert
function markup(button) {
var len, j, n, i;
hash = clicked = button;
get();
$.extend(hash, { line:"",
root:options.root,
textarea:textarea,
selection:(selection||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
altKey:altKey
}
);
// callbacks before insertion
prepare(options.beforeInsert);
prepare(clicked.beforeInsert);
if (ctrlKey === true && shiftKey === true) {
prepare(clicked.beforeMultiInsert);
}
$.extend(hash, { line:1 });
if (ctrlKey === true && shiftKey === true) {
lines = selection.split(/\r?\n/);
for (j = 0, n = lines.length, i = 0; i < n; i++) {
if ($.trim(lines[i]) !== '') {
$.extend(hash, { line:++j, selection:lines[i] } );
lines[i] = build(lines[i]).block;
} else {
lines[i] = "";
}
}
string = { block:lines.join('\n')};
start = caretPosition;
len = string.block.length + (($.browser.opera) ? n : 0);
} else if (ctrlKey === true) {
string = build(selection);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
len -= fixIeBug(string.block);
} else if (shiftKey === true) {
string = build(selection);
start = caretPosition;
len = string.block.length;
len -= fixIeBug(string.block);
} else {
string = build(selection);
start = caretPosition + string.block.length ;
len = 0;
start -= fixIeBug(string.block);
}
if ((selection === '' && string.replaceWith === '')) {
caretOffset += fixOperaBug(string.block);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
caretOffset = $$.val().substring(caretPosition, $$.val().length).length;
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition));
}
$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } );
if (string.block !== selection && abort === false) {
insert(string.block);
set(start, len);
} else {
caretOffset = -1;
}
get();
$.extend(hash, { line:'', selection:selection });
// callbacks after insertion
if (ctrlKey === true && shiftKey === true) {
prepare(clicked.afterMultiInsert);
}
prepare(clicked.afterInsert);
prepare(options.afterInsert);
// refresh preview if opened
if (previewWindow && options.previewAutoRefresh) {
refreshPreview();
}
// reinit keyevent
shiftKey = altKey = ctrlKey = abort = false;
}
// Substract linefeed in Opera
function fixOperaBug(string) {
if ($.browser.opera) {
return string.length - string.replace(/\n*/g, '').length;
}
return 0;
}
// Substract linefeed in IE
function fixIeBug(string) {
if ($.browser.msie) {
return string.length - string.replace(/\r*/g, '').length;
}
return 0;
}
// add markup
function insert(block) {
if (document.selection) {
var newSelection = document.selection.createRange();
newSelection.text = block;
} else {
$$.val($$.val().substring(0, caretPosition) + block + $$.val().substring(caretPosition + selection.length, $$.val().length));
}
}
// set a selection
function set(start, len) {
if (textarea.createTextRange){
// quick fix to make it work on Opera 9.5
if ($.browser.opera && $.browser.version >= 9.5 && len == 0) {
return false;
}
range = textarea.createTextRange();
range.collapse(true);
range.moveStart('character', start);
range.moveEnd('character', len);
range.select();
} else if (textarea.setSelectionRange ){
textarea.setSelectionRange(start, start + len);
}
textarea.scrollTop = scrollPosition;
textarea.focus();
}
// get the selection
function get() {
textarea.focus();
scrollPosition = textarea.scrollTop;
if (document.selection) {
selection = document.selection.createRange().text;
if ($.browser.msie) { // ie
var range = document.selection.createRange(), rangeCopy = range.duplicate();
rangeCopy.moveToElementText(textarea);
caretPosition = -1;
while(rangeCopy.inRange(range)) { // fix most of the ie bugs with linefeeds...
rangeCopy.moveStart('character');
caretPosition ++;
}
} else { // opera
caretPosition = textarea.selectionStart;
}
} else { // gecko
caretPosition = textarea.selectionStart;
selection = $$.val().substring(caretPosition, textarea.selectionEnd);
}
return selection;
}
// open preview window
function preview() {
$('textarea').hide();
if (!previewWindow || previewWindow.closed) {
if (options.previewInWindow) {
previewWindow = window.open('', 'preview', options.previewInWindow);
} else {
iFrame = $('<iframe frameborder="0" class="markItUpPreviewFrame"></iframe>');
if (options.previewPosition == 'after') {
iFrame.insertAfter(footer);
} else {
iFrame.insertBefore(header);
}
previewWindow = iFrame[iFrame.length-1].contentWindow || frame[iFrame.length-1];
}
} else if (altKey === true) {
if (iFrame) {
iFrame.remove();
}
previewWindow.close();
previewWindow = iFrame = false;
}
if (!options.previewAutoRefresh) {
refreshPreview();
}
}
// refresh Preview window
function refreshPreview() {
$('iframe').width($(window).width()-24)
.height($(window).height()-49);
if (previewWindow.document) {
try {
sp = previewWindow.document.documentElement.scrollTop
} catch(e) {
sp = 0;
}
previewWindow.document.open();
previewWindow.document.write(renderPreview());
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop = sp;
}
if (options.previewInWindow) {
previewWindow.focus();
}
}
function renderPreview() {
if (options.previewParserPath !== '') {
$.ajax( {
type: 'POST',
async: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
success: function(data) {
phtml = localize(data, 1);
}
} );
} else {
if (!template) {
$.ajax( {
async: false,
url: options.previewTemplatePath,
success: function(data) {
template = localize(data, 1);
}
} );
}
phtml = template.replace(/<!-- content -->/g, $$.val());
}
if(window.uniboard){
window.uniboard.setPreference("html", $('textarea').val());
};
$("#fakebar").hide();
$("#menu").hide();
$("#reset-btn").fadeIn(500).data("hidden", false)
.animate({
top:-12
},1500)
.mouseover(function(){
$(this).css({
top:0
});
})
.mouseout(function(){
$(this).css({
top:-12
});
if($(this).data("hidden")){
$(this).css({top:0})
};
});
return phtml;
}
// set keys pressed
function keyPressed(e) {
shiftKey = e.shiftKey;
altKey = e.altKey;
ctrlKey = (!(e.altKey && e.ctrlKey)) ? e.ctrlKey : false;
if (e.type === 'keydown') {
if (ctrlKey === true) {
li = $("a[accesskey="+String.fromCharCode(e.keyCode)+"]", header).parent('li');
if (li.length !== 0) {
ctrlKey = false;
li.triggerHandler('mouseup');
return false;
}
}
if (e.keyCode === 13 || e.keyCode === 10) { // Enter key
if (ctrlKey === true) { // Enter + Ctrl
ctrlKey = false;
markup(options.onCtrlEnter);
return options.onCtrlEnter.keepDefault;
} else if (shiftKey === true) { // Enter + Shift
shiftKey = false;
markup(options.onShiftEnter);
return options.onShiftEnter.keepDefault;
} else { // only Enter
markup(options.onEnter);
return options.onEnter.keepDefault;
}
}
if (e.keyCode === 9) { // Tab key
if (shiftKey == true || ctrlKey == true || altKey == true) { // Thx Dr Floob.
return false;
}
if (caretOffset !== -1) {
get();
caretOffset = $$.val().length - caretOffset;
set(caretOffset, 0);
caretOffset = -1;
return false;
} else {
markup(options.onTab);
return options.onTab.keepDefault;
}
}
}
}
init();
});
};
$.fn.markItUpRemove = function() {
return this.each(function() {
$$ = $(this).unbind().removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
}
);
};
$.markItUp = function(settings) {
var options = { target:false };
$.extend(options, settings);
if (options.target) {
return $(options.target).each(function() {
$(this).focus();
$(this).trigger('insertion', [options]);
});
} else {
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.5
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){$.24.T=3(f,g){E k,v,A,F;v=A=F=7;k={C:\'\',12:\'\',U:\'\',1j:\'\',1A:8,25:\'26\',1k:\'~/2Q/1B.1C\',1b:\'\',27:\'28\',1l:8,1D:\'\',1E:\'\',1F:{},1G:{},1H:{},1I:{},29:[{}]};$.V(k,f,g);2(!k.U){$(\'2R\').1c(3(a,b){1J=$(b).14(0).2S.2T(/(.*)2U\\.2V(\\.2W)?\\.2X$/);2(1J!==2a){k.U=1J[1]}})}4 G.1c(3(){E d,u,15,16,p,H,L,P,17,1m,w,1n,M,18;d=$(G);u=G;15=[];18=7;16=p=0;H=-1;k.1b=1d(k.1b);k.1k=1d(k.1k);3 1d(a,b){2(b){4 a.W(/("|\')~\\//g,"$1"+k.U)}4 a.W(/^~\\//,k.U)}3 2b(){C=\'\';12=\'\';2(k.C){C=\'C="\'+k.C+\'"\'}l 2(d.1K("C")){C=\'C="T\'+(d.1K("C").2c(0,1).2Y())+(d.1K("C").2c(1))+\'"\'}2(k.12){12=\'N="\'+k.12+\'"\'}d.1L(\'<z \'+12+\'></z>\');d.1L(\'<z \'+C+\' N="T"></z>\');d.1L(\'<z N="2Z"></z>\');d.2d("2e");17=$(\'<z N="30"></z>\').2f(d);$(1M(k.29)).1N(17);1m=$(\'<z N="31"></z>\').1O(d);2(k.1l===8&&$.X.32!==8){1l=$(\'<z N="33"></z>\').1O(d).1e("34",3(e){E h=d.2g(),y=e.2h,1o,1p;1o=3(e){d.2i("2g",35.36(20,e.2h+h-y)+"37");4 7};1p=3(e){$("1C").1P("2j",1o).1P("1q",1p);4 7};$("1C").1e("2j",1o).1e("1q",1p)});1m.2k(1l)}d.2l(1Q).38(1Q);d.1e("1R",3(e,a){2(a.1r!==7){14()}2(u===$.T.2m){Y(a)}});d.1f(3(){$.T.2m=G})}3 1M(b){E c=$(\'<Z></Z>\'),i=0;$(\'B:2n > Z\',c).2i(\'39\',\'q\');$.1c(b,3(){E a=G,t=\'\',1s,B,j;1s=(a.19)?(a.1S||\'\')+\' [3a+\'+a.19+\']\':(a.1S||\'\');19=(a.19)?\'2o="\'+a.19+\'"\':\'\';2(a.2p){B=$(\'<B N="3b">\'+(a.2p||\'\')+\'</B>\').1N(c)}l{i++;2q(j=15.6-1;j>=0;j--){t+=15[j]+"-"}B=$(\'<B N="2r 2r\'+t+(i)+\' \'+(a.3c||\'\')+\'"><a 3d="" \'+19+\' 1s="\'+1s+\'">\'+(a.1S||\'\')+\'</a></B>\').1e("3e",3(){4 7}).2s(3(){4 7}).1q(3(){2(a.2t){3f(a.2t)()}Y(a);4 7}).2n(3(){$(\'> Z\',G).3g();$(D).3h(\'2s\',3(){$(\'Z Z\',17).2u()})},3(){$(\'> Z\',G).2u()}).1N(c);2(a.2v){15.3i(i);$(B).2d(\'3j\').2k(1M(a.2v))}}});15.3k();4 c}3 2w(c){2(c){c=c.3l();c=c.W(/\\(\\!\\(([\\s\\S]*?)\\)\\!\\)/g,3(x,a){E b=a.1T(\'|!|\');2(F===8){4(b[1]!==2x)?b[1]:b[0]}l{4(b[1]===2x)?"":b[0]}});c=c.W(/\\[\\!\\[([\\s\\S]*?)\\]\\!\\]/g,3(x,a){E b=a.1T(\':!:\');2(18===8){4 7}1U=3m(b[0],(b[1])?b[1]:\'\');2(1U===2a){18=8}4 1U});4 c}4""}3 I(a){2($.3n(a)){a=a(P)}4 2w(a)}3 1g(a){J=I(L.J);1a=I(L.1a);Q=I(L.Q);O=I(L.O);2(Q!==""){q=J+Q+O}l 2(m===\'\'&&1a!==\'\'){q=J+1a+O}l{q=J+(a||m)+O}4{q:q,J:J,Q:Q,1a:1a,O:O}}3 Y(a){E b,j,n,i;P=L=a;14();$.V(P,{1t:"",U:k.U,u:u,m:(m||\'\'),p:p,v:v,A:A,F:F});I(k.1D);I(L.1D);2(v===8&&A===8){I(L.3o)}$.V(P,{1t:1});2(v===8&&A===8){R=m.1T(/\\r?\\n/);2q(j=0,n=R.6,i=0;i<n;i++){2($.3p(R[i])!==\'\'){$.V(P,{1t:++j,m:R[i]});R[i]=1g(R[i]).q}l{R[i]=""}}o={q:R.3q(\'\\n\')};11=p;b=o.q.6+(($.X.1V)?n:0)}l 2(v===8){o=1g(m);11=p+o.J.6;b=o.q.6-o.J.6-o.O.6;b-=1u(o.q)}l 2(A===8){o=1g(m);11=p;b=o.q.6;b-=1u(o.q)}l{o=1g(m);11=p+o.q.6;b=0;11-=1u(o.q)}2((m===\'\'&&o.Q===\'\')){H+=1W(o.q);11=p+o.J.6;b=o.q.6-o.J.6-o.O.6;H=d.K().1h(p,d.K().6).6;H-=1W(d.K().1h(0,p))}$.V(P,{p:p,16:16});2(o.q!==m&&18===7){2y(o.q);1X(11,b)}l{H=-1}14();$.V(P,{1t:\'\',m:m});2(v===8&&A===8){I(L.3r)}I(L.1E);I(k.1E);2(w&&k.1A){1Y()}A=F=v=18=7}3 1W(a){2($.X.1V){4 a.6-a.W(/\\n*/g,\'\').6}4 0}3 1u(a){2($.X.2z){4 a.6-a.W(/\\r*/g,\'\').6}4 0}3 2y(a){2(D.m){E b=D.m.1Z();b.2A=a}l{d.K(d.K().1h(0,p)+a+d.K().1h(p+m.6,d.K().6))}}3 1X(a,b){2(u.2B){2($.X.1V&&$.X.3s>=9.5&&b==0){4 7}1i=u.2B();1i.3t(8);1i.2C(\'21\',a);1i.3u(\'21\',b);1i.3v()}l 2(u.2D){u.2D(a,a+b)}u.1v=16;u.1f()}3 14(){u.1f();16=u.1v;2(D.m){m=D.m.1Z().2A;2($.X.2z){E a=D.m.1Z(),1w=a.3w();1w.3x(u);p=-1;3y(1w.3z(a)){1w.2C(\'21\');p++}}l{p=u.2E}}l{p=u.2E;m=d.K().1h(p,u.3A)}4 m}3 1B(){2(!w||w.3B){2(k.1j){w=3C.2F(\'\',\'1B\',k.1j)}l{M=$(\'<2G N="3D"></2G>\');2(k.25==\'26\'){M.1O(1m)}l{M.2f(17)}w=M[M.6-1].3E||3F[M.6-1]}}l 2(F===8){2(M){M.3G()}w.2H();w=M=7}2(!k.1A){1Y()}}3 1Y(){2(w.D){3H{22=w.D.2I.1v}3I(e){22=0}w.D.2F();w.D.3J(2J());w.D.2H();w.D.2I.1v=22}2(k.1j){w.1f()}}3 2J(){2(k.1b!==\'\'){$.2K({2L:\'3K\',2M:7,2N:k.1b,28:k.27+\'=\'+3L(d.K()),2O:3(a){23=1d(a,1)}})}l{2(!1n){$.2K({2M:7,2N:k.1k,2O:3(a){1n=1d(a,1)}})}23=1n.W(/<!-- 3M -->/g,d.K())}4 23}3 1Q(e){A=e.A;F=e.F;v=(!(e.F&&e.v))?e.v:7;2(e.2L===\'2l\'){2(v===8){B=$("a[2o="+3N.3O(e.1x)+"]",17).1y(\'B\');2(B.6!==0){v=7;B.3P(\'1q\');4 7}}2(e.1x===13||e.1x===10){2(v===8){v=7;Y(k.1H);4 k.1H.1z}l 2(A===8){A=7;Y(k.1G);4 k.1G.1z}l{Y(k.1F);4 k.1F.1z}}2(e.1x===9){2(A==8||v==8||F==8){4 7}2(H!==-1){14();H=d.K().6-H;1X(H,0);H=-1;4 7}l{Y(k.1I);4 k.1I.1z}}}}2b()})};$.24.3Q=3(){4 G.1c(3(){$$=$(G).1P().3R(\'2e\');$$.1y(\'z\').1y(\'z.T\').1y(\'z\').Q($$)})};$.T=3(a){E b={1r:7};$.V(b,a);2(b.1r){4 $(b.1r).1c(3(){$(G).1f();$(G).2P(\'1R\',[b])})}l{$(\'u\').2P(\'1R\',[b])}}})(3S);',62,241,'||if|function|return||length|false|true|||||||||||||else|selection||string|caretPosition|block||||textarea|ctrlKey|previewWindow|||div|shiftKey|li|id|document|var|altKey|this|caretOffset|prepare|openWith|val|clicked|iFrame|class|closeWith|hash|replaceWith|lines||markItUp|root|extend|replace|browser|markup|ul||start|nameSpace||get|levels|scrollPosition|header|abort|key|placeHolder|previewParserPath|each|localize|bind|focus|build|substring|range|previewInWindow|previewTemplatePath|resizeHandle|footer|template|mouseMove|mouseUp|mouseup|target|title|line|fixIeBug|scrollTop|rangeCopy|keyCode|parent|keepDefault|previewAutoRefresh|preview|html|beforeInsert|afterInsert|onEnter|onShiftEnter|onCtrlEnter|onTab|miuScript|attr|wrap|dropMenus|appendTo|insertAfter|unbind|keyPressed|insertion|name|split|value|opera|fixOperaBug|set|refreshPreview|createRange||character|sp|phtml|fn|previewPosition|after|previewParserVar|data|markupSet|null|init|substr|addClass|markItUpEditor|insertBefore|height|clientY|css|mousemove|append|keydown|focused|hover|accesskey|separator|for|markItUpButton|click|call|hide|dropMenu|magicMarkups|undefined|insert|msie|text|createTextRange|moveStart|setSelectionRange|selectionStart|open|iframe|close|documentElement|renderPreview|ajax|type|async|url|success|trigger|templates|script|src|match|jquery|markitup|pack|js|toUpperCase|markItUpContainer|markItUpHeader|markItUpFooter|safari|markItUpResizeHandle|mousedown|Math|max|px|keyup|display|Ctrl|markItUpSeparator|className|href|contextmenu|eval|show|one|push|markItUpDropMenu|pop|toString|prompt|isFunction|beforeMultiInsert|trim|join|afterMultiInsert|version|collapse|moveEnd|select|duplicate|moveToElementText|while|inRange|selectionEnd|closed|window|markItUpPreviewFrame|contentWindow|frame|remove|try|catch|write|POST|encodeURIComponent|content|String|fromCharCode|triggerHandler|markItUpRemove|removeClass|jQuery'.split('|'),0,{}))
\ No newline at end of file
markItUp! 1.1.5
CHANGE LOG
markItUp! 1.1.5 2009-05-01
- Modified: http://drupal.org/project/wysiwyg compatibility
- Modified: Alt/Ctrl/Alt+Tab are now disabled
markItUp! 1.1.4 2008-12-03
- Fixed: Extra quote deleted line 95
markItUp! 1.1.3 2008-09-12
- Fixed: IE7 preview problem
markItUp! 1.1.2 2008-07-17
- Fixed: Quick fix for Opera 9.5 caret position problem after insertion
markItUp! 1.1.1 2008-06-02
- Fixed: Key events status are passed to callbacks properly
- Improved: ScrollPosition is kept in the preview when its refreshed
markItUp! 1.1.0 2008-05-04
- Modified: Textarea's id is no more moved to the main container
- Modified: NameSpace Span become a Div to remain strict
- Added: Relative path to the script is computed
- Added: Relative path to the script passed to callbacks
- Added: Global instance ID property
- Added: $(element).markItUpRemove() to remove markItUp!
- Added: Resize handle is now optional with resizeHandle property
- Added: Property previewInWindow is added and accept window parameter
- Added: Property previewPosition is added
- Modified: Resize handle is no more displayed in Safari to avoid repetition with the native handle
- Modified: Property previewIframeRefresh become previewAutorefresh
- Modified: Built-in Html Preview call a template file
- Improved: Autorefreshing is now apply for preview in window too
- Improved: Cancel button in prompt window cancel now the whole insertion process
- Improved: Cleaner markItUp! code added to the DOM
- Removed: Depreciated preview properties as previewBaseUrl, previewCharset, previewCssPath, previewBodyId, previewBodyClassName
- Removed: Property previewIframe not longer exists
- Fixed: "Magic markups" works with line feeds
- Fixed: Key events are initialized after insertion
- Fixed: Internet Explorer line feed offset bug
- Fixed: Shortcut keys on Mac OS
- Fixed: Ctrl+click works and doesn't open Mac context menu anymore
- Fixed: Ctrl+click works and doesn't open the page in a new tab anymore
- Fixed: Minor Css modifications
markItUp! 1.0.3 2008-04-04
- Fixed: IE7 Preview empty baseurl problem
- Fixed: IE7 external targeted insertion
- Added: Property scrollPosition is passed to callbacks functions
markItUp! 1.0.2 2008-03-31
- Fixed: IE7 Html preview problems
- Fixed: Selection is kept if nothing is inserted
- Improved: Code minified
markItUp! 1.0.1 2008-03-21
- Removed: Global PlaceHolder
- Modified: Property previewCharset is setted to "utf-8" by default
markItUp! 1.0.0 2008-03-01
- First public release
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
mySettings = {
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'},
onTab: {keepDefault:false, replaceWith:' '},
markupSet: [
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
{separator:'---------------' },
{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
{separator:'---------------' },
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name:'Preview', className:'preview', call:'preview'}
]
}
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp .markItUpButton1 a {
background-image:url(images/bold.png);
}
.markItUp .markItUpButton2 a {
background-image:url(images/italic.png);
}
.markItUp .markItUpButton3 a {
background-image:url(images/stroke.png);
}
.markItUp .markItUpButton4 a {
background-image:url(images/picture.png);
}
.markItUp .markItUpButton5 a {
background-image:url(images/link.png);
}
.markItUp .markItUpButton6 a {
background-image:url(images/clean.png);
}
.markItUp .preview a {
background-image:url(images/preview.png);
}
\ No newline at end of file
Markup language:
Html
Description:
A basic Html markup set with Headings, Paragraph, Bold, Italic, Stroke through, Picture, Link, List, Clean button, Preview button.
Install:
- Download the zip file
- Unzip it in your markItUp! sets folder
- Modify your JS link to point at this set.js
- Modify your CSS link to point at this style.css
\ No newline at end of file
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
var lang = "";
if(window.sankore){
try{
lang = sankore.locale().substr(0,2);
sankoreLang[lang].welcome;
} catch(e){
lang = "en";
}
} else
lang = "en";
mySettings = {
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'},
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>\n'},
onTab: {keepDefault:false, openWith:' '},
markupSet: [
{name:'Heading 1', key:'1', openWith:'<h1(!( class="[![Class]!]")!)>', closeWith:'</h1>', placeHolder:sankoreLang[lang].enter_title},
{name:'Heading 2', key:'2', openWith:'<h2(!( class="[![Class]!]")!)>', closeWith:'</h2>', placeHolder:sankoreLang[lang].enter_title},
{name:'Heading 3', key:'3', openWith:'<h3(!( class="[![Class]!]")!)>', closeWith:'</h3>', placeHolder:sankoreLang[lang].enter_title},
{name:'Heading 4', key:'4', openWith:'<h4(!( class="[![Class]!]")!)>', closeWith:'</h4>', placeHolder:sankoreLang[lang].enter_title},
{name:'Heading 5', key:'5', openWith:'<h5(!( class="[![Class]!]")!)>', closeWith:'</h5>', placeHolder:sankoreLang[lang].enter_title},
{name:'Heading 6', key:'6', openWith:'<h6(!( class="[![Class]!]")!)>', closeWith:'</h6>', placeHolder:sankoreLang[lang].enter_title},
{name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>'},
{separator:'---------------'},
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)'},
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)'},
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>'},
{separator:'---------------'},
{name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n'},
{name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n'},
{name:'Li', openWith:'<li>', closeWith:'</li>'},
{separator:'---------------'},
{name:'Picture', key:'P', replaceWith:'<img src="[![' + sankoreLang[lang].source + ':!:http://]!]" alt="[![' + sankoreLang[lang].alt_text + ']!]" />'},
{name:'Link', key:'L', openWith:'<a target="_blank" href="[![' + sankoreLang[lang].link + ':!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:sankoreLang[lang].text_to_link},
{separator:'---------------'},
//{name:'Editor', className:'clean', replaceWith:function() { $('textarea').show(); $('iframe').remove();} },
{name:'', className:'preview', call:'preview'}
]
}
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp .markItUpButton1 a {
background-image:url(images/h1.png);
background-repeat:no-repeat;
}
.markItUp .markItUpButton2 a {
background-image:url(images/h2.png);
background-repeat:no-repeat;
}
.markItUp .markItUpButton3 a {
background-image:url(images/h3.png);
background-repeat:no-repeat;
}
.markItUp .markItUpButton4 a {
background-image:url(images/h4.png);
background-repeat:no-repeat;
}
.markItUp .markItUpButton5 a {
background-repeat:no-repeat;
background-image:url(images/h5.png);
}
.markItUp .markItUpButton6 a {
background-repeat:no-repeat;
background-image:url(images/h6.png);
}
.markItUp .markItUpButton7 a {
background-repeat:no-repeat;
background-image:url(images/paragraph.png);
}
.markItUp .markItUpButton8 a {
background-repeat:no-repeat;
background-image:url(images/bold.png);
}
.markItUp .markItUpButton9 a {
background-repeat:no-repeat;
background-image:url(images/italic.png);
}
.markItUp .markItUpButton10 a {
background-repeat:no-repeat;
background-image:url(images/stroke.png);
}
.markItUp .markItUpButton11 a {
background-repeat:no-repeat;
background-image:url(images/list-bullet.png);
}
.markItUp .markItUpButton12 a {
background-repeat:no-repeat;
background-image:url(images/list-numeric.png);
}
.markItUp .markItUpButton13 a {
background-repeat:no-repeat;
background-image:url(images/list-item.png);
}
.markItUp .markItUpButton14 a {
background-repeat:no-repeat;
background-image:url(images/picture.png);
}
.markItUp .markItUpButton15 a {
background-repeat:no-repeat;
background-image:url(images/link.png);
}
.markItUp .preview a {
background-repeat:no-repeat;
margin-top:-2px;
width:46px;
height:20px;
background-image:url(images/preview.png);
}
\ No newline at end of file
Skin:
MacOSX inspired look & feel
Install:
- Download the zip file
- Unzip it in your markItUp! skins folder
- Modify your CSS link to point at this skin
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
body {
/* background-color:#3875D7;*/
}
.markItUp {
background-color:#3875D7;
border:1px solid #3C769D;
padding:13px;
}
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:670px;
margin:5px 0 5px 0;
}
.markItUpContainer {
width:670px;
font:11px Verdana, Arial, Helvetica, sans-serif;
background-image:url(images/bg-container.png);
}
.markItUpEditor {
font:12px 'Courier New', Courier, monospace;
padding:5px;
margin:0px 11px 0px 11px;
width:640px;
height:320px;
clear:both; display:block;
line-height:18px;
overflow:auto;
border:0px solid white;
}
.markItUpPreviewFrame {
overflow:auto;
background-color:#FFFFFF;
width:99.9%;
height:350px;
margin:5px 0;
}
.markItUpHeader {
width:650px;
padding:15px 0px 0px 20px;
height:25px;
background-image:url(images/bg-header.png);
}
.markItUpFooter {
width:670px;
height:25px;
background-image:url(images/bg-footer.png);
padding-bottom:10px;
}
.markItUpResizeHandle {
margin:0px 12px 5px auto;
overflow:hidden;
width:12px; height:12px;
position:relative;
background-image:url(images/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#FFF;
border:1px solid #000;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #000;
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#FFF url(images/submenu.png) no-repeat 100% 50%;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#3875D7;
}
\ No newline at end of file
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
iframe {
border: 0px solid #ffffff;
}
.markItUp {
width:97%;
margin:5px 10px 5px 5px;
border:5px solid #F5F5F5;
}
.markItUpContainer {
border:1px solid #3C769D;
background:#FFF url(images/bg-container.png) repeat-x top left;
padding:5px 5px 2px 5px;
font:11px Verdana, Arial, Helvetica, sans-serif;
}
.markItUpEditor {
width: 100%;
font:12px 'Courier New', Courier, monospace;
padding:5px 5px 5px 15px;
border:3px solid #3C769D;
width:643px;
height:320px;
background-repeat:no-repeat;
clear:both; display:block;
line-height:18px;
overflow:auto;
}
.markItUpPreviewFrame {
overflow:auto;
width:99.9%;
height:300px;
margin:0px 0;
}
.markItUpFooter {
width:100%;
cursor:n-resize;
}
.markItUpResizeHandle {
overflow:hidden;
width:22px; height:5px;
margin-left:auto;
margin-right:auto;
background-image:url(images/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li ul{
display:none;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#F5F5F5;
border:1px solid #3C769D;
height:inherit;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #3C769D;
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#F5F5F5 url(images/submenu.png) no-repeat 100% 50%;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#3C769D;
}
/***************************************************************************************/
.html .markItUpEditor {
background-image:url(images/bg-editor-html.png);
}
.markdown .markItUpEditor {
background-image:url(images/bg-editor-markdown.png);
}
.textile .markItUpEditor {
background-image:url(images/bg-editor-textile.png);
}
.bbcode .markItUpEditor {
background-image:url(images/bg-editor-bbcode.png);
}
.wiki .markItUpEditor,
.dotclear .markItUpEditor {
background-image:url(images/bg-editor-wiki.png);
}
\ No newline at end of file
body {
font:70% Verdana, Arial, Helvetica, sans-serif;
color: black;
}
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>markItUp! preview template</title>
<link rel="stylesheet" type="text/css" href="~/templates/preview.css" />
</head>
<body>
<!-- content -->
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="Traceur de fonctions mathématiques en JavaScript"/>
<meta name="author" content="Yannick Vessaz"/>
<meta name="revised" content="2010/09/25"/>
<title>Graphics</title>
<link rel="stylesheet" type="text/css" href="Style/default.css"/>
<script type="text/javascript" src="JavaScript/ColorPicker.js"></script>
<script type="text/javascript" src="JavaScript/Interface.js"></script>
<script type="text/javascript" src="JavaScript/Outils.js"></script>
<script type="text/javascript" src="JavaScript/AffichageStandard.js"></script>
<script type="text/javascript" src="JavaScript/Affichage3D.js"></script>
<script type="text/javascript" src="JavaScript/AffichageUniboard.js"></script>
<script type="text/javascript" src="JavaScript/AffichageXPM.js"></script>
<script type="text/javascript" src="JavaScript/languages.js"></script>
<script type="text/javascript" src="JavaScript/Etude.js"></script>
<script type="text/javascript" src="JavaScript/Sauvegardes.js"></script>
<script src="JavaScript/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="JavaScript/jquery.disable.text.select.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
// --- Variables nécessaires au fonctionnement du widget ---
var lang = ""; //locale language
var loadingFlag = false
var largeur = 500
var hauteur = 400
var graphique = ""
var image = ""
var tableau = new Array()
var ligne = new Array()
var j = 0
var interdit = new Array(";", "interdit", "'", '"', "eval", "new", "sankore", "=", "document", "window", "alert")
var menuActuel = ""
var mouseDown = false
var outil = "point"
var pointX = new Array()
var pointY = new Array()
var pente = new Array()
var pente2 = new Array()
var precision = 0.02
var couleurFonction = "rgb(193,255,0)"
var r = 255
var g = 0
var b = 0
var couleurEchelle = "rgba(255,255,255,0.8)"
var couleurGrille = "rgba(255,255,255,0.1)"
var couleurAxes = "rgba(0,0,0,0.5)"
var decalageX = 0
var decalageY = 0
var lineWidth = 3
if(window.sankore){
try{
lang = sankore.locale().substr(0,2);
sankoreLang[lang].display;
} catch(e){
lang = "en";
}
} else
lang = "en";
$(document).ready(function(){
if(window.sankore){
$("#inputEq").val(sankore.preference("functionData", ""));
$("#inputTeinte").val(sankore.preference("functionColor",""));
$("#inputValeur").val(sankore.preference("functionValue","0"));
$("#inputSaturation").val(sankore.preference("functionSaturation","0"));
$("#inputRouge").val(sankore.preference("functionRed","255"));
$("#inputVert").val(sankore.preference("functionGreen","0"));
$("#inputBleu").val(sankore.preference("functionBlue","0"));
$("#inputOpacity").val(sankore.preference("functionOpacity","1"));
idColor = sankore.preference("functionColorId","");
actualiserGraph();
if(sankore.preference("simplefx","0") == 1)
$("#checkDerivee").attr("checked", "checked");
else
$("#checkDerivee").removeAttr('checked');
if(sankore.preference("hardfx","0") == 1)
$("#checkDerivee2").attr("checked", "checked");
else
$("#checkDerivee2").removeAttr('checked');
actualiserGraph();
$("#aireG").val(sankore.preference("squareUnderFrom","-5"));
$("#aireD").val(sankore.preference("squareUnderTo","5"));
calculerAire();
$("#inputX").val(sankore.preference("calculateThePoint","0"));
execute($("#inputEq").val());
if(sankore.preference("checkboxDraw","0") == 1)
$("#checkAire").attr("checked", "checked");
else
$("#checkAire").removeAttr('checked');
actualiserGraph();
$("#selectTheme").val(sankore.preference("selectedTheme","noir"));
changerTheme($("#selectTheme").val());
$("#selectMethodeAffichage").val(sankore.preference("graphicalMethodDisplaying", "canvas"));
$("#zoomDefaut").val(sankore.preference("defaultZoom", "4"));
reinitialiserZoom($("#zoomDefaut").val());
if(sankore.preference("showGrid","1") == 1)
$("#checkGrille").attr("checked", "checked");
else
$("#checkGrille").removeAttr('checked');
if(sankore.preference("showAxis","1") == 1)
$("#checkAxes").attr("checked", "checked");
else
$("#checkAxes").removeAttr('checked');
if(sankore.preference("showScale","1") == 1)
$("#checkEchelle").attr("checked", "checked");
else
$("#checkEchelle").removeAttr('checked');
actualiserGraph();
$("#inputTaille").val(sankore.preference("thickness", "3"));
actualiserGraph();
$("#inputDecalageX").val(sankore.preference("offsetDiagrammX", "0"));
decalageX = parseFloat($("#inputDecalageX").val())
$("#inputDecalageY").val(sankore.preference("offsetDiagrammY", "0"));
decalageY = parseFloat($("#inputDecalageY").val())
$("#inputPrecision").val(sankore.preference("accuracyGraph", "0.02"));
precision = parseFloat($("#inputPrecision").val());
$("#selectAffichage3D").val(sankore.preference("styleOf3DShow", "surfaces"));
reinitialiserZoom(5);
$("#inputPrecision3D").val(sankore.preference("accuracyFunction", "0.2"));
precisionFonction3D = parseFloat($("#inputPrecision3D").val());
$("#selectRouge3D").val(sankore.preference("redColor", "plus"));
$("#selectVert3D").val(sankore.preference("greenColor", "moins"));
$("#selectBleu3D").val(sankore.preference("blueColor", "tout"));
checkCouleurs3D();
$("#couleur3Dgenerale").val(sankore.preference("3DGeneralColor", "0"));
checkCouleurs3D();
actualiserGraph();
$("#borneXGauche").val(sankore.preference("xAxisFrom", "-5"));
$("#borneXDroite").val(sankore.preference("xAxisTo", "5"));
$("#borneYGauche").val(sankore.preference("yAxisFrom", "-5"));
$("#borneYDroite").val(sankore.preference("yAxisTo", "5"));
var tempArray;
if(sankore.preference("graphmeHistory",""))
tempArray = sankore.preference("graphmeHistory","").split(",");
if(sankore.preference("graphmeHistory","")){
for(i in tempArray)
evaluer(tempArray[i]);
}
actualiserGraph();
loadingFlag = true;
////////////////////////////////////// languages suppot
document.getElementById("texteFonction").innerHTML = sankoreLang[lang].fnc;
$("#xAxis").html(sankoreLang[lang].x_axis);
$("#yAxis").html(sankoreLang[lang].y_axis);
$("#scaleZoom").html(sankoreLang[lang].zoom);
$("#graphColor").html(sankoreLang[lang].color);
$("#menuCouleur .contenuMenu em").text(sankoreLang[lang].choosing_color);
$("#colorValues tr").eq(0).find("td").eq(0).html(sankoreLang[lang].color + ":");
$("#colorValues tr").eq(1).find("td").eq(0).html(sankoreLang[lang].value);
$("#colorValues tr").eq(2).find("td").eq(0).html(sankoreLang[lang].saturation);
$("#colorValues tr").eq(3).find("td").eq(0).html(sankoreLang[lang].red);
$("#colorValues tr").eq(4).find("td").eq(0).html(sankoreLang[lang].green);
$("#colorValues tr").eq(5).find("td").eq(0).html(sankoreLang[lang].blue);
$("#colorValues tr").eq(6).find("td").eq(0).html(sankoreLang[lang].opacity);
$("#menuOutils .contenuMenu h3").eq(0).text(sankoreLang[lang].tools);
$("#menuOutils .contenuMenu span").each(function(){
switch($(this).html()){
case "Mouse events:":
$(this).html(sankoreLang[lang].mouse_events);
break;
case "Derivative:":
$(this).html(sankoreLang[lang].derivative);
break;
case "Square under function:":
$(this).html(sankoreLang[lang].square_under_func);
break;
case "Calculate the point on the function:":
$(this).html(sankoreLang[lang].point_calculate);
break;
case "Analysis of function:":
$(this).html(sankoreLang[lang].analysis_of_func);
break;
case "Display test:":
$(this).html(sankoreLang[lang].display_test);
break;
case "From":
$(this).html(sankoreLang[lang].from);
break;
case "to":
$(this).html(sankoreLang[lang].to);
break;
default:
break;
}
return true;
});
$("label[for*='checkAire']").text(sankoreLang[lang].draw);
$("label[for*='checkMaJ']").text(sankoreLang[lang].auto_update);
$("#menuOptions td").eq(0).html(sankoreLang[lang].widget);
$("#menuOptions h3").eq(0).text(sankoreLang[lang].widget_options);
$("#menuOptions2D h3").eq(0).text(sankoreLang[lang].options + " 2D");
$("#menuOptions2D span").each(function(){
switch($(this).html()){
case "The graphical method displaying:":
$(this).html(sankoreLang[lang].the_graphical);
break;
case "Zoom default:":
$(this).html(sankoreLang[lang].zoom_def);
break;
case "Thickness:":
$(this).html(sankoreLang[lang].thickness);
break;
case "Offset diagram:":
$(this).html(sankoreLang[lang].offset_diagram);
break;
case "Accuracy graph:":
$(this).html(sankoreLang[lang].accuracy_graph);
break;
}
return true;
});
$("#selectMethodeAffichage option").eq(0).text("canvas (" + sankoreLang[lang].lines + ")")
.next().text("canvas (" + sankoreLang[lang].points + ")")
.next().next().text("svg (1 " + sankoreLang[lang].image + ")");
$("label[for*='checkGrille']").text(sankoreLang[lang].show_grid);
$("label[for*='checkAxes']").text(sankoreLang[lang].show_axis);
$("label[for*='checkEchelle']").text(sankoreLang[lang].scale);
$("#menuOptions3D h3").eq(0).text(sankoreLang[lang].options + " 3D");
$("#menuOptions3D span").each(function(){
switch($(this).html()){
case "Show the style:":
$(this).html(sankoreLang[lang].show_the_style);
break;
case "Accuracy function:":
$(this).html(sankoreLang[lang].accuracy_func);
break;
case "Use the color":
$(this).html(sankoreLang[lang].use_the_color);
break;
case "red:":
$(this).html(sankoreLang[lang].red);
break;
case "green:":
$(this).html(sankoreLang[lang].green);
break;
case "blue:":
$(this).html(sankoreLang[lang].blue);
break;
case "General value:":
$(this).html(sankoreLang[lang].general_value);
break;
case "from":
$(this).html(sankoreLang[lang].from);
break;
case "to":
$(this).html(sankoreLang[lang].to);
break;
}
return true;
});
$("#selectAffichage3D option").eq(0).text(sankoreLang[lang].surfaces)
.next().text(sankoreLang[lang].points);
$("#selectRouge3D option").eq(0).text(sankoreLang[lang].positive_value)
.next().text(sankoreLang[lang].negative_value)
.next().text(sankoreLang[lang].general_value);
$("#selectVert3D option").eq(0).text(sankoreLang[lang].negative_value)
.next().text(sankoreLang[lang].positive_value)
.next().text(sankoreLang[lang].general_value);
$("#selectBleu3D option").eq(0).text(sankoreLang[lang].general_value)
.next().text(sankoreLang[lang].positive_value)
.next().text(sankoreLang[lang].negative_value);
$("#menuAide .ongletMenu td, #menuAideExemples .ongletMenu td, #menuAideAutres .ongletMenu td").each(function(){
switch($(this).html()){
case "Using":
$(this).html(sankoreLang[lang].using);
break;
case "Examples":
$(this).html(sankoreLang[lang].examples);
break;
case "Other":
$(this).html(sankoreLang[lang].other);
break;
}
});
$("#menuAide h1").each(function(){
switch($(this).html()){
case "How it work.":
$(this).html(sankoreLang[lang].how_it_work);
break;
case "Constants":
$(this).html(sankoreLang[lang].consts);
break;
case "Keyboard keys":
$(this).html(sankoreLang[lang].keys);
break;
}
return true;
});
$("#menuAide h2").each(function(){
switch($(this).html()){
case "Basic operations":
$(this).html(sankoreLang[lang].basic_operations);
break;
case "Trigonometric functions":
$(this).html(sankoreLang[lang].trigonometric);
break;
case "Hyperbolic functions":
$(this).html(sankoreLang[lang].hyperbolic_func);
break;
case "Square roots and degrees":
$(this).html(sankoreLang[lang].square_roots_and_degrees);
break;
case "Exponential and logarithm":
$(this).html(sankoreLang[lang].exponential);
break;
case "Absolute number value":
$(this).html(sankoreLang[lang].abs);
break;
case "Rounding":
$(this).html(sankoreLang[lang].rounding);
break;
}
return true;
});
$("#menuAide span").each(function(){
switch($(this).html()){
case "This widget allow to draw mathematical function. Enter function in the field in the top part of widget and press \"Show\".":
$(this).html(sankoreLang[lang].this_widget_allow);
break;
case "You can enter following mathematical function:":
$(this).html(sankoreLang[lang].you_can_enter);
break;
case "Plus":
$(this).html(sankoreLang[lang].plus);
break;
case "Minus":
$(this).html(sankoreLang[lang].minus);
break;
case "Multiplication":
$(this).html(sankoreLang[lang].multi);
break;
case "Division":
$(this).html(sankoreLang[lang].division);
break;
case "Mod":
$(this).html(sankoreLang[lang].mod);
break;
case "Sine":
$(this).html(sankoreLang[lang].sine);
break;
case "Cosine":
$(this).html(sankoreLang[lang].cosine);
break;
case "Tangent":
$(this).html(sankoreLang[lang].tangent);
break;
case "Cotangent":
$(this).html(sankoreLang[lang].cotangent);
break;
case "Secant":
$(this).html(sankoreLang[lang].secant);
break;
case "Cosecant":
$(this).html(sankoreLang[lang].cosecant);
break;
case "Arc sine":
$(this).html(sankoreLang[lang].arc_sine);
break;
case "Arc cosine":
$(this).html(sankoreLang[lang].arc_cosine);
break;
case "Arc tangent":
$(this).html(sankoreLang[lang].arc_tangent);
break;
case "Arc cotangent":
$(this).html(sankoreLang[lang].arc_cotangent);
break;
case "Hyperbolic sine":
$(this).html(sankoreLang[lang].hyp_sine);
break;
case "Hyperbolic cosine":
$(this).html(sankoreLang[lang].hyp_cosine);
break;
case "Hyperbolic tangent":
$(this).html(sankoreLang[lang].hyp_tangent);
break;
case "Hyperbolic cotangent":
$(this).html(sankoreLang[lang].hyp_cotangent);
break;
case "Hyperbolic secant":
$(this).html(sankoreLang[lang].hyp_secant);
break;
case "Hyperbolic cosecant":
$(this).html(sankoreLang[lang].hyp_cosecant);
break;
case "Hyperbolic arc sine":
$(this).html(sankoreLang[lang].hyp_arc_sine);
break;
case "Hyperbolic arc cosine":
$(this).html(sankoreLang[lang].hyp_arc_cosine);
break;
case "Hyperbolic arc tangent":
$(this).html(sankoreLang[lang].hyp_arc_tangent);
break;
case "Hyperbolic arc cotangent":
$(this).html(sankoreLang[lang].hyp_arc_cotangent);
break;
case "Square root":
$(this).html(sankoreLang[lang].square_root);
break;
case "Degree":
$(this).html(sankoreLang[lang].degree);
break;
case "Root":
$(this).html(sankoreLang[lang].root);
break;
case "Variable x to the power y":
$(this).html(sankoreLang[lang].variable_x);
break;
case "Root y of x":
$(this).html(sankoreLang[lang].root_y);
break;
case "Natural logarithm":
$(this).html(sankoreLang[lang].natural_log);
break;
case "Decimal logarithm":
$(this).html(sankoreLang[lang].decimal_log);
break;
case "rounding to the nearest whole number":
$(this).html(sankoreLang[lang].round_nearest);
break;
case "rounding to the nearest whole number in a big way":
$(this).html(sankoreLang[lang].round_nearest_big);
break;
case "rounding to the nearest whole number the smaller side":
$(this).html(sankoreLang[lang].round_nearest_small);
break;
case "Also are available some constants:":
$(this).html(sankoreLang[lang].available_const);
break;
case "reset widget":
$(this).html(sankoreLang[lang].reload_widget);
break;
case "left arrow":
$(this).html(sankoreLang[lang].left_arrow);
break;
case "top arrow":
$(this).html(sankoreLang[lang].top_arrow);
break;
case "right arrow":
$(this).html(sankoreLang[lang].right_arrow);
break;
case "bottom arrow":
$(this).html(sankoreLang[lang].bottom_arrow);
break;
case "graph will be moved left":
$(this).html(sankoreLang[lang].moved_left);
break;
case "graph will be moved top":
$(this).html(sankoreLang[lang].moved_top);
break;
case "graph will be moved right":
$(this).html(sankoreLang[lang].moved_right);
break;
case "graph will be moved bottom":
$(this).html(sankoreLang[lang].moved_bottom);
break;
case "or":
$(this).html(sankoreLang[lang].or);
break;
}
return true;
});
$("#menuAideExemples h1").each(function(){
if($(this).text() == "Functions 2D")
$(this).text(sankoreLang[lang].funcs + " 2D");
else
$(this).text(sankoreLang[lang].funcs + " 3D");
});
$("#menuAideExemples span").eq(0).html("(" + sankoreLang[lang].you_can_view + ")");
$("#menuAideAutres h4").eq(0).text(sankoreLang[lang].save_graph);
$("#menuAideAutres h4").eq(1).text(sankoreLang[lang].offset);
$("#menuAideAutres span").eq(0).text(sankoreLang[lang].in_some_browsers);
$("#menuAideAutres span").eq(1).text(sankoreLang[lang].if_graph_isnt);
$("#credits h3").eq(0).text(sankoreLang[lang].widget_is_developed);
$("#menuCredits .texteSecondaire span").eq(0).html(sankoreLang[lang].if_you_want_to);
$("#menuCredits .texteSecondaire span").eq(1).html(sankoreLang[lang].if_you_want_to_change);
$("#menuFonctions td").eq(0).text(sankoreLang[lang].funcs);
$("#menuFonctions td").eq(1).text(sankoreLang[lang].history);
$("#menuFonctions em").eq(0).text(sankoreLang[lang].current);
$("#menuFonctions em").eq(1).text(sankoreLang[lang].additional);
$("#menuHistorique td").eq(0).text(sankoreLang[lang].funcs);
$("#menuHistorique td").eq(1).text(sankoreLang[lang].history);
$("#menuEtude h3").text(sankoreLang[lang].analysis_of_func);
$("#menuEtude span").each(function(){
switch($(this).html()){
case "Set of definitions:":
$(this).html(sankoreLang[lang].set_of_def);
break;
case "Parity:":
$(this).html(sankoreLang[lang].parity);
break;
case "Zeros of functions:":
$(this).html(sankoreLang[lang].zeros);
break;
case "Signe:":
$(this).html(sankoreLang[lang].signe);
break;
case "Asymptotes":
$(this).html(sankoreLang[lang].asympt);
break;
case "AH left:":
$(this).html(sankoreLang[lang].ah_left);
break;
case "AH right:":
$(this).html(sankoreLang[lang].ah_right);
break;
case "AV:":
$(this).html(sankoreLang[lang].av);
break;
case "Tool for analysis of function is not reliable on 100%. Don't forget check results of analysis before use it.":
$(this).html(sankoreLang[lang].tool_for);
break;
}
return true;
});
$("#infoSauvegarde h1").text(sankoreLang[lang].options_saved);
$("#mAj h1").text(sankoreLang[lang].update);
$("#mAj span").each(function(){
switch($(this).html()){
case "Current version:":
$(this).html(sankoreLang[lang].cur_version);
break;
case "The last on-line version:":
$(this).html(sankoreLang[lang].last_version);
break;
case "This widget is available to using on web-site:":
$(this).html(sankoreLang[lang].using_web);
break;
}
});
$("#menuOptions span").each(function(){
switch($(this).html()){
case "Themes of widget:":
$(this).html(sankoreLang[lang].themes_of_widget);
break;
case "Control options:":
$(this).html(sankoreLang[lang].control_options);
break;
case "Save a widget options in cookies or load an options from cookies or delete a registered options.":
$(this).html(sankoreLang[lang].save_a_widget_options);
break;
}
return true;
});
$("#selectTheme option").eq(0).text(sankoreLang[lang].black).next().text(sankoreLang[lang].blue).next().text(sankoreLang[lang].white);
$("input:button").each(function(){
switch($(this).val()){
case "Check":
$(this).val(sankoreLang[lang].check);
break;
case "Cancel":
$(this).val(sankoreLang[lang].quit);
break;
case "Tools":
$(this).val(sankoreLang[lang].tools);
break;
case "Options":
$(this).val(sankoreLang[lang].options);
break;
case "Help":
$(this).val(sankoreLang[lang].help);
break;
case "About":
$(this).val(sankoreLang[lang].about);
break;
case "Moving":
$(this).val(sankoreLang[lang].moving);
break;
case "Tangente":
$(this).val(sankoreLang[lang].tangente);
break;
case "Point":
$(this).val(sankoreLang[lang].point);
break;
case "Calculate":
$(this).val(sankoreLang[lang].calculate);
break;
case "Estimate":
$(this).val(sankoreLang[lang].estimate);
break;
case "Start to analysis":
$(this).val(sankoreLang[lang].start_to_analysis);
break;
case "Test XPM":
$(this).val(sankoreLang[lang].test + " XPM");
break;
case "Test SVG":
$(this).val(sankoreLang[lang].test + " SVG");
break;
case "Test Canvas":
$(this).val(sankoreLang[lang].test + " Canvas");
break;
case "Save":
$(this).val(sankoreLang[lang].save);
break;
case "Load":
$(this).val(sankoreLang[lang].load);
break;
case "Delete":
$(this).val(sankoreLang[lang].del);
break;
case "Display":
$(this).val(sankoreLang[lang].display);
break;
case "Reload widget":
$(this).val(sankoreLang[lang].reload_widget);
break;
case "Updated":
$(this).val(sankoreLang[lang].update);
break;
case "Update zoom":
$(this).val(sankoreLang[lang].update_zoom);
break;
case "Reset display":
$(this).val(sankoreLang[lang].reset_display);
break;
case "User's guide":
$(this).val(sankoreLang[lang].guide);
break;
default:
break;
}
return true;
});
}
$(document).disableTextSelect();
$("input, select").mouseover(function(){
$(document).enableTextSelect();
});
$("input, select").mouseout(function(){
$(document).disableTextSelect();
});
$("body").mouseout(function(){
if(window.sankore && loadingFlag){
sankore.setPreference("functionData",$("#inputEq").val());
sankore.setPreference("xAxisFrom",$("#borneXGauche").val());
sankore.setPreference("xAxisTo",$("#borneXDroite").val());
sankore.setPreference("yAxisFrom",$("#borneYGauche").val());
sankore.setPreference("yAxisTo",$("#borneYDroite").val());
sankore.setPreference("functionColor",$("#inputTeinte").val());
sankore.setPreference("functionValue",$("#inputValeur").val());
sankore.setPreference("functionSaturation",$("#inputSaturation").val());
sankore.setPreference("functionRed",$("#inputRouge").val());
sankore.setPreference("functionGreen",$("#inputVert").val());
sankore.setPreference("functionBlue",$("#inputBleu").val());
sankore.setPreference("functionOpacity",$("#inputOpacity").val());
sankore.setPreference("functionColorId", idColor);
if ($('#checkDerivee').is(":checked"))
sankore.setPreference("simplefx","1");
else
sankore.setPreference("simplefx","0");
if ($('#checkDerivee2').is(":checked"))
sankore.setPreference("hardfx","1");
else
sankore.setPreference("hardfx","0");
sankore.setPreference("squareUnderFrom", $("#aireG").val());
sankore.setPreference("squareUnderTo", $("#aireD").val());
sankore.setPreference("calculateThePoint", $("#inputX").val());
if ($('#checkAire').is(":checked"))
sankore.setPreference("checkboxDraw","1");
else
sankore.setPreference("checkboxDraw","0");
sankore.setPreference("selectedTheme", $("#selectTheme").val());
sankore.setPreference("graphicalMethodDisplaying", $("#selectMethodeAffichage").val());
sankore.setPreference("defaultZoom", $("#zoomDefaut").val());
if ($('#checkGrille').is(":checked"))
sankore.setPreference("showGrid","1");
else
sankore.setPreference("showGrid","0");
if ($('#checkAxes').is(":checked"))
sankore.setPreference("showAxis","1");
else
sankore.setPreference("showAxis","0");
if ($('#checkEchelle').is(":checked"))
sankore.setPreference("showScale","1");
else
sankore.setPreference("showScale","0");
sankore.setPreference("styleOf3DShow", $("#selectAffichage3D").val());
sankore.setPreference("accuracyFunction", $("#inputPrecision3D").val());
sankore.setPreference("redColor", $("#selectRouge3D").val());
sankore.setPreference("greenColor", $("#selectVert3D").val());
sankore.setPreference("blueColor", $("#selectBleu3D").val());
sankore.setPreference("3DGeneralColor", $("#couleur3Dgenerale").val());
sankore.setPreference("thickness", $("#inputTaille").val());
sankore.setPreference("offsetDiagrammX", $("#inputDecalageX").val());
sankore.setPreference("offsetDiagrammY", $("#inputDecalageY").val());
sankore.setPreference("accuracyGraph", $("#inputPrecision").val());
if(historique.length)
sankore.setPreference("graphmeHistory", historique.toString());
}
});
});
//alert(navigator.appName+" ; "+navigator.appVersion+" ; "+navigator.userAgent)
// ------------- Fonctions du widgets -------------
// Lance la procédure pour dessiner la fonction qui se trouve dans l'input en haut du widget.
// Permet aussi d'actualiser le graphique.
function actualiserGraph(){
evaluer(document.getElementById("inputEq").value)
}
// Cette fonction détermine si la fonction entrée est valide ou non.
// Elle retourne "true" si la fonction ne comporte pas de caractères interdits et "false" dans le cas contraire.
function check(eq){
for(var i=0; i<interdit.length; i++){
var condition = ""
for(var k=0; k<interdit[i].length; k++){
if(k==0){
condition = condition + "eq.charAt(j) == interdit[i].charAt(0)"
}
else{
condition = condition + "&& eq.charAt(j+"+k+") == interdit[i].charAt("+k+")"
}
}
//alert(interdit[i]+" ; "+condition)
for(var j=0; j<eq.length; j++){
if(eval(condition)){
document.getElementById("spanFctInterdite").innerHTML = interdit[i]
afficherMenu("fctInterdite")
//alert("------- Erreur -------\nImpossible de dessiner la fonction ... \nExpression ou carractère invalide : "+interdit[i]+"")
return false
}
}
}
return true
}
// Cette fonction permet de choisir la méthode d'affichage entre:
// 1) Image au format XPM
// 2) Affichage directe dans sankore
// 3) Autres Méthodes d'affichages (svg ou canvas)
function evaluer(eq){
if(check(eq)){
try{
if(historique[0]!=eq && eq!="1000"){
for(var i=0;i<historique.length;i++){
if(historique[i]==eq){
historique.splice(i, 1)
}
}
historique.unshift(eq)
actualiserHistorique()
}
if(fonction3D){
dessiner3D(eq)
}
else if(document.getElementById("selectMethodeAffichage").value == "xpm"){
evaluerXPM(eq)
}
else if(document.getElementById("selectMethodeAffichage").value == "sankore"){
evaluerUniboard(eq)
}
else if(document.getElementById("selectMethodeAffichage").value == "canvas" || document.getElementById("selectMethodeAffichage").value == "canvas2"){
evaluerCanvas(eq)
}
else{
evaluerSVG(eq)
}
}
catch(err){
afficherMenu("erreurFct")
}
}
}
// ---- Fonctions Mathématiques et constantes ----
// (rempalce sin() par Math.sin(), cos() par Math.cos(), tan() par Math.tan(), etc.
var pi = 4 * atan(1)
var e = exp(1)
function sin(valeur){
return Math.sin(valeur)
}
function cos(valeur){
return Math.cos(valeur)
}
function tan(valeur){
return Math.tan(valeur)
}
function cot(valeur){
return 1/Math.tan(valeur)
}
function sec(valeur){
return 1/cos(valeur)
}
function csc(valeur){
return 1/sin(valeur)
}
function asin(valeur){
return Math.asin(valeur)
}
function acos(valeur){
return Math.acos(valeur)
}
function atan(valeur){
return Math.atan(valeur)
}
function acot(valeur){
return Math.atan(1/valeur)
}
function asec(valeur){
return Math.acos(1/valeur)
}
function acsc(valeur){
return Math.asin(1/valeur)
}
var arcsin = asin
var arccos = acos
var arctan = atan
var arccot = acot
var arcsec = asec
var arccsc = acsc
function sinh(valeur){
return (Math.exp(valeur)-Math.exp(-valeur))/2
}
function cosh(valeur){
return (Math.exp(valeur)+Math.exp(-valeur))/2
}
function tanh(valeur){
return (Math.exp(valeur)-Math.exp(-valeur))/(Math.exp(valeur)+Math.exp(-valeur))
}
function coth(valeur){
return (Math.exp(valeur)+Math.exp(-valeur))/(Math.exp(valeur)-Math.exp(-valeur))
}
function sech(valeur){
return 1/cosh(valeur)
}
function csch(valeur){
return 1/sinh(valeur)
}
function asinh(valeur){
return Math.log(valeur+Math.sqrt(Math.pow(valeur,2)+1))
}
function acosh(valeur){
return Math.log(valeur+Math.sqrt(Math.pow(valeur,2)-1))
}
function atanh(valeur){
return Math.log((1+valeur)/(1-valeur))/2
}
function acoth(valeur){
return Math.log((valeur+1)/(valeur-1))/2
}
var arcsinh = asinh
var arccosh = acosh
var arctanh = atanh
var arccoth = acoth
function sqrt(valeur){
return Math.sqrt(valeur)
}
function pow(valeur1, valeur2){
return Math.pow(valeur1, valeur2)
}
function root(valeur1, valeur2){
if(valeur2%2==1 && valeur1<0){
return -Math.pow(-valeur1, (1/valeur2))
}
else{
return Math.pow(valeur1, (1/valeur2))
}
}
function exp(valeur){
return Math.exp(valeur)
}
function log(valeur){
return Math.log(valeur)/Math.log(10)
}
function ln(valeur){
return Math.log(valeur)
}
function abs(valeur){
return Math.abs(valeur)
}
function sign(valeur){
if(valeur<0){
return -1
}
else if(valeur>0){
return 1
}
else{
return undefined
}
}
function round(valeur){
return Math.round(valeur)
}
function ceil(valeur){
return Math.ceil(valeur)
}
function floor(valeur){
return Math.floor(valeur)
}
function random(){
return Math.random()
}
// ]]>
</script>
</head>
<body onload="evaluer(1000);checkCouleurs3D();loadOptions();majAuto()" onkeypress="keyPress(event)">
<!-- ..... Haut du Widget ..... -->
<span id="haut">
<span id="texteFonction">Function: </span><input id="inputEq" onkeypress='if(event.keyCode==13) evaluer(this.value)' onkeyup="document.getElementById('fonctionActuelle').innerHTML = this.value"/>
<input type="button" onclick='evaluer(document.getElementById("inputEq").value)' value="Display"/><input type="button" style="width:21px;" onclick="menuFonctions()" value="+"/>
</span>
<!--<div id="miniMax" onclick="miniMax()">-</div> ▶▼ -->
<div id="boutonAgrandir" class="miniBouton" onclick="agrandirAffichage()">^</div>
<!--<div id="boutonFermer" class="miniBouton" onclick="close()"></div>-->
<br/>
<!-- ..... Millieu du Widget ..... -->
<!-- Zone d'affichage -->
<div id="affichage" onmousedown="sourisDown()" onmouseup="sourisUp()" onmousemove="sourisMove(event)" ondblclick="doubleClick(event.ctrlKey)"></div>
<!-- Zone de boutons gauche -->
<div id="gauche">
<span id="xAxis">X-axis:</span> <br/>
<input id="borneXGauche" class="smallInput" value="-5" onkeypress='if(event.keyCode==13) actualiserGraph()'/> ... <input id="borneXDroite" class="smallInput" value="5" onkeypress='if(event.keyCode==13) actualiserGraph()'/> <br/>
<span id="yAxis">Y-axis:</span> <br/>
<input id="borneYGauche" class="smallInput" value="-5" onkeypress='if(event.keyCode==13) actualiserGraph()'/> ... <input id="borneYDroite" class="smallInput" value="5" onkeypress='if(event.keyCode==13) actualiserGraph()'/>
<br/><span id="scaleZoom">Zoom:</span> <br/>
<input type="button" style="width:45%;" onclick='zoom(1.25)' value="-"/><input type="button" style="width:45%; position:relative; left: 9px;" onclick='zoom(0.8)' value="+"/><br/><br/>
<span id="graphColor">Color:</span> <br/>
<div id="buttonColor" title="couleurFonction" onclick="colorPicker(this.id); afficherMenu('menuCouleur')"></div>
<br/><br/>
<hr/>
<br/>
Menus:
<input type="button" class="boutonGauche" onclick='document.getElementById("etudeFct").innerHTML = document.getElementById("inputEq").value;afficherMenu("menuOutils")' value="Tools"/>
<input type="button" class="boutonGauche" onclick='afficherMenu("menuOptions")' value="Options"/>
<input type="button" class="boutonGauche" onclick='afficherMenu("menuAide")' value="Help"/>
<input type="button" class="boutonGauche" onclick='afficherMenu("menuCredits")' value="About"/>
<!-- ..... Menus ..... -->
<div id="menu" class="menu">
<div id="contenuMenu" class="contenuMenu"></div>
<div class="barreBasMenu">
<input type="button" onclick='cacherMenu()' value="Cancel"/>
</div>
</div>
</div>
<div id="gauche3D">
<input type="button" class="boutonGauche3D" onclick='afficherMenu("menuCredits")' value="About"/>
<input type="button" class="boutonGauche3D" onclick='afficherMenu("menuAide")' value="Help"/>
<input type="button" class="boutonGauche3D" onclick='afficherMenu("menuOptions")' value="Options"/>
<input type="button" style="width:30px;" onclick='zoom3D(0.8)' value="-"/><input type="button" style="width:30px;" onclick='zoom3D(1.25)' value="+"/>
</div>
<!-- Options -->
<div id="menuOptions" class="menu">
<table class="ongletMenu">
<tr>
<td class="ongletMenuActuel" onclick='afficherMenu("menuOptions")'>Widget</td>
<td onclick='afficherMenu("menuOptions2D")'>2D</td>
<td onclick='afficherMenu("menuOptions3D")'>3D</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<h3>Widget options</h3>
<span>Themes of widget:</span> <select id="selectTheme" onchange="changerTheme(this.value)">
<option value="noir">Black</option>
<option value="bleu">Blue</option>
<option value="blanc">White</option>
</select><br/>
<br/><br/><br/>
<span class="gras">Control options:</span><br/>
<input type="button" class="boutonSauvegarde" onclick="saveOptions()" value="Save"/><input type="button" class="boutonSauvegarde" onclick="loadOptions()" value="Load"/> <input class="boutonSauvegarde2" type="button" onclick="delOptions()" value="Delete"/><input class="boutonSauvegarde2" type="button" onclick="alertOptions()" value="Display"/><br/>
<span class="texteSecondaire">Save a widget options in cookies or load an options from cookies or delete a registered options.</span>
<br/><br/>
<label for="checkMaJ">Automatically update when a widget opening.</label> <input type="checkbox" id="checkMaJ" onclick="checkboxMaJ()"/>
<br/>
<div id="cacheCookies"><br/><br/><h1>Cookies are disabled. You cannot save an options...</h1></div>
<div id="cacheMaJ">You are using the last version of this widget.</div>
<input type="button" onclick='reset()' value="Reload widget" style="position:absolute; bottom:20px; width:140px; height:32px;"/>
<input type="button" onclick='miseAjour()' value="Updated" style="position:absolute; bottom:20px; left:160px; width:140px; height:32px;"/>
</div>
<div class="barreBasMenu"><input type="button" onclick="cacherMenu(); actualiserGraph()" value="Check"/></div>
</div>
<div id="menuOptions2D" class="menu">
<table class="ongletMenu">
<tr>
<td onclick='afficherMenu("menuOptions")'>Widget</td>
<td class="ongletMenuActuel" onclick='afficherMenu("menuOptions2D")'>2D</td>
<td onclick='afficherMenu("menuOptions3D")'>3D</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<h3>Options 2D</h3>
<span>The graphical method displaying:</span><select id="selectMethodeAffichage">
<option value="canvas">canvas (lines)</option>
<option value="canvas2">canvas (points)</option>
<option value="svg">svg</option>
<option value="svg2">svg (1 image)</option>
<option value="xpm">xpm</option>
<option value="sankore">sankore</option>
</select> <br/>
<span>Zoom default:</span>
<input value="5" class="smallInput" id="zoomDefaut"/>
<input type="button" onclick='reinitialiserZoom(document.getElementById("zoomDefaut").value)' value="Update zoom"/> <br/>
<br/>
<input type="checkbox" id="checkGrille" checked="true" onclick="actualiserGraph()"/><label for="checkGrille">Show grid</label> <br/>
<input type="checkbox" id="checkAxes" checked="true" onclick="actualiserGraph()"/><label for="checkAxes">Show axis</label> <br/>
<input type="checkbox" id="checkEchelle" checked="true" onclick="actualiserGraph()"/><label for="checkEchelle">Scale</label> <br/>
<span>Thickness:</span> <input id="inputTaille" class="smallInput" value="3" onkeypress='if(event.keyCode==13) actualiserGraph()' style=""/>
<div class="boutonPlus" type="button" onclick="boutonPlus('inputTaille', 1); actualiserGraph()">+</div><div class="boutonMoins" type="button" onclick="boutonMoins('inputTaille', 1); actualiserGraph()">-</div> <br/>
<br/>
<span>Offset diagram:</span>
x=<input value="0" class="smallInput" id="inputDecalageX" onkeyup="decalageX = parseFloat(this.value)"/>
y=<input value="0" class="smallInput" id="inputDecalageY" onkeyup="decalageY = parseFloat(this.value)"/>
<br/>
<span>Accuracy graph:</span>
<input value="0.02" class="smallInput" id="inputPrecision" onkeyup="precision = parseFloat(this.value)"/>
<div class="boutonPlus" type="button" onclick="boutonPlus('inputPrecision', 0.01); precision = parseFloat(document.getElementById('inputPrecision').value); actualiserGraph()">+</div><div class="boutonMoins" type="button" onclick="boutonMoins('inputPrecision', 0.01); precision = parseFloat(document.getElementById('inputPrecision').value); actualiserGraph()">-</div> <br/>
<br/>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu(); actualiserGraph()' value="Check"/></div>
</div>
<div id="menuOptions3D" class="menu">
<table class="ongletMenu">
<tr>
<td onclick='afficherMenu("menuOptions")'>Widget</td>
<td onclick='afficherMenu("menuOptions2D")'>2D</td>
<td class="ongletMenuActuel" onclick='afficherMenu("menuOptions3D")'>3D</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<h3>Options 3D</h3>
<span>Show the style:</span>
<select id="selectAffichage3D">
<option value="surfaces"> surfaces </option>
<option value="points"> points </option>
</select> <input type="button" onclick='reinitialiserZoom(5)' value="Reset display"/> <br/>
<br/>
<span>Accuracy function:</span> <input value="0.2" class="smallInput" id="inputPrecision3D" onkeyup="precisionFonction3D = parseFloat(this.value)"/>
<div class="boutonPlus" type="button" onclick="boutonPlus('inputPrecision3D', 0.1); precisionFonction3D = parseFloat(document.getElementById('inputPrecision3D').value); actualiserGraph()">+</div><div class="boutonMoins" type="button" onclick="boutonMoins('inputPrecision3D', 0.1); precisionFonction3D = parseFloat(document.getElementById('inputPrecision3D').value); actualiserGraph()">-</div> <br/>
<br/>
<span>Use the color:</span><br/>
<span>red:</span>
<select onchange="checkCouleurs3D()" id="selectRouge3D">
<option value="plus">positive value</option>
<option value="moins">negative value</option>
<option value="tout">general value</option>
</select>
<br/>
<span>green:</span>
<select onchange="checkCouleurs3D()" id="selectVert3D">
<option value="moins">negative value</option>
<option value="plus">positive value</option>
<option value="tout">general value</option>
</select>
<br/>
<span>blue:</span>
<select onchange="checkCouleurs3D()" id="selectBleu3D">
<option value="tout">general value</option>
<option value="plus">positive value</option>
<option value="moins">negative value</option>
</select>
<br/>
<span>General value:</span> <input class="smallInput" id="couleur3Dgenerale" type="texte" value="0" onkeyup="checkCouleurs3D()"/> (<span>from</span> 0 <span>to</span> 255)
<br/>
<span id="apercuCouleur3D"></span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu(); actualiserGraph()' value="Check"/></div>
</div>
<!-- Aide -->
<div id="menuAide" class="menu">
<table class="ongletMenu">
<tr>
<td class="ongletMenuActuel" onclick='afficherMenu("menuAide")'>Using</td>
<td onclick='afficherMenu("menuAideExemples")'>Examples</td>
<td onclick='afficherMenu("menuAideAutres")'>Other</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<h1>How it work.</h1>
<p><span>This widget allow to draw mathematical function. Enter function in the field in the top part of widget and press "Show".</span></p>
<p><span>You can enter following mathematical function:</span><br/>
<h2>Basic operations</h2>
<ul>
<li><span>Plus</span> -> <span class="gras">+</span></li>
<li><span>Minus</span> -> <span class="gras">-</span></li>
<li><span>Multiplication</span> -> <span class="gras">*</span></li>
<li><span>Division</span> -> <span class="gras">/</span></li>
<li><span>Mod</span> -> <span class="gras">%</span></li>
</ul>
<h2>Trigonometric functions</h2>
<ul>
<li><span>Sine</span> -> <span class="gras">sin(x)</span></li>
<li><span>Cosine</span> -> <span class="gras">cos(x)</span></li>
<li><span>Tangent</span> -> <span class="gras">tan(x)</span></li>
<li><span>Cotangent</span> -> <span class="gras">cot(x)</span></li>
<li><span>Secant</span> -> <span class="gras">sec(x)</span></li>
<li><span>Cosecant</span> -> <span class="gras">csc(x)</span></li>
</ul>
<ul>
<li><span>Arc sine</span> -> <span class="gras">arcsin(x)</span> <span>or</span> <span class="gras">asin(x)</span></li>
<li><span>Arc cosine</span> -> <span class="gras">arccos(x)</span> <span>or</span> <span class="gras">acos(x)</span></li>
<li><span>Arc tangent</span> -> <span class="gras">arctan(x)</span> <span>or</span> <span class="gras">atan(x)</span></li>
<li><span>Arc cotangent</span> -> <span class="gras">arccot(x)</span> <span>or</span> <span class="gras">acot(x)</span></li>
</ul>
<h2>Hyperbolic functions</h2>
<ul>
<li><span>Hyperbolic sine</span> -> <span class="gras">sinh(x)</span></li>
<li><span>Hyperbolic cosine</span> -> <span class="gras">cosh(x)</span></li>
<li><span>Hyperbolic tangent</span> -> <span class="gras">tanh(x)</span></li>
<li><span>Hyperbolic cotangent</span> -> <span class="gras">coth(x)</span></li>
<li><span>Hyperbolic secant</span> -> <span class="gras">sech(x)</span></li>
<li><span>Hyperbolic cosecant</span> -> <span class="gras">csch(x)</span></li>
</ul>
<ul>
<li><span>Hyperbolic arc sine</span> -> <span class="gras">arcsinh(x)</span> <span>or</span> <span class="gras">asinh(x)</span></li>
<li><span>Hyperbolic arc cosine</span> -> <span class="gras">arccosh(x)</span> <span>or</span> <span class="gras">acosh(x)</span></li>
<li><span>Hyperbolic arc tangent</span> -> <span class="gras">arctanh(x)</span> <span>or</span> <span class="gras">atanh(x)</span></li>
<li><span>Hyperbolic arc cotangent</span> -> <span class="gras">arccoth(x)</span> <span>or</span> <span class="gras">acoth(x)</span></li>
</ul>
<h2>Square roots and degrees</h2>
<ul>
<li><span>Square root</span> -> <span class="gras">sqrt(x)</span></li>
<li><span>Degree</span> -> <span class="gras">pow(x, y)</span> <span class="texteSecondaire">Variable x to the power y</span></li>
<li><span>Root</span> -> <span class="gras">root(x, y)</span> <span class="texteSecondaire">Root y of x</span></li>
</ul>
<h2>Exponential and logarithm</h2>
<ul>
<li>e<span style="vertical-align:super;">x</span> -> <span class="gras">exp(x)</span></li>
<li><span>Natural logarithm</span> -> <span class="gras">ln(x)</span></li>
<li><span>Decimal logarithm</span> -> <span class="gras">log(x)</span></li>
</ul>
<h2>Absolute number value</h2>
<ul>
<li>|x| -> <span class="gras">abs(x)</span></li>
</ul>
<h2>Rounding</h2>
<ul>
<li><span class="gras">round(x)</span> -> <span>rounding to the nearest whole number</span></li>
<li><span class="gras">ceil(x)</span> -> <span>rounding to the nearest whole number in a big way</span></li>
<li><span class="gras">floor(x)</span> -> <span>rounding to the nearest whole number the smaller side</span></li>
</ul>
</p> <br/>
<hr/>
<h1>Constants</h1>
<p><span>Also are available some constants:</span><br/>
<ul>
<li><span class="gras">pi</span> = 4 * atan(1) ≈ 3,141592653589793</li>
<li><span class="gras">e</span> = exp(1) ≈ 2.718281828459045</li>
</ul>
</p>
<br/>
<hr/>
<h1>Keyboard keys</h1>
<p style="font-size:90%;">
esc -> <span>reset widget</span> <br/>
ctrl + <span>left arrow</span> -> <span>graph will be moved left</span><br/>
ctrl + <span>top arrow</span> -> <span>graph will be moved top</span><br/>
ctrl + <span>right arrow</span> -> <span>graph will be moved right</span><br/>
ctrl + <span>bottom arrow</span> -> <span>graph will be moved bottom</span><br/>
<br/>
</p>
<br/>
<input type="button" value="User's guide" onclick="navigateur('Guide_Utilisateur.html')" style="position:absolute;bottom:0px;left:0px;"/>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<div id="menuAideExemples" class="menu">
<table class="ongletMenu">
<tr>
<td onclick='afficherMenu("menuAide")'>Using</td>
<td class="ongletMenuActuel" onclick='afficherMenu("menuAideExemples")'>Examples</td>
<td onclick='afficherMenu("menuAideAutres")'>Other</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<span class="texteSecondaire">(You can view example. Do not forget to set accuracy in options if necessary.)</span>
<br/><br/>
<hr/>
<h1>Functions 2D</h1>
<p>
<span class="survol" onclick="document.getElementById('inputEq').value = '0.5*x+1' ; actualiserGraph()">0.5*x+1</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'pow(x,2)-3' ; actualiserGraph()">pow(x,2)-3</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = '1/x' ; actualiserGraph()">1/x</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'atan(x)' ; actualiserGraph()">atan(x)</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = '(x+1/x)/1.2' ; actualiserGraph()">(x+1/x)/1.2</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'sin(10*x*x)*0.5' ; actualiserGraph()">sin(10*x*x)*0.5</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'log(pow(x-2,2))' ; actualiserGraph()">log(pow(x-2,2))</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = '(x*x-5*x+5)*exp(x)/5' ; actualiserGraph()">(x*x-5*x+5)*exp(x)/5</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'random()' ; evaluer('random()')">random()</span> <br/>
</p>
<br/><br/>
<hr/>
<h1>Functions 3D</h1>
<p>
<span class="survol" onclick="document.getElementById('inputEq').value = 'sin(x)+cos(y)' ; actualiserGraph()">sin(x)+cos(y)</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'sqrt(10-x*x)' ; actualiserGraph()">sqrt(10-x*x)</span> <br/>
<span class="survol" onclick="document.getElementById('inputEq').value = 'atan(x)+atan(y)' ; actualiserGraph()">atan(x)+atan(y)</span> <br/>
</p>
<br/>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<div id="menuAideAutres" class="menu">
<table class="ongletMenu">
<tr>
<td onclick='afficherMenu("menuAide")'>Using</td>
<td onclick='afficherMenu("menuAideExemples")'>Examples</td>
<td class="ongletMenuActuel" onclick='afficherMenu("menuAideAutres")'>Other</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<h4>Save graph</h4>
<span>In some browsers when used display method "Canvas" you can save graph by clicking it with right mouse button and selecting "Save image". Also you can save 3D-graphs.</span>
<br/><br/>
<h4>Offset</h4>
<span>If graph isn't in the right place (larger than canvas) then can you set necessary parameters graph displaying in settings menu.</span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!-- Crédits -->
<div id="menuCredits" class="menu">
<div class="contenuMenu" style="text-align:justify;">
<br/>
<table id="credits">
<tr>
<td>
<img src="icon.png"/>
<h3>Widget is developed by</h3>
Yannick Vessaz <br/>
<a href='mailto:yannick.vessaz@gmail.com'>yannick.vessaz@gmail.com</a>
</td>
</tr>
</table>
<span class="texteSecondaire">
<br/><br/>
<span>If you want to inform about bug, make a proposal or just ask some questions then you can contact to me at the following e-mail:</span> <a href='mailto:yannick.vessaz@gmail.com'>e-mail</a>.
<br/><br/>
<span>If you want to change background design then you can contact at following address:</span> <a href="http://kde.org">KDE</a>.
</span>
<span id="version" class="texteSecondaire" style="position:absolute;bottom:10px;left:15px;">version 1.3</span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!-- Outils -->
<div id="menuOutils" class="menu">
<div class="contenuMenu">
<h3 style="margin-top:0px; margin-bottom:15px;">Tools</h3>
<span>Mouse events:</span><br/>
<input type="button" class="choixOutil" onclick="choixOutil('deplacement');cacherMenu()" value="Moving"/>
<input type="button" class="choixOutil" onclick="choixOutil('tangente');cacherMenu()" value="Tangente"/>
<input type="button" class="choixOutil" onclick="choixOutil('point');cacherMenu()" value="Point"/>
<br/><br/>
<span>Derivative:</span><br/>
<label for="checkDerivee"> f'(x) </label><input type="checkbox" id="checkDerivee" onclick="actualiserGraph()"/><label for="checkDerivee2"> f''(x) </label><input type="checkbox" id="checkDerivee2" onclick="actualiserGraph()"/>
<br/><br/>
<span>Square under function:</span><br/>
<span>From</span> <input value="-5" class="smallInput" id="aireG"/> <span>to</span> <input value="5" class="smallInput" id="aireD"/> <input type="button" onclick='calculerAire()' value="Calculate"/> <span id="outputAire"></span>
<div style="float: right;"><label for="checkAire">Draw </label><input type="checkbox" id="checkAire" onclick="actualiserGraph()"/></div>
<br/><br/>
<span>Calculate the point on the function:</span><br/>
x=<input value="0" class="smallInput" id="inputX" onkeypress='if(event.keyCode==13) execute(document.getElementById("inputEq").value)'/>
<input type="button" onclick='execute(document.getElementById("inputEq").value)' value="Estimate"/>
<span id="outputX"></span>
<br/><br/>
<span>Analysis of function:</span> <br/>
f(x) = <span id="etudeFct"></span> <input type="button" value="Start to analysis" onclick='etudier(document.getElementById("inputEq").value);afficherMenu("menuEtude")'/>
<br/><br/>
<span>Display test:</span><br/>
<input type="button" onclick='cacherMenu(); testXPM()' value="Test XPM"/><input type="button" onclick='cacherMenu(); testSVG()' value="Test SVG"/><input type="button" onclick='cacherMenu(); testCanvas()' value="Test Canvas"/>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!--Etude de fonction -->
<div id="menuEtude" class="menu">
<div class="contenuMenu">
<h3>Analysis of function</h3>
<span>Set of definitions:</span> <span id="etudeEDF">...</span> <br/>
<span>Parity:</span> <span id="etudeParite">...</span> <br/>
<span>Zeros of functions:</span> <span id="etudeZeros">...</span> <br/>
<table>
<tr id="etudeSigne">
<td>Sign : ...</td>
</tr>
</table>
<span>Asymptotes</span> <br/>
<span>AH left:</span> : <span id="etudeAHG">...</span> <br/>
<span>AH right:</span> <span id="etudeAHD">...</span> <br/>
<span>AV:</span> <span id="etudeAV">...</span>
<span id="etudeMin">...</span>
<span id="etudeMax">...</span>
<span id="etudeI">...</span> <br/><br/>
<span class="texteSecondaire" style="font-size:10px;">Tool for analysis of function is not reliable on 100%. Don't forget check results of analysis before use it.</span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!-- Fonctions multiples -->
<div id="menuFonctions" class="menu">
<table class="ongletMenu">
<tr>
<td class="ongletMenuActuel" onclick='afficherMenu("menuFonctions")'>Functions</td>
<td onclick='afficherMenu("menuHistorique")'>History</td>
</tr>
</table>
<div class="contenuMenu avecBordures">
<em>Current</em><br/>
f(x) = <span id="fonctionActuelle">x</span> <input type="button" value="+" onclick="ajouterFonction(document.getElementById('fonctionActuelle').innerHTML)"/>
<br/><br/>
<em>Additional</em><br/>
<span id="fonctionsSupp">n/a ...</span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!-- Historique -->
<div id="menuHistorique" class="menu">
<table class="ongletMenu">
<tr>
<td onclick='afficherMenu("menuFonctions")'>Functions</td>
<td class="ongletMenuActuel" onclick='afficherMenu("menuHistorique")'>History</td>
</tr>
</table>
<div class="contenuMenu avecBordures" id="divHistorique">
<span id="spanHistorique"></span>
</div>
<div class="barreBasMenu"><input type="button" onclick='cacherMenu()' value="Cancel"/></div>
</div>
<!-- Couleur -->
<div id="menuCouleur" class="menu">
<div class="contenuMenu">
<em>Choosing the color:</em> <br/><br/>
<div id="colorSV" onmousemove="if(mouseDown==true){colorSV(event)}" onmousedown="colorSV(event); mouseDown = true" onmouseup="mouseDown = false">
<svg:svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<svg:defs id="defs1">
<svg:linearGradient id="linearGradient1" x1="0%" y1="0%" x2="100%" y2="0%">
<svg:stop
style="stop-color:#000000;stop-opacity:1;"
offset="0%" />
<svg:stop
style="stop-color:#000000;stop-opacity:0;"
offset="100%" />
</svg:linearGradient>
<svg:linearGradient id="linearGradient2" x1="0%" y1="0%" x2="0%" y2="100%">
<svg:stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="0%" />
<svg:stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="100%" />
</svg:linearGradient>
</svg:defs>
<svg:rect
style="fill:url(#linearGradient2);fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
width="255"
height="255"
x="0"
y="0"
ry="0" />
<svg:rect
style="fill:url(#linearGradient1);fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
width="255"
height="255"
x="0"
y="0"
ry="0" />
<svg:line
id="ligneValeur"
x1="255"
y1="0"
x2="255"
y2="255"
style="stroke:rgb(0,0,0);stroke-width:2"/>
<svg:line
id="ligneSaturation"
x1="0"
y1="0"
x2="255"
y2="0"
style="stroke:rgb(0,0,0);stroke-width:2"/>
</svg:svg>
</div>
<div id="colorT" onmousemove="if(mouseDown==true){colorT(event)}" onmousedown="colorT(event); mouseDown = true" onmouseup="mouseDown = false">
<svg:svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<svg:defs id="defs2">
<svg:linearGradient id="linearGradient3" x1="0%" y1="100%" x2="0%" y2="0%">
<svg:stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="0%" />
<svg:stop
style="stop-color:#ff00ff;stop-opacity:1;"
offset="16.66%" />
<svg:stop
style="stop-color:#0000ff;stop-opacity:1;"
offset="33.33%" />
<svg:stop
style="stop-color:#00ffff;stop-opacity:1;"
offset="50%" />
<svg:stop
style="stop-color:#00ff00;stop-opacity:1;"
offset="66.66%" />
<svg:stop
style="stop-color:#ffff00;stop-opacity:1;"
offset="83.33%" />
<svg:stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="100%" />
</svg:linearGradient>
</svg:defs>
<svg:rect
style="fill:url(#linearGradient3);fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
width="255"
height="255"
x="0"
y="0"
ry="0" />
<svg:line
id="ligneTeinte"
x1="0"
y1="0"
x2="20"
y2="0"
style="stroke:rgb(0,0,0);stroke-width:2"/>
</svg:svg>
</div>
<table id="colorValues">
<tr>
<td>Color: </td><td><input id="inputTeinte" class="smallInput" value="0" onkeypress=''/></td>
</tr><tr>
<td>Value: </td><td><input id="inputValeur" class="smallInput" value="0" onkeypress=''/></td>
</tr><tr>
<td>Saturation: </td><td><input id="inputSaturation" class="smallInput" value="0" onkeypress=''/></td>
</tr><tr>
<td>Red: </td><td><input id="inputRouge" class="smallInput" value="255" onkeypress=''/></td>
</tr><tr>
<td>Green: </td><td><input id="inputVert" class="smallInput" value="0" onkeypress=''/></td>
</tr><tr>
<td>Blue: </td><td><input id="inputBleu" class="smallInput" value="0" onkeypress=''/></td>
</tr><tr>
<td>Opacity: </td><td><input id="inputOpacity" class="smallInput" value="1" onkeypress=''/></td>
</tr><!--<tr>
<td><input id="inputCouleur" style="width: 70%" value="cyan" onkeypress='couleurFonction = this.value; if(event.keyCode==13) actualiserGraph()'/></td>
</tr>-->
</table>
<div id="apercuCouleur" title="New Color"></div><div id="apercuCouleur2" title="Old Color"></div>
</div>
<div class="barreBasMenu"><input type="button" onclick="if(idColor=='buttonColor'){cacherMenu()}else{afficherMenu('menuFonctions')}; actualiserGraph()" value="Check"/></div>
</div>
<!-- Erreurs Fonctions interdites -->
<div id="fctInterdite" class="miniMenu">
<br/>
<h1>------- Error -------</h1>
<br/>
Impossible to draw the function ...
<br/><br/>
Error in expression or unexpected char: <br/>
<span id="spanFctInterdite" style="font-style:italic;"></span>
<br/><br/>
<input type="button" onclick="cacherMenu()" value="Ok"/>
</div>
<!-- Autres erreurs -->
<div id="erreurFct" class="miniMenu">
<h1>------- Error -------</h1>
Runtime error! Check your function and try to draw it again.
<br/>
Description and parameters various functions which are available to help.
<br/><br/>
<input type="button" onclick="afficherMenu('menuAide')" value="Help"/>
<input type="button" onclick="cacherMenu()" value="Ok"/>
</div>
<!-- Menu des mises à jour -->
<div id="mAj" class="menu">
<h1>Updated</h1>
<span>Current version:</span> <br/><span id="thisVersion"></span><br/>
<span>The last on-line version:</span> <br/><span id="newVersion"></span><br/>
<br/>
<span>This widget is available to using on web-site:</span> <em>http://gyb.educanet2.ch/tm-widgets/yannick</em><br/>
<br/>
</div>
<!-- Erreur mise à jour -->
<div id="erreurMaJ" class="miniMenu">
<br/>
<h1>------- Error -------</h1>
<br/><br/>
Update to latest version is not available because you already use the latest version.
<br/><br/><br/>
<input type="button" onclick="cacherMenu()" value="Ok"/>
</div>
<!-- Info options sauvegardées -->
<div id="infoSauvegarde" class="alertMenu">
<br/>
<h1>Options saved!</h1>
<br/>
<input type="button" onclick="document.getElementById('infoSauvegarde').style.display = 'none'" value="Ok"/>
</div>
<!-- ..... Flèches de déplacement ..... -->
<div class="flecheDeplacement" id="flecheHaut" onclick="if(fonction3D){zoom3D(1.25)}else{deplacerY(1)}" onmousemove="sourisMove(event)"></div>
<div class="flecheDeplacement" id="flecheGauche" onclick="deplacerX(-1)" onmousemove="sourisMove(event)"></div>
<div class="flecheDeplacement" id="flecheBas" onclick="if(fonction3D){zoom3D(0.8)}else{deplacerY(-1)}" onmousemove="sourisMove(event)"></div>
<div class="flecheDeplacement" id="flecheDroite" onclick="deplacerX(1)" onmousemove="sourisMove(event)"></div>
<!-- ..... Bas du Widget ..... -->
<div class="info" id="info"></div>
<div id="point">o</div>
<div id="tangente"></div>
<!-- .... Autres .... -->
<div id="onglet3D" onclick="activer3D()">3D</div>
</body>
<!-- .............................. Widget réalisé par Yannick Vessaz .............................. -->
<!-- .............................. e-mail: yannick.vessaz@gmail.com .............................. -->
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>GraphMe - User's guide.</title>
<link rel="stylesheet" type="text/css" href="Style/Guide_Utilisateur.css"/>
</head>
<body>
<h1>GraphMe</h1>
<img src="Images/GraphMe.png"/>
<h1>User's guide</h1>
<ol id="Sommaire">
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#Installation">Installation</a></li>
<li><a href="#AfficherLeWidget">Review widget</a></li>
<li><a href="#PresentationAffichage">View presentation</a></li>
<li><a href="#DessinerFonction">Drawing the function</a></li>
<li><a href="#DeplacerAffichage">Offset function</a></li>
<li><a href="#MenuOptions">The options menu</a></li>
<li><a href="#MenuOutils">the tools menu</a></li>
<li><a href="#PlusieursFonctions">Drawing some functions</a></li>
<li><a href="#MaJ">GraphMe update</a></li>
<li><a href="#Contact">Contact</a></li>
</ol>
<h2 id="Introduction">1. Introduction</h2>
<p>
GraphMe is a app that is developed using html, javascript and css. It can be used for drawing graphs. This document must explain how to use GraphMe. This app have a different functions and some useful advices for users.
</p>
<h2 id="Installation">2. Installation</h2>
<p>
This widget can be downloaded from the Internet in a packed format. Before using it must be unpacked. GraphMe was developed for using in web-browsers and integration in Sankore. To add this app in Sankore you should copy folder named "GraphMe.wgt" in "../library/interactive/". For example, on "windows OS" GraphMe must be in folder with following path: "C: / Program Files / Sankore 4/library/interactive/GraphMe.wgt". If you have no Sankore then you can get it on <a href="http://getuniboard.com">http://getuniboard.com/</a>.
</p>
<h2 id="AfficherLeWidget">3. Review widget</h2>
<div class="droite"><img src="Images/Guide_Navigateur.png"/>Display GraphMe in browsers</div>
<p>
A) To display this app in browser just enough to open the file named "Grapheur.xhtml" (it's in root folder) with your browser. But some browsers can not display app correctly. Below is the list of browsers that are able to display app:
</p>
<ul>
<li>Mozilla Firefox (3.5) : Everything works fine.</li>
<li>Internet Explorer (8.0) : Cannot open a widget, because .xhtml format is not recognized.</li>
<li>Internet Explorer (pré-version 9.0) : Widget works but just using SVG. Canvas not supported yet.</li>
<li>Konqueror (4.3.4) : Widget can be opened but there is some problems with displaying. It still occur when choosed display method "canvas".</li>
<li>Opera (10.51) : Widget quite useful.</li>
<li>Google Chrome (4.1) : Everything works very nice! 3D-display is faster as compared with other browsers.</li>
</ul>
<p>
B) To open widget in Sankore you should first open folder "Application" that is at the left of the screen. Then you must find this app and add it to the page.
</p>
<div class="gauche"><img src="Images/Guide_Uniboard.png"/>Display GraphMe in Sankore</div>
<img src="Images/Guide_AjouterWidget.png"/>
<h2 id="PresentationAffichage">4. View presentation</h2>
<ol>
<li>Place for functions display.</li>
<li>Button for beginning the work.</li>
<li>Button for adding new function or for getting access to functions history.</li>
<li>Display.</li>
<li>Parameters that define the part of graph that will be displayed.</li>
<li>Buttons for zoom.</li>
<li>Button for color changing.</li>
<li>Buttons for access to menu.</li>
<li>Tab-button that toggles 2D and 3D modes.</li>
<li>Button for maximize the widget.</li>
</ol>
<img src="Images/Guide_Presentation.png"/>
<h2 id="DessinerFonction">5. Drawing the function</h2>
<p>
To draw mathematical function just enter it at the top of widget and press button "Display". You can use different functions and predefined constants.
</p>
<h4>Basic operations:</h4>
<ul>
<li>Addition → +</li>
<li>Subtraction → -</li>
<li>Multiplication → *</li>
<li>Division → /</li>
<li>Mod → %</li>
</ul>
<h4>Trigonometric functions</h4>
<ul>
<li>sin(x), cos(x), tan(x), cot(x)</li>
<li>asin(x), acos(x), atan(x), acot(x) ( ou arcsin(x), arccos(x), arctan(x), arccot(x) )</li>
</ul>
<h4>Square roots and degrees</h4>
<ul>
<li>sqrt(x) is square root from x</li>
<li>pow(x, y). Variable x to the power y. For examle:<br/>x² → pow(x, 2)<br/>(x+3)⁵ → pow((x+3), 5)</li>
<li>root(x, y). Root y of x</li>
</ul>
<h4>Exponential and logarithm</h4>
<ul>
<li>exp(x)</li>
<li>ln(x) is natural logarithm.</li>
<li>log(x) is decimal logarithm.</li>
</ul>
<h4>Rounding</h4>
<ul>
<li>round(x) → rounding to the nearest whole number</li>
<li>ceil(x) → rounding to the nearest whole number in a big way</li>
<li>floor(x) → rounding to the nearest whole number the smaller side</li>
</ul>
<h4>Other predefined function</h4>
<ul>
<li>abs(x) → Absolute number value</li>
<li>random() → Return random number between 0 and 1</li>
</ul>
<h4>Also are available some constants:</h4>
<ul>
<li>pi = 4 * atan(1) ≈ 3.141592653589793</li>
<li>e = exp(1) ≈ 2.718281828459045 </li>
</ul>
<p>
Not always it's easy to understand how to record a required function. Really if anywhere you err then graph will not displayed. Also do not forget about "*" (multiply) to multiply and "." (decimal point) to write point.
</p>
<p>
The two-dimensional function must be written as y=[...] and the three-dimensional function nust be written as z=[...]. Other examples are available to use in menu "Help" if you have some difficulties with function definition.
</p>
<h2 id="DeplacerAffichage">6. Offset function</h2>
<p>
Sometimes when you draw the function you don't see all necessary information about this function. In this case you can change position of graph.
</p>
<img src="Images/Guide_Deplacement.png"/>
<p>
To move the function graph just use a navigation arrows that are in the four edges of the display or mouse move tool (menu Service).
</p>
<p>
To define place to display you should enter a custom values in the left side of the widget. The left value must be less than the right value. In other case graph will not displayed.
</p>
<p>
You can increase or decrease the scale of displaying using buttons that are in the left menu. So you'll see more information about function. Zoom can be reset in options.
</p>
<h2 id="MenuOptions">7. The options menu</h2>
<p>
To open the menu you should click a button "Options" that is in the left of the widget. If you click on this button again then menu will close. There are some buttons for navigation between options. Their short description:
</p>
<ul>
<li>Changing a background image and color. In Sankore changing background theme used for displaying widget on black and white background.</li>
<li>Display-method used for defining displaying function. There are 6 possibilities: <br/>
<ol>
<li>SVG is a vector format of image and it can be built in HTML-page. It's compatible in most of browsers and Sankore support it very well so is it selected default.</li>
<li>There is a big difference between SVG (image) and display method SVG. If you have a compatibility problems then you should not use this method.</li>
<li>"Canvas" is a new tag that used in HTML 5.0. It define a area in which you can place some images. This display-method is faster than SVG-method, but Sankore does not fully support it. It's desirable to choose this method when you use no Sankore widget.</li>
<li>"Canvas" (point) also uses a canvas but draws a points instead of lines.</li>
<li>XPM format is little known so it's compatible just with a minority of browsers.</li>
<li>Display method "Uniboard" allows to draw directly on the page using Sankore drawing.</li>
</ol>
<img src="Images/Guide_Options.png"/>
</li>
<li>Default zoom button returns display into original state. It helps alsoto return to the origin.</li>
<li>Display options allow to display or not a grid, axis and scale. They make a mapping more readable. Also you can change the thickness of function line.</li>
<li>Offset of graph not used usually. But if you use it then you can move a mapping in any direction when a center isn't in the right place. It's avaliable in some browsers.</li>
<li>The accuracy of calculations of the graph will increase or decrease the number of points calculated. The higher the number, the more accuracy. It is useful to set this value to "0.01" if you draw functions like 0.5 * sin (10 * x * x).</li>
<li>Options in 3D, the display style to choose how the function is designed: with small points or polygons (areas). Most functions are prettier drawing surface between the points calculated. However, it is better to draw points for functions such as the hemisphere: sqrt (12 - x*x - y*y).</li>
<li>In the last tab you can change such options 3D, as the accuracy of the calculations and the color of the function.</li>
</ul>
<h2 id="MenuOutils">8. The tools menu.</h2>
<p>
This menu allows you to choose first action of the mouse on the graph. There is a choice of three options:
</p>
<ul>
<li>The selected tool is the default. By moving the mouse, a point moves on the function and the coordinates of this point are shown in the top left of the display.</li>
<li>The second tool is moving. It allows you to move the chart with the mouse. Just keep clicking on the display and move the mouse. Unfortunately, this tool can be slow on some browsers.</li>
<li>The third tool is the tangent. This tool draws the tangent to the function at the point where is a mouse cursor.</li>
</ul>
<p>
Then, this menu also allows to calculate a point of the function. Simply enter the coordinate "x" from the point where we want to find the coordinate "y" and press the "Evaluate". For example, if the function is "x * x" and that defined "x = 2", then the point whose coordinate on the X axis is "2" will be to coordinate on the Y axis "4".
</p>
<p>
Another useful tool is the analysis of function. To analyse the function click on "start the analysis". Analyses based on this widget are not 100% reliable, but are complementary to a analysis of function that you are doing yourself. It may be that this tool will be improved in a future version of the widget.
</p>
<p>
In this menu there are also tests the display. They can try different methods to display and see if they work on the browser used.
</p>
<h2 id="PlusieursFonctions">9. Drawing some functions</h2>
<p>
To draw multiple functions simultaneously, click the small "+" button which is located to the right of "View" (point 1). Then, a menu appears.
</p>
<img src="Images/Guide_Plus.png"/>
<p>
The tabs in this menu can go to the history or the additional features (point 2). To add a function click the button to the right of the current function (point 3). Below is a list that contains all the displayed functions (point 4). To remove a function, just click on the "-" button next to it. It is also possible to change the color of each function separately.
</p>
<p>
History can review all the functions that have already been drawn. When you click on a function of history current function replaced by the function of history.
</p>
<p>
"Drawing several functions simultaneously" mode is only possible with the display method "canvas" in two dimensions, but the history can be used with all methods of display.
</p>
<h2 id="MaJ">10. GraphMe update</h2>
<p>
The latest version of the widget can be downloaded from the following page: <a href="http://gyb.educanet2.ch/tm-widgets/.ws_gen/?15">http://gyb.educanet2.ch/tm-widgets/.ws_gen/?15</a>. To update GraphMe, you can also click on "Update" in the options menu.
</p>
<h2 id="Contact">11. Contact</h2>
<p>
If you want to report a bug, have a suggestion from the widget or just want to ask a question, please contact me by e-mail at: <a href="mailto:yannick.vessaz@gmail.com">yannick.vessaz@gmail.com</a>.
</p>
</body>
</html>
\ No newline at end of file
[Dolphin]
ShowPreview=true
Timestamp=2010,9,5,0,30,37
ViewMode=0
var ctx
var centreX, centreY
var echelle3D = 50
var precisionDroite3D = 0.02
var precisionFonction3D = 0.2
var fonction3D = false
var angle = Math.PI/8
var valeurZoom3D = 1
var gauche3D = -6.5
var droite3D = 6.5
var outilPrecedent = ""
var rouge3D = 0
var vert3D = 1
var bleu3D = 2
var couleurGenerale = 0
function activer3D(){
if(fonction3D){ // Si activé alors on le désative
fonction3D = false
choixOutil(outilPrecedent)
document.getElementById('onglet3D').innerHTML = "3D"
largeur = 500
document.getElementById("affichage").style.width = largeur+"px"
document.getElementById("affichage").style.left = "129px"
document.getElementById("flecheGauche").style.left = "137px"
document.getElementById("flecheHaut").style.left = "345px"
document.getElementById("flecheBas").style.left = "345px"
document.getElementById("gauche").style.display = "block"
document.getElementById("gauche3D").style.display = "none"
var elements = document.getElementsByClassName("menu")
for(var i=0; i<elements.length; i++){
elements[i].style.left = "121px"
}
reinitialiserZoom(5)
}
else{ // Sinon on l'active
fonction3D = true
outilPrecedent = outil
choixOutil("deplacement")
document.getElementById('onglet3D').innerHTML = "2D"
largeur = 570
document.getElementById("affichage").style.width = largeur+"px"
document.getElementById("affichage").style.left = "59px"
document.getElementById("flecheGauche").style.left = "67px"
document.getElementById("flecheHaut").style.left = "290px"
document.getElementById("flecheBas").style.left = "290px"
document.getElementById("gauche").style.display = "none"
document.getElementById("gauche3D").style.display = "block"
var elements = document.getElementsByClassName("menu")
for(var i=0; i<elements.length; i++){
elements[i].style.left = "61px"
}
initialise3D()
}
}
function initialise3D() {
centreX = largeur / 2
centreY = hauteur / 2
document.getElementById("affichage").innerHTML = '<canvas id="canvas" width="'+largeur+'" height="'+hauteur+'"></canvas>'
ctx = document.getElementById('canvas').getContext('2d')
ctx.clearRect(0, 0, 640, 480)
ctx.fillStyle = "rgba(0, 0, 0, 0.5)"
ctx.fillRect(0,0,640,480)
axes()
}
function dessiner3D(eq){
initialise3D()
if(document.getElementById("selectAffichage3D").value == "points"){
var coordX, coordY, coordZ
for(var x=gauche3D; x<droite3D; x+=precisionFonction3D){
for(var y=gauche3D; y<droite3D; y+=precisionFonction3D){
coordX = x
coordY = y
coordZ = eval(eq)
if(isNaN(coordZ)){
continue
}
point3D(coordX, coordY, coordZ)
}
}
}
else{
var x1, y1, z1, x2, y2, z2, x3, y3, z3
var x, y
for(var x1=gauche3D; x1<droite3D; x1+=precisionFonction3D){
for(var y1=gauche3D; y1<droite3D; y1+=precisionFonction3D){
x = x1
y = y1
z1 = eval(eq)
x2 = x1 + precisionFonction3D
y2 = y1
x = x2
//y = y2
z2 = eval(eq)
x3 = x2
y3 = y2 + precisionFonction3D
//x = x3
y = y3
z3 = eval(eq)
x4 = x3 - precisionFonction3D
y4 = y3
x = x4
//y = y4
z4 = eval(eq)
if(isNaN(z1)||isNaN(z2)||isNaN(z3)||isNaN(z4)){
continue
}
polygone3D(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4)
}
}
}
}
// Dessine un point à la position (x, y, z)
function point3D(x, y, z){
var posX = (Math.sin(angle)*x + Math.cos(angle)*y)*echelle3D
var posZ = -(z - Math.cos(angle)*x/2.6 + Math.sin(angle)*y/2.6)*echelle3D
var opacity = Math.round((1-((5+y*Math.sin(angle)-x*Math.cos(angle)) / 450)*echelle3D)*1000)/1000
var couleur = new Array()
couleur[0] = Math.round((5+z)*echelle3D)
couleur[1] = Math.round(510 - (5+z)*echelle3D)
couleur[2] = couleurGenerale
if(opacity > 1){
opacity = 1
}
if(opacity < 0){
opacity = 0
}
if(couleur[0] > 255){
couleur[0] = 255
}
if(couleur[0] < 0){
couleur[0] = 0
}
if(couleur[1] > 255){
couleur[1] = 255
}
if(couleur[1] < 0){
couleur[1] = 0
}
ctx.save()
ctx.translate(centreX, centreY)
ctx.scale(valeurZoom3D, valeurZoom3D)
ctx.fillStyle = "rgba("+couleur[rouge3D]+","+couleur[vert3D]+", "+couleur[bleu3D]+", "+opacity+")"
ctx.fillRect(posX-1, posZ-1, 2, 2)
ctx.restore()
}
// Dessine un polygone qui a comme sommets : (x1, y1, z1) , (x2, y2, z2), (x3, y3, z3) et (x4, y4, z4)
function polygone3D(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4){
ctx.save()
ctx.translate(centreX, centreY)
ctx.scale(valeurZoom3D, valeurZoom3D)
ctx.beginPath()
ctx.moveTo((Math.sin(angle)*x1 + Math.cos(angle)*y1)*echelle3D , -(z1 - Math.cos(angle)*x1/2.6 + Math.sin(angle)*y1/2.6)*echelle3D)
ctx.lineTo((Math.sin(angle)*x2 + Math.cos(angle)*y2)*echelle3D , -(z2 - Math.cos(angle)*x2/2.6 + Math.sin(angle)*y2/2.6)*echelle3D)
ctx.lineTo((Math.sin(angle)*x3 + Math.cos(angle)*y3)*echelle3D , -(z3 - Math.cos(angle)*x3/2.6 + Math.sin(angle)*y3/2.6)*echelle3D)
ctx.lineTo((Math.sin(angle)*x4 + Math.cos(angle)*y4)*echelle3D , -(z4 - Math.cos(angle)*x4/2.6 + Math.sin(angle)*y4/2.6)*echelle3D)
var opacity = Math.round((1-((5+y1*Math.sin(angle)-x1*Math.cos(angle)) / 450)*echelle3D)*1000)/1000
var couleur = new Array()
couleur[0] = Math.round((5+z1)*echelle3D)
couleur[1] = Math.round(510 - (5+z1)*echelle3D)
couleur[2] = couleurGenerale
if(opacity > 1){
opacity = 1
}
if(opacity < 0){
opacity = 0
}
if(couleur[0] > 255){
couleur[0] = 255
}
if(couleur[0] < 0){
couleur[0] = 0
}
if(couleur[1] > 255){
couleur[1] = 255
}
if(couleur[1] < 0){
couleur[1] = 0
}
ctx.fillStyle = "rgba("+couleur[rouge3D]+","+couleur[vert3D]+", "+couleur[bleu3D]+", "+opacity+")"
ctx.closePath()
ctx.fill()
ctx.restore()
}
// Dessine les axes
function axes(){
for(var i=-5; i<5; i+=precisionDroite3D){
point3D(0, 0, i)
}
for(var i=-5.5; i<5.5; i+=precisionDroite3D){
point3D(i, 0, 0)
}
for(var i=-5.5; i<5.5; i+=precisionDroite3D){
point3D(0, i, 0)
}
}
function cube(x, y, z, r){
// Face de devant
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+i, y, z)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r, y+i, z)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r-i, y+r, z)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x, y+r-i, z)
}
// Face de derrière
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+i, y, z+r)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r, y+i, z+r)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r-i, y+r, z+r)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x, y+r-i, z+r)
}
// Arrêtes
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x, y, z+i)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x, y+r, z+i)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r, y, z+i)
}
for(var i=0; i<r; i+=precisionDroite3D){
point3D(x+r, y+r, z+i)
}
}
// Change les couleurs de l'affichage 3D et affiche l'aperçu de celles-ci.
function checkCouleurs3D(){
var rouge, vert, bleu
var sensRouge, sensVert, sensBleu
var precisionApercu = 64
couleurGenerale = parseInt(document.getElementById("couleur3Dgenerale").value)
if(!couleurGenerale){
couleurGenerale = 0
}
if(couleurGenerale < 0){
couleurGenerale = 0
}
if(couleurGenerale > 255){
couleurGenerale = 255
}
switch(document.getElementById("selectRouge3D").value){
case "plus":
rouge3D = 0
rouge = 255
sensRouge = -1
break
case "moins":
rouge3D = 1
rouge = 0
sensRouge = 1
break
case "tout":
rouge3D = 2
rouge = couleurGenerale
sensRouge = 0
break
}
switch(document.getElementById("selectVert3D").value){
case "plus":
vert3D = 0
vert = 255
sensVert = -1
break
case "moins":
vert3D = 1
vert = 0
sensVert = 1
break
case "tout":
vert3D = 2
vert = couleurGenerale
sensVert = 0
break
}
switch(document.getElementById("selectBleu3D").value){
case "plus":
bleu3D = 0
bleu = 255
sensBleu = -1
break
case "moins":
bleu3D = 1
bleu = 0
sensBleu = 1
break
case "tout":
bleu3D = 2
bleu = couleurGenerale
sensBleu = 0
break
}
document.getElementById("apercuCouleur3D").innerHTML = "<span style='background-color:rgba("+rouge+","+vert+","+bleu+",1);color:rgba(0,0,0,0);'>.</span>"
for(var i=0; i<precisionApercu; i++){
rouge = rouge + sensRouge*(256/precisionApercu)
vert = vert + sensVert*(256/precisionApercu)
bleu = bleu + sensBleu*(256/precisionApercu)
document.getElementById("apercuCouleur3D").innerHTML = document.getElementById("apercuCouleur3D").innerHTML + "<span style='background-color:rgba("+rouge+","+vert+","+bleu+",1);color:rgba(0,0,0,0);'>.</span>"
}
}
function zoom3D(valeur){
valeurZoom3D *= valeur
gauche3D /= valeur
droite3D /= valeur
precisionFonction3D /= valeur
precisionDroite3D /= valeur
//alert(valeurZoom3D+" ; "+gauche3D+" ; "+droite3D+" ; "+precisionFonction3D+" ; "+precisionDroite3D)
actualiserGraph()
}
\ No newline at end of file
// ------------------ SVG et canvas ------------------
// Cette fonction calcule tous les points de la fonction mathématique.
// Elle place chaque coordonnée "x" et "y" dans les tableaux "pointX" et "pointY"
// A la fin, elle choisi la méthode d'affichage entre :
// 1) une seule image SVG
// 2) plusieurs images SVG
function evaluerSVG(eq) {
borneXGauche = parseFloat(document.getElementById("borneXGauche").value)
borneXDroite = parseFloat(document.getElementById("borneXDroite").value)
borneYGauche = parseFloat(document.getElementById("borneYGauche").value)
borneYDroite = parseFloat(document.getElementById("borneYDroite").value)
multiplicateurX = largeur/Math.abs(borneXDroite - borneXGauche)
multiplicateurY = hauteur/Math.abs(borneYDroite - borneYGauche)
lineWidth = document.getElementById("inputTaille").value
var i = 0
var y1, p1
for(x=borneXGauche; x<=(borneXDroite+5*precision); x=x+precision){
y = eval(eq)
if(!isNaN(y)){
i++
pointX[i] = (x - borneXGauche) * multiplicateurX
pointY[i] = hauteur - ((y - borneYGauche) * multiplicateurY)
pente[i] = hauteur - (((y-y1)/precision - borneYGauche)* multiplicateurY)
pente2[i] = hauteur - ((((y-y1)/precision-p1)/precision - borneYGauche)* multiplicateurY)
p1 = (y-y1)/precision
y1 = y
}
}
pente[1]=pente[2]
pente2[2]=pente2[3]
pente2[1]=pente2[2]
//alert(pointX+'\n'+pointY)
if(document.getElementById("selectMethodeAffichage").value == "svg2"){
calculerGraphSVG2(i)
}
else{
calculerGraphSVG(i)
}
}
// Même fonction mais pour dessiner à l'aide de canvas
function evaluerCanvas(eq) {
borneXGauche = parseFloat(document.getElementById("borneXGauche").value)
borneXDroite = parseFloat(document.getElementById("borneXDroite").value)
borneYGauche = parseFloat(document.getElementById("borneYGauche").value)
borneYDroite = parseFloat(document.getElementById("borneYDroite").value)
multiplicateurX = largeur/Math.abs(borneXDroite - borneXGauche)
multiplicateurY = hauteur/Math.abs(borneYDroite - borneYGauche)
lineWidth = document.getElementById("inputTaille").value
var i = 0
var y1, p1
for(x=borneXGauche; x<=(borneXDroite+5*precision); x=x+precision){
y = eval(eq)
i++
if(!isNaN(y)){
pointX[i] = (x - borneXGauche) * multiplicateurX
pointY[i] = hauteur - ((y - borneYGauche) * multiplicateurY)
pente[i] = hauteur - (((y-y1)/precision - borneYGauche)* multiplicateurY)
pente2[i] = hauteur - ((((y-y1)/precision-p1)/precision - borneYGauche)* multiplicateurY)
p1 = (y-y1)/precision
y1 = y
}
else{
pointX[i] = "undefined"
pointY[i] = "undefined"
pente[i] = "undefined"
pente2[i] = "undefined"
}
}
pente[1]=pente[2]
pente2[2]=pente2[3]
pente2[1]=pente2[2]
calculerGraphCanevas(i)
}
// ---- SVG (une image) ----
// Génère le code HTML qui permet d'afficher le graphique et le place dans la div "affichage"
function calculerGraphSVG2(fin){
image = ""
for (i=1; i<fin; i++){
image = image + '<line x1="'+pointX[i]+'" y1="'+pointY[i]+'" x2="'+pointX[i+1]+'" y2="'+pointY[i+1]+'" style="stroke:'+couleurFonction+';stroke-width:2;"/>'
}
graphique = '<line x1="'+(-borneXGauche*multiplicateurX)+'" y1="'+0+'" x2="'+(-borneXGauche*multiplicateurX)+'" y2="'+hauteur+'" style="stroke:rgb(0,0,0);stroke-width:2;opacity:0.3;"/>'
graphique = graphique + '<line x1="'+0+'" y1="'+(hauteur-(-borneYGauche*multiplicateurY))+'" x2="'+largeur+'" y2="'+(hauteur-(-borneYGauche*multiplicateurY))+'" style="stroke:rgb(0,0,0);stroke-width:2;opacity:0.3;"/>'
image = '<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">'+image+graphique+'</svg> '
document.getElementById("affichage").innerHTML = image
//alert(image)
}
// ---- SVG (images multiples) ----
// Créé les différents éléments pour dessiner la fonction mathématique
// et les place dans la div "affichage"
function calculerGraphSVG(fin){
document.getElementById("affichage").innerHTML = ""
svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
svg.setAttribute("width", "100%")
svg.setAttribute("height", "100%")
for (i=1; i<fin; i++){
if ((pointY[i]<0) && (pointY[i+1]>hauteur)){
i++
}
if ((pointY[i]>hauteur) && (pointY[i+1]<0)){
i++
}
var ligne = document.createElementNS("http://www.w3.org/2000/svg", "line")
ligne.setAttribute("x1", pointX[i]+decalageX)
ligne.setAttribute("x2", pointX[i+1]+decalageX)
ligne.setAttribute("y1", pointY[i]+decalageY)
ligne.setAttribute("y2", pointY[i+1]+decalageY)
ligne.setAttribute("stroke", couleurFonction)
ligne.setAttribute("stroke-width", lineWidth)
svg.appendChild(ligne)
}
// dérivée
if(document.getElementById("checkDerivee").checked){
for (i=1; i<fin; i++){
var ligne = document.createElementNS("http://www.w3.org/2000/svg", "line")
ligne.setAttribute("x1", pointX[i]+decalageX)
ligne.setAttribute("x2", pointX[i+1]+decalageX)
ligne.setAttribute("y1", pente[i]+decalageY)
ligne.setAttribute("y2", pente[i+1]+decalageY)
ligne.setAttribute("stroke", "white")
ligne.setAttribute("stroke-width", lineWidth)
ligne.setAttribute("opacity", "0.8")
svg.appendChild(ligne)
}
}
if(document.getElementById("checkAxes").checked){
calculerAxes()
}
calculerGrilleEchelle()
document.getElementById("affichage").appendChild(svg)
}
// axes
function calculerAxes(){
var ligne = document.createElementNS("http://www.w3.org/2000/svg", "line")
ligne.setAttribute("x1", (-borneXGauche*multiplicateurX)+decalageX)
ligne.setAttribute("y1", 0+decalageY)
ligne.setAttribute("x2", (-borneXGauche*multiplicateurX)+decalageX)
ligne.setAttribute("y2", hauteur+decalageY)
ligne.setAttribute("stroke", "rgb(0,0,0)")
ligne.setAttribute("stroke-width", "2")
ligne.setAttribute("opacity", "0.3")
svg.appendChild(ligne)
var ligne = document.createElementNS("http://www.w3.org/2000/svg", "line")
ligne.setAttribute("x1", 0+decalageX)
ligne.setAttribute("y1", (hauteur-(-borneYGauche*multiplicateurY))+decalageY)
ligne.setAttribute("x2", largeur+decalageX)
ligne.setAttribute("y2", (hauteur-(-borneYGauche*multiplicateurY))+decalageY)
ligne.setAttribute("stroke", "rgb(0,0,0)")
ligne.setAttribute("stroke-width", "2")
ligne.setAttribute("opacity", "0.3")
svg.appendChild(ligne)
}
// grille et échelle
function calculerGrilleEchelle(){
var intervalX = Math.round(Math.abs(borneXGauche-borneXDroite)/10)
var intervalY = Math.round(Math.abs(borneYGauche-borneYDroite)/10)
var initialX = Math.round(-borneXGauche) % intervalX
var initialY = Math.round(-borneYGauche) % intervalY
for(var i=initialX;i<=Math.round(borneXDroite-borneXGauche);i=i+intervalX){
var position = Math.round((Math.round(borneXGauche) - borneXGauche +i) * multiplicateurX)
if(document.getElementById("checkGrille").checked){
var grille = document.createElementNS("http://www.w3.org/2000/svg", "line")
grille.setAttribute("x1", position)
grille.setAttribute("y1", 0)
grille.setAttribute("x2", position)
grille.setAttribute("y2", hauteur)
grille.setAttribute("stroke", "rgb(0,0,0)")
grille.setAttribute("stroke-width", "2")
grille.setAttribute("opacity", "0.05")
svg.appendChild(grille)
}
if(document.getElementById("checkEchelle").checked){
var txt = document.createElementNS("http://www.w3.org/2000/svg", "text")
txt.appendChild(document.createTextNode(i+borneXGauche))
txt.setAttribute("x", position-6)
txt.setAttribute("y", (hauteur-(-borneYGauche*multiplicateurY))+decalageY-2)
txt.setAttribute("fill-opacity", 0.6)
txt.setAttribute("fill", couleurEchelle)
svg.appendChild(txt)
}
}
for(var i=initialY;i<=Math.round(borneYDroite-borneYGauche);i=i+intervalY){
var position = hauteur - Math.round((Math.round(borneYGauche) - borneYGauche +i) * multiplicateurY)
if(document.getElementById("checkGrille").checked){
var grille = document.createElementNS("http://www.w3.org/2000/svg", "line")
grille.setAttribute("x1", 0)
grille.setAttribute("y1", position)
grille.setAttribute("x2", largeur)
grille.setAttribute("y2", position)
grille.setAttribute("stroke", "rgb(0,0,0)")
grille.setAttribute("stroke-width", "2")
grille.setAttribute("opacity", "0.05")
svg.appendChild(grille)
}
if(document.getElementById("checkEchelle").checked){
var txt = document.createElementNS("http://www.w3.org/2000/svg", "text")
txt.appendChild(document.createTextNode(i+borneYGauche))
txt.setAttribute("x", (-borneXGauche*multiplicateurX)+decalageX+2)
txt.setAttribute("y", position+6)
txt.setAttribute("fill-opacity", 0.6)
txt.setAttribute("fill", couleurEchelle)
svg.appendChild(txt)
}
}
}
// ---- Canevas ----
// Permet de générer le code HTML nécessaire à canvas et dessine la fonction
// à l'aide de lignes dans la zone de canvas.
function calculerGraphCanevas(fin){
document.getElementById("affichage").innerHTML = '<canvas id="canvas" width="'+largeur+'" height="'+hauteur+'"></canvas>'
ctx = document.getElementById('canvas').getContext('2d')
var undefined = true
// Autres fonctions
for(var i=0; i<listeFonctions.length; i++){
ctx.beginPath()
x = borneXGauche-3*precision
y = eval(listeFonctions[i])
if(isNaN(y)){
ctx.moveTo(x, 0)
}
else{
ctx.moveTo(x, y)
}
ctx.strokeStyle = listeCouleurs[i]
ctx.fillStyle = listeCouleurs[i]
ctx.lineWidth = lineWidth
for(x=borneXGauche-2*precision; x<=(borneXDroite+2*precision); x+=precision){
y = eval(listeFonctions[i])
if(!isNaN(y)){
ctx.lineTo((x - borneXGauche) * multiplicateurX+decalageX, hauteur - ((y - borneYGauche) * multiplicateurY)+decalageY)
/*pente[i] = hauteur - ((10*(y-y1) - borneYGauche) * multiplicateurY)*/
}
}
ctx.stroke()
}
// aire sous la fonctions
if(document.getElementById("checkAire").checked){
ctx.strokeStyle = "rgba(255,255,255,0)";
ctx.fillStyle = "rgba(0,180,255,0.3)";
var a = parseInt(document.getElementById("aireG").value);
var b = parseInt(document.getElementById("aireD").value);
var fct = document.getElementById("inputEq").value;
var f = function(x){
return eval(fct);
};
var convertX = function(nbr){
return (nbr - borneXGauche) * multiplicateurX;
};
var convertY = function(nbr){
return hauteur - ((nbr - borneYGauche) * multiplicateurY)
};
var n = 5000/(borneXDroite-borneXGauche);
var aire, largeurRect, gaucheRect, droiteRect, millieuRect, hauteurRect, aireRect;
aire = 0;
largeurRect = (b-a)/n;
for(var i=0; i<n; i++){
gaucheRect = a + i*largeurRect;
droiteRect = a + (i+1)*largeurRect;
millieuRect = (gaucheRect+droiteRect) / 2;
hauteurRect = f(millieuRect);
//aireRect = largeurRect * hauteurRect;
//aire = aire + aireRect;
try{
ctx.fillRect(convertX(gaucheRect), convertY(hauteurRect), 2, hauteurRect*multiplicateurY);
}
catch(err){
}
}
}
// fonction
ctx.beginPath()
//ctx.moveTo(pointX[1]+decalageX, pointY[1]+decalageY)
ctx.strokeStyle = couleurFonction
ctx.fillStyle = couleurFonction
ctx.lineWidth = lineWidth
if(document.getElementById("selectMethodeAffichage").value == "canvas"){
for (i=1; i<fin; i++){
if(isNaN(pointX[i]) || isNaN(pointY[i])){
undefined = true
}
else{
if(undefined){
ctx.moveTo(pointX[i]+decalageX, pointY[i]+decalageY)
}
undefined = false
ctx.lineTo(pointX[i]+decalageX, pointY[i]+decalageY)
}
}
ctx.stroke()
}
else{
for (i=1; i<fin; i++){
if(!isNaN(pointX[i]) && !isNaN(pointY[i])){
ctx.moveTo(pointX[i]+decalageX, pointY[i]+decalageY)
ctx.arc(pointX[i]+decalageX, pointY[i]+decalageY, lineWidth/2, 0, 2*Math.PI, false)
}
}
ctx.fill()
//ctx.stroke()
}
// dérivée première
if(document.getElementById("checkDerivee").checked){
undefined = true
ctx.beginPath()
ctx.strokeStyle = "rgba(255, 255, 255, 0.8)"
ctx.fillStyle = "rgba(255, 255, 255, 0.8)"
ctx.lineWidth = lineWidth
//ctx.moveTo(pointX[1]+decalageX, pente[1]+decalageY)
for (i=1; i<fin; i++){
if(isNaN(pointX[i]) || isNaN(pente[i])){
undefined = true
}
else{
if(undefined){
try{
ctx.moveTo(pointX[i]+decalageX, pente[i]+decalageY)
}
catch(err){
//alert(";"+pente[i]+" ; "+pointX[i])
}
}
undefined = false
try{
ctx.lineTo(pointX[i]+decalageX, pente[i]+decalageY)
}
catch(err){
//alert(pente[i]+" ; "+pointX[i])
}
}
}
ctx.stroke()
}
// dérivée seconde
if(document.getElementById("checkDerivee2").checked){
undefined = true
ctx.beginPath()
ctx.strokeStyle = "rgba(150, 150, 150, 0.8)"
ctx.fillStyle = "rgba(150, 150, 150, 0.8)"
ctx.lineWidth = lineWidth
//ctx.moveTo(pointX[1]+decalageX, pente2[1]+decalageY)
for (i=1; i<fin-1; i++){
if(isNaN(pointX[i]) || isNaN(pente2[i])){
undefined = true
}
else{
if(undefined){
try{
ctx.moveTo(pointX[i+2]+decalageX, pente2[i+2]+decalageY)
}
catch(err){
}
}
undefined = false
try{
ctx.lineTo(pointX[i+2]+decalageX, pente2[i+2]+decalageY)
}
catch(err){
}
}
}
ctx.stroke()
}
// grille et échelle
var intervalX = Math.round(Math.abs(borneXGauche-borneXDroite)/10)
var intervalY = Math.round(Math.abs(borneYGauche-borneYDroite)/10)
var initialX = Math.round(-borneXGauche) % intervalX
var initialY = Math.round(-borneYGauche) % intervalY
ctx.beginPath()
ctx.fillStyle = couleurEchelle
ctx.lineWidth = "2"
for(var i=initialX;i<=Math.round(borneXDroite-borneXGauche);i=i+intervalX){
var position = Math.round((Math.round(borneXGauche) - borneXGauche +i) * multiplicateurX)
if(document.getElementById("checkGrille").checked){
ctx.moveTo(position, 0)
ctx.lineTo(position, hauteur)
}
if(document.getElementById("checkEchelle").checked){
ctx.fillText(Math.ceil(i+borneXGauche), position-6, (hauteur-(-borneYGauche*multiplicateurY))+decalageY-2)
}
}
for(var i=initialY;i<=Math.round(borneYDroite-borneYGauche);i=i+intervalY){
var position = hauteur - Math.round((Math.round(borneYGauche) - borneYGauche +i) * multiplicateurY)
if(document.getElementById("checkGrille").checked){
ctx.moveTo(0, position)
ctx.lineTo(largeur, position)
}
if(document.getElementById("checkEchelle").checked){
ctx.fillText(Math.ceil(i+borneYGauche), (-borneXGauche*multiplicateurX)+decalageX+2, position+6)
}
}
ctx.strokeStyle = couleurGrille
ctx.stroke()
// axes
if(document.getElementById("checkAxes").checked){
ctx.beginPath()
ctx.strokeStyle = couleurAxes
ctx.lineWidth = "2"
ctx.moveTo((-borneXGauche*multiplicateurX)+decalageX, 0+decalageY)
ctx.lineTo((-borneXGauche*multiplicateurX)+decalageX, hauteur+decalageY)
ctx.moveTo(0+decalageX, (hauteur-(-borneYGauche*multiplicateurY))+decalageY)
ctx.lineTo(largeur+decalageX, (hauteur-(-borneYGauche*multiplicateurY))+decalageY)
ctx.stroke()
}
}
// -------------------- sankore --------------------
// Ces fonctions permettent de dessiner le graphique directement dans sankore.
// Calcule tous les points de la fonction mathématique et les place dans des tableaux.
function evaluerUniboard(eq) {
largeur += 100
hauteur += 100
decalageX -= 250
decalageY -= 200
borneXGauche = parseFloat(document.getElementById("borneXGauche").value)
borneXDroite = parseFloat(document.getElementById("borneXDroite").value)
borneYGauche = parseFloat(document.getElementById("borneYGauche").value)
borneYDroite = parseFloat(document.getElementById("borneYDroite").value)
multiplicateurX = (largeur)/Math.abs(borneXDroite - borneXGauche)
multiplicateurY = (hauteur)/Math.abs(borneYDroite - borneYGauche)
lineWidth = document.getElementById("inputTaille").value
var i = 0
BoucleFor: for(x=borneXGauche; x<=(borneXDroite+0); x=x+precision){
i++
y = eval(eq)
pointX[i] = Math.round((x - borneXGauche) * multiplicateurX)
pointY[i] = hauteur - Math.round((y - borneYGauche) * multiplicateurY)
}
calculerGraphUniboard(i)
}
// Regarde chaque coordonnées stockées dans le tableau et dessine le graphique
function calculerGraphUniboard(fin){
document.getElementById("affichage").innerHTML = ""
sankore.setTool('pen')
sankore.moveTo(pointX[2]+decalageX, pointY[2]+decalageY)
for (i=3; i<fin; i++){
if ((pointY[i]<0) || (pointY[i]>hauteur)){
sankore.moveTo(pointX[i+1]+decalageX,pointY[i+1]+decalageY)
continue
}
sankore.drawLineTo(pointX[i]+decalageX, pointY[i]+decalageY, lineWidth)
}
//dessiner le cadre
sankore.moveTo(0+decalageX,0+decalageY)
sankore.drawLineTo(largeur+decalageX, 0+decalageY, lineWidth)
sankore.drawLineTo(largeur+decalageX, hauteur+decalageY, lineWidth)
sankore.drawLineTo(0+decalageX, hauteur+decalageY, lineWidth)
sankore.drawLineTo(0+decalageX, 0+decalageY, lineWidth)
//dessiner les axes
sankore.moveTo((-borneXGauche*multiplicateurX)+decalageX, 0+decalageY)
sankore.drawLineTo((-borneXGauche*multiplicateurX)+decalageX, hauteur+decalageY, lineWidth)
sankore.moveTo(0+decalageX, (hauteur-(-borneYGauche*multiplicateurY))+decalageY)
sankore.drawLineTo(largeur+decalageX, (hauteur-(-borneYGauche*multiplicateurY))+decalageY, lineWidth)
decalageX += 250
decalageY += 200
largeur -= 100
hauteur -= 100
sankore.setTool('arrow')
}
\ No newline at end of file
// -------------------- XPM --------------------
// Diverses fonctions permettant de dessiner la fonction mathématique à
// l'aide d'une image au format XPM
// Permet de calculer tous les points de l'image et de les placer dans un tableau.
// Chaque "case" du tableau est un point de l'image.
// Plus tard, chaque pixel de l'image correspondra a une case du tableau.
// Le pixel sera blanc si la "case" vaut 0 et sera noir si la "case" vaut 1
function evaluerXPM(eq){
tableauUni(0)
var y = 0
BoucleFor: for (x=0; x<largeur; x++){
y = Math.round(eval(eq))
if (y>hauteur-1){ break BoucleFor }
tableau[y][x] = 1
}
tableau.reverse()
graphique = ""
calculerGraphXPM()
}
// Permet de remplir le tableau avec uniquement des 1 ou des 0.
// (pour que l'image soit toute blanche ou toute noir)
function tableauUni(valeurCouleur){
for (i=0; i<hauteur; i++){
ligne = new Array()
for (k=0; k<largeur; k++){
ligne.push(valeurCouleur)
}
tableau[i] = ligne
}
graphique = ""
calculerGraphXPM()
}
// Cette fonction regarde chaque "case" du tableau.
// Elle permet de générer le texte ASCII de l'image XPM.
function calculerGraphXPM() {
graphique = graphique + '"'
for (i=0; i<largeur; i++){
switch (tableau[j][i]){
case 1:
graphique = graphique + ' '
break
default:
graphique = graphique + '.'
break
}
}
j++
graphique = graphique + '",'
if (j == hauteur){
afficherGraphXPM()
j = 0
return true
}
calculerGraphXPM()
}
// Cette fonction génére le code HTML nécessaire à afficher l'image XPM.
// Elle place ce code dans la div "affichage" ce qui permet d'afficher le graphique.
function afficherGraphXPM(){
image = "<img src='data:image/xpm;ASCII,"+'/* XPM */static char * test_xpm[] = {"'+largeur+' '+hauteur+' 2 1"," c #000000",". c #FFFFFF",' + graphique + "};'"+" />"
document.getElementById("affichage").innerHTML = image
}
\ No newline at end of file
// -------------------- Color Picker --------------------
var idColor = ""
// Différentes fonctions nécessaire au Color Picker (menu du choix de la couleur)
function colorSV(e){
var element = document.getElementById('colorSV')
var posDivY = 0
var posDivX = 0
while(element){
posDivY = posDivY + element.offsetTop
posDivX = posDivX + element.offsetLeft
element = element.offsetParent
}
document.getElementById("info").innerHTML = posDivX+" ; "+posDivY
S = 100-Math.round((e.clientY - posDivY -0)/255*100)
V = Math.round((e.clientX - posDivX -0)/255*100)
document.getElementById("inputValeur").value = V
document.getElementById("inputSaturation").value = S
document.getElementById("ligneValeur").setAttribute("x1", e.clientX-posDivX)
document.getElementById("ligneValeur").setAttribute("x2", e.clientX-posDivX)
document.getElementById("ligneSaturation").setAttribute("y1", e.clientY-posDivY)
document.getElementById("ligneSaturation").setAttribute("y2", e.clientY-posDivY)
colorRGB()
}
function colorT(e){
var element = document.getElementById('colorT')
var posDiv = 0
while(element){
posDiv = posDiv + element.offsetTop
element = element.offsetParent
}
T = (e.clientY - posDiv -0) / 256*360
r,g,b = 0
while (true){
if (T<60){
r = 255
g = T/60*255
b = 0
break
}
if (T<=120){
r = (255-(T%60/60*255))%256
g = 255
b = 0
break
}
if (T<180){
r = 0
g = 255
b = T%60/60*255
break
}
if (T<=240){
r = 0
g = (255-(T%60/60*255))%256
b = 255
break
}
if (T<300){
r = T%60/60*255
g = 0
b = 255
break
}
if (T<360){
r = 255
g = 0
b = (255-(T%60/60*255))%256
break
}
r = 255
g = 0
b = 0
break
}
T = Math.round(T)
r = Math.round(r)
g = Math.round(g)
b = Math.round(b)
document.getElementById("inputTeinte").value = T
document.getElementById("colorSV").style.backgroundColor = "rgb("+r+","+g+","+b+")"
document.getElementById("ligneTeinte").setAttribute("y2", e.clientY-posDiv)
document.getElementById("ligneTeinte").setAttribute("y1", e.clientY-posDiv)
colorRGB()
}
function colorRGB(){
var S = document.getElementById("inputSaturation").value
var V = document.getElementById("inputValeur").value
var rouge = Math.round((r + (255-r) * (-1) * (S-100) / 100 )* V / 100)
var vert = Math.round((g + (255-g) * (-1) * (S-100) / 100 )* V / 100)
var bleu = Math.round((b + (255-b) * (-1) * (S-100) / 100 )* V / 100)
document.getElementById("inputRouge").value = rouge
document.getElementById("inputVert").value = vert
document.getElementById("inputBleu").value = bleu
eval(document.getElementById(idColor).title+' = "rgba(" + rouge +", " + vert + ", " + bleu +", "+document.getElementById("inputOpacity").value+")"')
document.getElementById(idColor).style.backgroundColor = eval(document.getElementById(idColor).title)
document.getElementById("apercuCouleur").style.backgroundColor = eval(document.getElementById(idColor).title)
}
function colorPicker(id){
idColor = id
document.getElementById("apercuCouleur").style.backgroundColor = eval(document.getElementById(idColor).title)
document.getElementById("apercuCouleur2").style.backgroundColor = eval(document.getElementById(idColor).title)
}
// -------------------- Etude de fonctions --------------------
var etudeX = new Array()
var etudeY = new Array()
var etudeD = new Array()
var limGauche = new Array()
var limDroite = new Array()
var listeIndefini = new Array()
var listeZeros = new Array()
var intervalEtudeGauche = -50
var intervalEtudeDroite = 50
var precisionEtude = 0.001
function etudier(fct){
if(check(fct)){
prepareEtude(fct)
pariteFct()
signeFct(fct)
asymptotes()
courbure()
ensembleDefinition()
}
}
// Préparation à l'étude de fonction
function prepareEtude(fct){
listeIndefini = new Array()
var f = function(x){
return eval(fct)
}
// Calcul de tous les points de la fonction
var i = 0
for(var x=intervalEtudeGauche; x<=intervalEtudeDroite; x+=precisionEtude){
etudeX[i] = x
etudeY[i] = Math.round(f(x)*10000)/10000
etudeD[i] = Math.round(1000000*(f(x+0.0001)-f(x-0.0001))/(2*0.0001))/1000000
i++
}
// Calcul des extrémités de la fonction
var x = -100000
limGauche[0] = f(x)
x = -10000
limGauche[1] = f(x)
x = 100000
limDroite[0] = f(x)
x = 10000
limDroite[1] = f(x)
}
// Recherche de l'ensemble de définition
function ensembleDefinition(){
var fctDefinie = false
var dejaDefinie = false
var EDF = ""
if(!isNaN(limGauche[0])){
fctDefinie = true
dejaDefinie = true
EDF += "]-∞;"
}
if(!isNaN(limGauche[1]) && !fctDefinie){
fctDefinie = true
dejaDefinie = true
EDF += "]-∞;"
}
for(var i=0; i<etudeX.length; i++){
if(fctDefinie && isNaN(etudeY[i])){
fctDefinie = false
EDF += (parseInt(etudeX[i]/precisionEtude)*precisionEtude)+"["
}
else if(!fctDefinie && !isNaN(etudeY[i])){
fctDefinie = true
if(dejaDefinie){
EDF += " u "
}
EDF += "["+(parseInt(etudeX[i]/precisionEtude)*precisionEtude)+";"
dejaDefinie = true
}
}
if(fctDefinie && !isNaN(limDroite[1])){
fctDefinie = false
EDF += "+∞["
}
if(fctDefinie && !isNaN(limDroite[0])){
fctDefinie = false
EDF += "+∞["
}
for(var i=0; i<listeIndefini.length; i++){
if(i==0){
EDF += " - {"
}
EDF += listeIndefini[i]
if(i==listeIndefini.length-1){
EDF += "}"
}
else
EDF += ";"
}
document.getElementById('etudeEDF').innerHTML = EDF
}
// Etude de la parité
function pariteFct(){
var posZero
var paire = true
var impaire = true
var positif, negatif
var precisionParite = 1000
for(var i=0;i<etudeX.length;i++){
if(Math.round(etudeX[i]*precisionParite)/precisionParite==0){
posZero = i
}
}
for(var i=1; i<etudeX.length/2; i++){
if(etudeY[posZero+i]>0){
positif = Math.floor(etudeY[posZero+i])
}
else{
positif = Math.ceil(etudeY[posZero+i])
}
if(etudeY[posZero-i]>0){
negatif = Math.floor(etudeY[posZero-i])
}
else{
negatif = Math.ceil(etudeY[posZero-i])
}
if(positif<25000 && positif>-25000){
if(positif != negatif){
paire = false
//alert(i+" ; "+posZero+" ; "+etudeX.length+" ; "+positif+" ; "+negatif)
}
if(positif != (-negatif)){
impaire = false
}
}
}
if(paire){
document.getElementById("etudeParite").innerHTML = sankoreLang[lang].ev;
}
else if(impaire){
document.getElementById("etudeParite").innerHTML = sankoreLang[lang].unev;
}
else{
document.getElementById("etudeParite").innerHTML = sankoreLang[lang].na;
}
}
function zeroFct(){
listeZeros = new Array()
var listeZerosArr = new Array()
var precZeros = 5
for(var i=0; i<etudeX.length; i++){
if(Math.round(etudeY[i]*1000)/1000==0){
var nouveauZero = Math.round(etudeX[i]*precZeros)/precZeros
if(listeZerosArr[listeZerosArr.length-1]!=nouveauZero){
listeZeros.push(Math.round(etudeX[i]*10)/10)
listeZerosArr.push(nouveauZero)
}
}
}
}
function signeFct(fct){
var signe = new Array()
var signePlus = new Array()
var signeMoins = new Array()
var dernier = 0
if(limGauche[0]>0){
signe[0] = "+"
signePlus[0] = limGauche[1]
signeMoins[0] = limGauche[0]
}
else{
signe[0] = "-"
signePlus[0] = limGauche[1]
signeMoins[0] = limGauche[0]
}
for(var i=0; i<etudeY.length; i++){
if(signe[signe.length-1]=="+"){
if(etudeY[i]<0){
signe.push("-")
signePlus.push(etudeX[i])
signeMoins.push(etudeX[dernier])
}
else if(etudeY[i]>0){
dernier = i
}
}
if(signe[signe.length-1]=="-"){
if(etudeY[i]>0){
signe.push("+")
signePlus.push(etudeX[i])
signeMoins.push(etudeX[dernier])
//alert(signe+" ; "+signePlus+'\n'+etudeY[i+1]+" ; "+etudeY[i]+" ; "+etudeY[i-1]+" ; "+etudeY[i-2]+'\n'+etudeX[i+1]+" ; "+etudeX[i]+" ; "+etudeX[i-1]+" ; "+etudeX[i-2])
}
else if(etudeY[i]<0){
dernier = i
}
}
}
var valeurPlus, valeurMoins, millieu, precisionZero
listeZeros = new Array()
for(var i=1; i<signePlus.length; i++){
valeurPlus = signePlus[i]
valeurMoins = signeMoins[i]
for(var k=0;k<10000;k++){
millieu = (valeurPlus + valeurMoins)/2
x = valeurPlus
if(eval(fct)>0){
x = millieu
if(eval(fct)>0){
valeurPlus=millieu
}
else if(eval(fct)<0){
valeurMoins=millieu
}
else{
break
}
}
else if(eval(fct)<0){
x = millieu
if(eval(fct)<0){
valeurPlus=millieu
}
else if(eval(fct)>0){
valeurMoins=millieu
}
else{
break
}
}
else{
millieu = valeurPlus
break
}
x = valeurPlus
precisionZero = eval(fct)
x = valeurMoins
precisionZero -= eval(fct)
if(precisionZero>0.0001){
break
}
}
listeZeros.push(Math.round(millieu*100)/100)
}
var texteZeros = ""
if(listeZeros==""){
zeroFct()
texteZeros = "~ "
}
var texte = sankoreLang[lang].signe;
var aSupprimer = new Array()
for(var i=0; i<signe.length; i++){
texte += "<td>"+signe[i]+"</td>"
if(listeZeros[i]!=undefined){
x = listeZeros[i]
if(isFinite(eval(fct))){
texte += "<td class='border'>"+listeZeros[i]+"</td>"
}
else{
texte += "<td class='border infini'>"+listeZeros[i]+"</td>"
listeIndefini.push(listeZeros[i])
aSupprimer.push(i)
}
}
}
document.getElementById("etudeSigne").innerHTML = texte
for(var i=0; i<aSupprimer.length; i++){
listeZeros.splice((aSupprimer[i]-i), 1)
}
if(listeZeros==""){
texteZeros = sankoreLang[lang].na;
}
document.getElementById("etudeZeros").innerHTML = texteZeros+listeZeros
}
function asymptotes(){
// Horizontales
if(Math.abs(limGauche[0])<1000){
var limRound = Math.round(limGauche[0]*100)/100
if(limGauche[0]<limRound){
document.getElementById("etudeAHG").innerHTML = "y = "+limRound +" <span class='texteSecondaire'>" + sankoreLang[lang].curve_higher + "</span>"
}
else if(limGauche[0]>limRound){
document.getElementById("etudeAHG").innerHTML = "y = "+limRound +" <span class='texteSecondaire'>" + sankoreLang[lang].curve_lower + "</span>"
}
else{
document.getElementById("etudeAHG").innerHTML = "y = "+limRound
}
}
else{
document.getElementById("etudeAHG").innerHTML = sankoreLang[lang].na;
}
if(Math.abs(limDroite[0])<1000){
var limRound = Math.round(limDroite[0]*100)/100
if(limDroite[0]<limRound){
document.getElementById("etudeAHD").innerHTML = "y = "+limRound +" <span class='texteSecondaire'>" + sankoreLang[lang].curve_lower + "</span>"
}
else if(limDroite[0]>limRound){
document.getElementById("etudeAHD").innerHTML = "y = "+limRound +" <span class='texteSecondaire'>" + sankoreLang[lang].curve_higher + "</span>"
}
else{
document.getElementById("etudeAHD").innerHTML = "y = "+limRound
}
}
else{
document.getElementById("etudeAHD").innerHTML = sankoreLang[lang].na;
}
// Verticales
var texteAV = ""
for(var i=0; i<listeIndefini.length; i++){
texteAV += "x = "+listeIndefini[i]
if(listeIndefini[i+1]!=undefined){
texteAV += " ; "
}
}
if(texteAV==""){
texteAV = sankoreLang[lang].na + " <br/>"
}
document.getElementById("etudeAV").innerHTML = texteAV
}
function courbure(){
var texteMin = "";
var texteMax = "";
var texteI = "";
var nbrI = 0;
var i;
for(i=0; i<etudeD.length; i++){
if(etudeD[i]==0){
if(etudeD[i-1]<0 && etudeD[i+1]>0){
texteMin += "<br/>" + sankoreLang[lang].min + "("+Math.round(etudeX[i]*10000)/10000+";"+etudeY[i]+")";
}
else if(etudeD[i-1]>0 && etudeD[i+1]<0){
texteMax += "<br/>" + sankoreLang[lang].max + "("+Math.round(etudeX[i]*10000)/10000+";"+etudeY[i]+")";
}
else{
nbrI++;
texteI += '<br/>I<span style="vertical-align:sub;font-size:50%;">'+nbrI+"</span>("+Math.round(etudeX[i]*10000)/10000+";"+etudeY[i]+")";
}
}
}
if(texteMin==""){
texteMin = "<br/>" + sankoreLang[lang].no_min;
}
if(texteMax==""){
texteMax = "<br/>" + sankoreLang[lang].no_max;
}
if(texteI==""){
texteI = "<br/>Aucun I";
}
document.getElementById("etudeMin").innerHTML = texteMin;
document.getElementById("etudeMax").innerHTML = texteMax;
}
\ No newline at end of file
// -------------------- Fonctions de l'interface --------------------
var pleinEcran = false
var maximise = true
var tailleFenetreX = window.innerWidth
var tailleFenetreY = window.innerHeight
var AncienneMethodeAffichage = 0
// Cette fonction permet d'afficher le menu désiré.
// Il faut lui donner l'id du menu à afficher.
function afficherMenu(id){
if (menuActuel == id){
cacherMenu()
}
else {
if (menuActuel !== ""){
cacherMenu()
}
menuActuel = id
document.getElementById(id).style.display = "block"
}
}
// Permet de cacher le menu actuellement affiché
function cacherMenu(){
document.getElementById(menuActuel).style.display = "none"
menuActuel = ""
}
// ---- Minimiser ou Maximiser le widget (pour sankore) ----
function miniMax(){
if (maximise){
maximise = false
document.getElementById('affichage').style.display = "none"
document.getElementById('gauche').style.display = "none"
document.getElementById('miniMax').innerHTML = "+"
window.resizeTo(400,50)
AncienneMethodeAffichage = document.getElementById("selectMethodeAffichage").selectedIndex
document.getElementById("selectMethodeAffichage").selectedIndex = "3"
}
else{
maximise = true
document.getElementById('affichage').style.display = "block"
document.getElementById('gauche').style.display = "block"
document.getElementById('miniMax').innerHTML = "-"
window.resizeTo(tailleFenetreX,tailleFenetreY)
document.getElementById("selectMethodeAffichage").selectedIndex = AncienneMethodeAffichage
}
}
// Action des petits bouton + et - dans les options
function boutonPlus(id, nombre){
var element = document.getElementById(id)
var valeurActuelle = Number(element.value)
element.value = valeurActuelle + nombre
}
function boutonMoins(id, nombre){
var element = document.getElementById(id)
var valeurActuelle = Number(element.value)
if(valeurActuelle>=nombre*2){
element.value = valeurActuelle - nombre
}
}
// Changer de thème
function changerTheme(){
var theme = document.getElementById("selectTheme").value
switch(theme){
case "noir":
document.body.style.backgroundImage = "url(Images/fond2.png)"
document.getElementById("gauche").style.backgroundImage = "url(Images/gauche2.png)"
document.getElementById("onglet3D").style.backgroundImage = "url(Images/onglet1.png)"
document.getElementById("texteFonction").style.color = "white"
var couleurEchelle = "rgba(255,255,255,0.8)"
var couleurGrille = "rgba(255,255,255,0.1)"
var couleurAxes = "rgba(0,0,0,0.5)"
break
case "bleu":
document.body.style.backgroundImage = "url(Images/fond4.png)"
document.getElementById("gauche").style.backgroundImage = "url(Images/gauche3.png)"
document.getElementById("onglet3D").style.backgroundImage = "url(Images/onglet2.png)"
document.getElementById("texteFonction").style.color = "white"
var couleurEchelle = "rgba(255,255,255,0.8)"
var couleurGrille = "rgba(255,255,255,0.1)"
var couleurAxes = "rgba(0,0,0,0.5)"
break
case "blanc":
document.body.style.backgroundImage = "url(Images/fond5.png)"
document.getElementById("gauche").style.backgroundImage = "url(Images/gauche3.png)"
document.getElementById("onglet3D").style.backgroundImage = "url(Images/onglet2.png)"
document.getElementById("texteFonction").style.color = "black"
var couleurEchelle = "rgba(0,0,0,0.8)"
var couleurGrille = "rgba(255,255,255,0.2)"
var couleurAxes = "rgba(0,0,0,0.5)"
break
}
}
// Affiche un message d'erreur
function error(err){
alert(" Error has occurred on the page ...\n\n Description: " + err.description + "\n\n Click 'OK' to continue.\n\n")
}
function agrandirAffichage(){
if (pleinEcran){
pleinEcran = false
if(fonction3D){
document.getElementById('gauche3D').style.display = "block"
largeur = 570
document.getElementById("affichage").style.width = largeur+"px"
document.getElementById("affichage").style.left = "59px"
document.getElementById("flecheGauche").style.left = "67px"
document.getElementById("flecheHaut").style.left = "290px"
document.getElementById("flecheBas").style.left = "290px"
}
else{
choixOutil(outilPrecedent)
document.getElementById('gauche').style.display = "block"
largeur = 500
document.getElementById("affichage").style.width = largeur+"px"
document.getElementById("affichage").style.left = "129px"
document.getElementById("flecheGauche").style.left = "137px"
document.getElementById("flecheHaut").style.left = "345px"
document.getElementById("flecheBas").style.left = "345px"
}
document.getElementById('haut').style.display = "block"
document.getElementById('onglet3D').style.display = "block"
hauteur = 400
document.getElementById("affichage").style.height = hauteur+"px"
document.getElementById("affichage").style.top = "52px"
}
else{
pleinEcran = true
if(fonction3D){
document.getElementById('gauche3D').style.display = "none"
}
else{
document.getElementById('gauche').style.display = "none"
outilPrecedent = outil
choixOutil("deplacement")
}
document.getElementById('haut').style.display = "none"
document.getElementById('onglet3D').style.display = "none"
largeur = 625
hauteur = 445
document.getElementById("affichage").style.width = largeur+"px"
document.getElementById("affichage").style.left = "15px"
document.getElementById("affichage").style.height = hauteur+"px"
document.getElementById("affichage").style.top = "15px"
document.getElementById("flecheGauche").style.left = "67px"
document.getElementById("flecheHaut").style.left = "290px"
document.getElementById("flecheBas").style.left = "290px"
}
actualiserGraph()
}
// Redémarre le widget
function reset(){
window.location.reload()
}
// Ferme le widget
function close(){
window.close()
}
// Actions de mise à jour du widget
function miseAjour(){
afficherMenu("mAj")
choixOutil("deplacement")
document.getElementById("thisVersion").innerHTML = '<object type="text/html" data="version.html"></object>'
document.getElementById("newVersion").innerHTML = '<object type="text/html" data="http://gyb.educanet2.ch/tm-widgets/yannick/GraphMe.wgt/version.html"></object>'
}
function checkboxMaJ(){
if(document.location.href=='http://gyb.educanet2.ch/tm-widgets/yannick/GraphMe.wgt/Grapheur.xhtml'){
afficherMenu('erreurMaJ')
document.getElementById("checkMaJ").checked = false
}
else{
if(document.getElementById("checkMaJ").checked){
loadOptions()
document.getElementById("checkMaJ").checked = true
saveOptions()
}
else{
loadOptions()
document.getElementById("checkMaJ").checked = false
saveOptions()
}
}
}
function majAuto(){
if(document.location.href=='http://gyb.educanet2.ch/tm-widgets/yannick/GraphMe.wgt/Grapheur.xhtml'){
document.getElementById("cacheMaJ").style.display = "block"
document.getElementById("checkMaJ").checked = true
}
else{
if(document.getElementById("checkMaJ").checked){
afficherMenu('demandeMaJ')
}
}
}
// Afficher une page web à la place dans la zone d'affichage
function navigateur(lien){
cacherMenu()
agrandirAffichage()
document.getElementById("affichage").innerHTML = '<object type="text/html" data="'+lien+'" style="width:100%;height:100%;"></object>'
}
\ No newline at end of file
// -------------------- Fonctions des outils --------------------
var listeFonctions = new Array()
var listeCouleurs = new Array()
var historique = new Array()
var ctxT
// Cette fonction permet d'effectuer un zoom. Elle change la valeur des inputs à gauche
// qui définnissent la zone à afficher et actualise le graphique.
function zoom(valeur){
var diffBornes = Math.abs(parseFloat(document.getElementById("borneXGauche").value) - parseFloat(document.getElementById("borneXDroite").value))
var ajouter = (diffBornes * valeur - diffBornes)/2
var nouvelleValeur = parseFloat(document.getElementById("borneXGauche").value) - ajouter
if (nouvelleValeur < 0){ nouvelleValeur = Math.ceil(nouvelleValeur) }
if (nouvelleValeur > 0){ nouvelleValeur = Math.floor(nouvelleValeur) }
if (nouvelleValeur == parseFloat(document.getElementById("borneXGauche").value) && valeur>1){ nouvelleValeur=nouvelleValeur-1 }
if (nouvelleValeur == parseFloat(document.getElementById("borneXGauche").value) && valeur<1){ nouvelleValeur=nouvelleValeur+1 }
document.getElementById("borneXGauche").value = nouvelleValeur
var nouvelleValeur = parseFloat(document.getElementById("borneXDroite").value) + ajouter
if (nouvelleValeur < 0){ nouvelleValeur = Math.ceil(nouvelleValeur) }
if (nouvelleValeur > 0){ nouvelleValeur = Math.floor(nouvelleValeur) }
if (nouvelleValeur == parseFloat(document.getElementById("borneXDroite").value) && valeur>1){ nouvelleValeur=nouvelleValeur+1 }
if (nouvelleValeur == parseFloat(document.getElementById("borneXDroite").value) && valeur<1){ nouvelleValeur=nouvelleValeur-1 }
document.getElementById("borneXDroite").value = nouvelleValeur
var diffBornes = Math.abs(parseFloat(document.getElementById("borneYGauche").value) - parseFloat(document.getElementById("borneYDroite").value))
var ajouter = (diffBornes * valeur - diffBornes)/2
var nouvelleValeur = parseFloat(document.getElementById("borneYGauche").value) - ajouter
if (nouvelleValeur < 0){ nouvelleValeur = Math.ceil(nouvelleValeur) }
if (nouvelleValeur > 0){ nouvelleValeur = Math.floor(nouvelleValeur) }
if (nouvelleValeur == parseFloat(document.getElementById("borneYGauche").value) && valeur>1){ nouvelleValeur=nouvelleValeur-1 }
if (nouvelleValeur == parseFloat(document.getElementById("borneYGauche").value) && valeur<1){ nouvelleValeur=nouvelleValeur+1 }
document.getElementById("borneYGauche").value = nouvelleValeur
var nouvelleValeur = parseFloat(document.getElementById("borneYDroite").value) + ajouter
if (nouvelleValeur < 0){ nouvelleValeur = Math.ceil(nouvelleValeur) }
if (nouvelleValeur > 0){ nouvelleValeur = Math.floor(nouvelleValeur) }
if (nouvelleValeur == parseFloat(document.getElementById("borneYDroite").value) && valeur>1){ nouvelleValeur=nouvelleValeur+1 }
if (nouvelleValeur == parseFloat(document.getElementById("borneYDroite").value) && valeur<1){ nouvelleValeur=nouvelleValeur-1 }
document.getElementById("borneYDroite").value = nouvelleValeur
if(Math.abs(parseFloat(document.getElementById("borneXGauche").value) - parseFloat(document.getElementById("borneXDroite").value)) == 0){reinitialiserZoom(1)}
if(Math.abs(parseFloat(document.getElementById("borneYGauche").value) - parseFloat(document.getElementById("borneYDroite").value)) == 0){reinitialiserZoom(1)}
actualiserGraph()
}
// Permet de réinitialiser le zoom à la valeur donnée.
function reinitialiserZoom(valeur){
document.getElementById("borneXGauche").value = -valeur
document.getElementById("borneXDroite").value = valeur
document.getElementById("borneYGauche").value = -valeur
document.getElementById("borneYDroite").value = valeur
angle = Math.PI/8
valeurZoom3D = 1
gauche3D = -6.5
droite3D = 6.5
precisionDroite3D = 0.02
precisionFonction3D = 0.2
document.getElementById("inputPrecision3D").value = 0.2
actualiserGraph()
}
// Ces fonctions permettent de déplacer le graphique sur l'axe "x" et "y"
// Pour cela, elles redéfinissent la zone à afficher (à gauche dans les inputs)
function deplacerY(valeur){
document.getElementById("borneYGauche").value = parseFloat(document.getElementById("borneYGauche").value) + valeur
document.getElementById("borneYDroite").value = parseFloat(document.getElementById("borneYDroite").value) + valeur
actualiserGraph()
}
function deplacerX(valeur){
document.getElementById("borneXGauche").value = parseFloat(document.getElementById("borneXGauche").value) + valeur
document.getElementById("borneXDroite").value = parseFloat(document.getElementById("borneXDroite").value) + valeur
if(fonction3D){
angle = angle + valeur * Math.PI/8
}
actualiserGraph()
}
// Permet d'afficher la valeur en "y" pour un point donné en "x"
function execute(fonction) {
if(check(fonction)){
x = document.getElementById("inputX").value
document.getElementById("outputX").innerHTML = " f(x) = "+eval(fonction)+""
//alert("Si x = "+x+" \nf(x) = "+eval(fonction)+"")
}
}
// Ajoute la fonction mathématique se trouvant dans l'input en haut à une liste.
// Ceci est utile à l'affichage de plusieurs fonctions simultanées.
function menuFonctions(){
if(fonction3D){
afficherMenu('menuHistorique')
}
else{
afficherMenu('menuFonctions')
}
}
function ajouterFonction(fct){
listeFonctions.push(fct)
listeCouleurs.push("rgba(0,171,255,0.9)")
actualiserListeFonctions()
}
function actualiserListeFonctions(){
var texteFctSupp = ""
for(var i=0; i<listeFonctions.length; i++){
texteFctSupp += 'f(x)='+listeFonctions[i]+' <input type="button" value="-" onclick="listeFonctions.splice('+i+', 1); actualiserListeFonctions()"/>'
texteFctSupp += ' <span id="FctSupp'+i+'" title="listeCouleurs['+i+']" class="boutonCouleur" onclick="colorPicker(this.id); afficherMenu(\'menuCouleur\')">....</span><br/>'
}
document.getElementById("fonctionsSupp").innerHTML = texteFctSupp
actualiserGraph()
}
function actualiserHistorique(){
var texteHistorique = ""
for(var i=0; i<historique.length; i++){
texteHistorique += '<span class="survol" onclick="document.getElementById(\'inputEq\').value = '
texteHistorique += "'"+historique[i]+"'"+'; actualiserGraph()">'+historique[i]+'</span> <br/>'
}
document.getElementById("spanHistorique").innerHTML = texteHistorique
document.getElementById("divHistorique").scrollTop = 0
}
// Permet de changer d'outil et de faire différentes actions lors du choix de l'outil
function choixOutil(nom){
outil = nom
if(outil == 'deplacement'){
document.getElementById("affichage").style.cursor = "move"
document.getElementById("info").style.display = "none"
}
else{
document.getElementById("affichage").style.cursor = "auto"
document.getElementById("info").style.display = "block"
}
if(outil == 'point'){
document.getElementById("point").style.display = "block"
}
else{
document.getElementById("point").style.display = "none"
}
if(outil == 'tangente'){
document.getElementById("tangente").innerHTML = '<canvas id="canvasT" width="'+largeur+'" height="'+hauteur+'"></canvas>'
ctxT = document.getElementById('canvasT').getContext('2d')
}
else{
document.getElementById("tangente").innerHTML = ""
ctxT = null
}
}
// Fonctions servant à gérer les événements de la souris
function sourisDown(){
mouseDown = true
posSourisXinit = posSourisX
posSourisYinit = posSourisY
}
function sourisUp(){
mouseDown = false
}
function sourisMove(event){
posSourisX = event.clientX
posSourisY = event.clientY
if(mouseDown){
if(outil == "deplacement"){
var valeurX = (posSourisX-posSourisXinit)/multiplicateurX
var valeurY = (posSourisYinit-posSourisY)/multiplicateurY
if(Math.round(Math.abs(valeurX)) > 0){
deplacerX(-Math.round(2*valeurX)/2)
posSourisXinit = posSourisX
}
if(Math.round(Math.abs(valeurY)) > 0){
deplacerY(-Math.round(2*valeurY)/2)
posSourisYinit = posSourisY
}
//decalageX = posSourisX-posSourisXinit
//decalageY = posSourisY-posSourisYinit
//actualiserGraph()
}
}
if(outil == "point"){
var position = Math.round((posSourisX-132)*(borneXDroite-borneXGauche)/(precision*500))
var positionX = pointX[position]
var positionY = pointY[position]
if(!isNaN(positionX) && !isNaN(positionY)){
document.getElementById("info").innerHTML = "("+Math.round((positionX/multiplicateurX+borneXGauche)*100)/100+";"+Math.round(-(positionY/multiplicateurY-borneYDroite)*100)/100+")"
document.getElementById("point").style.left = (positionX+130-4)+"px"
document.getElementById("point").style.top = (positionY+53-10)+"px"
}
}
if(outil == "tangente"){
var position = Math.round((posSourisX-129)/multiplicateurX/precision)
var positionX = pointX[position]
var positionY = pointY[position]
var valeurPente = ((hauteur-pente[position])/multiplicateurY+borneYGauche)
//hauteur - (((y-y1)/precision - borneYGauche)* multiplicateurY)
document.getElementById("info").innerHTML = "("+Math.round(valeurPente*100)/100+")"
ctxT.clearRect(0,0,largeur*2,hauteur*2)
if(!isNaN(positionX) && !isNaN(positionY)){
ctxT.fillStyle = "white"
ctxT.fillRect (positionX-1, positionY-2, 6, 6)
ctxT.strokeStyle = "white"
ctxT.lineWidth = 2
ctxT.beginPath()
valeurPente = valeurPente * (hauteur/largeur) * (borneXDroite-borneXGauche)/(borneYDroite-borneYGauche)
ctxT.moveTo(0+4, positionY+positionX*valeurPente+1)
ctxT.lineTo(largeur+4, positionY+positionX*valeurPente-largeur*valeurPente+1)
ctxT.stroke()
}
}
//document.getElementById("info").innerHTML = " "+ (posSourisX-120) + ";" + (posSourisY-43)
}
function doubleClick(ctrlKey){
if(ctrlKey){
zoom(1.25)
zoom3D(1.25)
}
else{
zoom(0.8)
zoom3D(0.8)
}
}
// Evènements du clavier
function keyPress(event){
switch(event.keyCode){
case 27:
reset()
break
case 37:
if(event.ctrlKey){
deplacerX(-1)
}
break
case 38:
if(event.ctrlKey){
deplacerY(1)
}
break
case 39:
if(event.ctrlKey){
deplacerX(1)
}
break
case 40:
if(event.ctrlKey){
deplacerY(-1)
}
break
default:
//alert(event.keyCode+" ; "+event.ctrlKey)
}
}
// ---- Fonctions de test ----
function testSVG(){
document.getElementById("affichage").innerHTML = '<svg:svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <svg:line x1="0" y1="0" x2="300" y2="300" style="stroke:rgb(99,99,99);stroke-width:2"/> </svg:svg> '
}
function testCanvas(){
document.getElementById("affichage").innerHTML = '<canvas id="canvas" width="'+largeur+'" height="'+hauteur+'"></canvas>'
ctx = document.getElementById('canvas').getContext('2d')
var lingrad = ctx.createLinearGradient(100,100,largeur-100,hauteur-100)
lingrad.addColorStop(0, 'rgba(0,50,255,1)')
lingrad.addColorStop(1, 'rgba(0,255,255,1)')
ctx.fillStyle = lingrad
ctx.textAlign = "center"
ctx.font = "72px bold"
ctx.fillText("Canvas", largeur/2, hauteur/2-1)
}
function testXPM(){
document.getElementById("affichage").innerHTML = '<img src='+"'"+'data:image/xpm;ASCII,/* XPM */static char * text_xpm[] = {"100 50 2 1"," c None",". c #000000"," "," "," "," "," "," "," "," "," "," "," ..... ..... ............... ....... ....... "," ..... ..... .................. ....... ....... "," .... ..... ................... ........ ........ "," ..... ..... .................... ........ ........ "," ..... ..... .... ....... ........ ........ "," .... ..... .... ..... ......... ......... "," ..... ..... .... .... .... .... .... .... "," ..... ..... .... ..... .... ..... ..... .... "," .... ..... .... .... .... .... .... .... "," ..... ..... .... .... .... .... .... .... "," ..... ..... .... .... .... ..... ..... .... "," ..... ..... .... .... .... .... .... .... "," ......... .... ..... .... .... .... .... "," ........ .... .... .... .... .... .... "," ....... .... ..... .... .... .... .... "," ..... .... ....... .... ..... ..... .... "," ...... .................... .... .... .... .... "," ....... ................... .... .... .... .... "," ........ .................. .... ..... ..... .... "," .......... ............... .... .... .... .... "," ..... ..... .... .... ..... ..... .... "," .... ..... .... .... .... .... .... "," ..... .... .... .... ......... .... "," ..... ..... .... .... ......... .... "," ..... ..... .... .... ....... .... "," ..... .... .... .... ....... .... "," ..... ..... .... .... ..... .... "," ..... ..... .... .... ..... .... "," ..... .... .... .... .... "," ..... ..... .... .... .... "," ..... ..... .... .... .... "," ..... .... .... .... .... "," ..... ..... .... .... .... "," ..... ..... .... .... .... "," "," "," "," "," "," "};'+"'"+'width="500" height="330"/>'
}
// ---- Aire sous la fonction (intégrale) ----
function AireSousFct(fct, a, b, n){
var aire, largeurRect, gaucheRect, droiteRect, millieuRect, hauteurRect, aireRect;
var f = function(x){
return eval(fct);
};
aire = 0;
largeurRect = (b-a)/n;
for(var i=0; i<n; i++){
gaucheRect = a + i*largeurRect;
droiteRect = a + (i+1)*largeurRect;
millieuRect = (gaucheRect+droiteRect) / 2;
hauteurRect = f(millieuRect);
aireRect = largeurRect * hauteurRect;
aire = aire + aireRect;
}
//alert("a="+a+";b="+b+";n="+n+";A="+aire)
return aire;
}
function calculerAire(){
var fonction = document.getElementById("inputEq").value
if(check(fonction)){
var a = parseInt(document.getElementById("aireG").value);
var b = parseInt(document.getElementById("aireD").value);
var n = 50;
var arrondi = Math.round(AireSousFct(fonction, a, b, n)*1000)/1000;
document.getElementById("outputAire").innerHTML = "A = " + arrondi;
}
actualiserGraph();
}
\ No newline at end of file
var listeOptions = ["theme","precision","decalageX","decalageY","epaisseur","grille","axes","echelle","zoom","methode","methode3D","precision3D","maj"];
function setCookie(nom,valeur){
var jours = 545; // Durée de validité des cookies
var date = new Date();
date.setDate(date.getDate()+jours);
document.cookie = nom + "=" + escape(valeur) + "; expires="+date.toGMTString();
}
function getCookie(nom){
var start = 0;
var end = 0;
if(document.cookie.length>0){
start = document.cookie.indexOf(nom + "=");
if(start!=-1){
start = start + nom.length+1;
end = document.cookie.indexOf(";",start);
if(end==-1){
end = document.cookie.length;
}
return unescape(document.cookie.substring(start,end));
}
}
return "";
}
function delCookie(nom){
var date = new Date();
date.setDate(date.getDate()-1);
document.cookie = nom + "=; expires="+date.toGMTString();
}
function saveOptions(){
setCookie("theme",document.getElementById("selectTheme").value);
setCookie("precision",document.getElementById("inputPrecision").value);
setCookie("decalageX",document.getElementById("inputDecalageX").value);
setCookie("decalageY",document.getElementById("inputDecalageY").value);
setCookie("epaisseur",document.getElementById("inputTaille").value);
setCookie("grille",document.getElementById("checkGrille").checked);
setCookie("axes",document.getElementById("checkAxes").checked);
setCookie("echelle",document.getElementById("checkEchelle").checked);
setCookie("zoom",document.getElementById("zoomDefaut").value);
setCookie("methode",document.getElementById("selectMethodeAffichage").value);
setCookie("methode3D",document.getElementById("selectAffichage3D").value);
setCookie("precision3D",document.getElementById("inputPrecision3D").value);
setCookie("maj",document.getElementById("checkMaJ").checked);
document.getElementById("infoSauvegarde").style.display = "block"
}
function loadOptions(){
if(navigator.cookieEnabled){
if(checkOptions()){
document.getElementById("selectTheme").value = getCookie("theme");
changerTheme(document.getElementById("selectTheme").value);
document.getElementById("inputPrecision").value = getCookie("precision");
document.getElementById("inputDecalageX").value = getCookie("decalageX");
document.getElementById("inputDecalageY").value = getCookie("decalageY");
document.getElementById("inputTaille").value = getCookie("epaisseur");
if(getCookie("grille")=="true"){
document.getElementById("checkGrille").checked = true;
}
else{
document.getElementById("checkGrille").checked = false;
}
if(getCookie("axes")=="true"){
document.getElementById("checkAxes").checked = true;
}
else{
document.getElementById("checkAxes").checked = false;
}
if(getCookie("echelle")=="true"){
document.getElementById("checkEchelle").checked = true;
}
else{
document.getElementById("checkEchelle").checked = false;
}
document.getElementById("zoomDefaut").value = getCookie("zoom");
document.getElementById("selectMethodeAffichage").value = getCookie("methode");
document.getElementById("selectAffichage3D").value = getCookie("methode3D");
document.getElementById("inputPrecision3D").value = getCookie("precision3D");
if(getCookie("maj")=="true"){
document.getElementById("checkMaJ").checked = true;
}
else{
document.getElementById("checkMaJ").checked = false;
}
actualiserGraph();
}
else{
if(document.cookie!=""){
alert("It's can't be downloaded ...");
}
}
}
else{
document.getElementById("cacheCookies").style.display = "block";
}
}
function delOptions(){
var i;
for(i=0; i<listeOptions.length; i++){
delCookie(listeOptions[i]);
}
}
function checkOptions(){
var test = true;
for(i=0; i<listeOptions.length; i++){
if(getCookie(listeOptions[i])==""){
test = false;
}
}
return test;
}
function alertOptions(){
alert(sankoreLang[lang].show_saved + "\n------------------------------------------------------------\n"+document.cookie);
}
\ No newline at end of file
/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
* Sizzle CSS Selector Engine - v0.9.3
* Copyright 2009, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
/**
* .disableTextSelect - Disable Text Select Plugin
*
* Version: 1.1
* Updated: 2007-11-28
*
* Used to stop users from selecting text
*
* Copyright (c) 2007 James Dempster (letssurf@gmail.com, http://www.jdempster.com/category/jquery/disabletextselect/)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
**/
/**
* Requirements:
* - jQuery (John Resig, http://www.jquery.com/)
**/
(function($) {
if ($.browser.mozilla) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : 'none'
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : ''
});
});
};
} else if ($.browser.msie) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('selectstart.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('selectstart.disableTextSelect');
});
};
} else {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('mousedown.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('mousedown.disableTextSelect');
});
};
}
})(jQuery);
\ No newline at end of file
var sankoreLang = {
"en":{
"fnc":"Function: ",
"display":"Display",
"x_axis":"X-axis",
"y_axis":"Y-axis",
"zoom":"Zoom",
"color":"Color:",
"menus":"Menu",
"tools":"Tools",
"options":"Options",
"help":"Help",
"about":"About",
"mouse_events":"Mouse events:",
"moving":"Moving",
"tangente":"Tangente",
"point":"Point",
"choosing_color":"Choosing the color:",
"value":"Value:",
"saturation":"Saturation:",
"red":"Red:",
"green":"Green:",
"blue":"Blue:",
"opacity":"Opacity:",
"check":"Check",
"derivative":"Derivative:",
"square_under_func":"Square under function:",
"from":"From",
"to":"To",
"calculate":"Calculate",
"draw":"Draw",
"point_calculate":"Calculate the point on the function:",
"estimate":"Estimate",
"analysis_of_func":"Analysis of function:",
"start_to_analysis":"Start to analysis",
"quit":"Quit",
"display_test":"Display the test:",
"test":"Test",
"widget":"Widget",
"widget_options":"Widget options",
"themes_of_widget":"Themes of the widget:",
"black":"Black",
"white":"White",
"control_options":"Control options:",
"save":"Save",
"load":"Load",
"del":"Delete",
"save_a_widget_options":"Save a widget options in cookies or load an options from cookies or delete a registered options.",
"auto_update":"Automatically update when a widget opening.",
"reload_widget":"Reload widget",
"update":"Update",
"the_graphical":"The graphical method displaying:",
"lines":"lines",
"points":"points",
"image":"image",
"zoom_def":"Zoom default:",
"update_zoom":"Update zoom",
"show_grid":"Show grid",
"show_axis":"Show axis",
"scale":"Scale",
"thickness":"Thickness:",
"offset_diagram":"Offset diagram:",
"accuracy_graph":"Accuracy graph:",
"show_the_style":"Show the style:",
"surfaces":"surfaces",
"points":"points",
"reset_display":"Reset display",
"accuracy_func":"Accuracy function:",
"use_the_color":"Use the color:",
"positive_value":"positive value",
"negative_value":"negative value",
"general_value":"general value",
"how_it_work":"How it works",
"this_widget_allow":"This widget allows to draw mathematical function. Enter function in the field in the top part of the widget and press\"Display\"",
"you_can_enter":"You can enter following mathematical functions:",
"basic_operations":"Basic operations",
"plus":"Plus",
"minus":"Minus",
"multi":"Multiplication",
"division":"Division",
"mod":"Mod",
"trigonometric":"Trigonometric functions",
"sine":"Sine",
"cosine":"Cosine",
"tangent":"Tangent",
"cotangent":"Cotangent",
"secant":"Secant",
"cosecant":"Cosecant",
"arc_sine":"Arc sine",
"arc_cosine":"Arc cosine",
"arc_tangent":"Arc tangent",
"arc_cotangent":"Arc cotangent",
"hyperbolic_func":"Hyperbolic functions",
"hyp_sine":"Hyperbolic sine",
"hyp_cosine":"Hyperbolic cosine",
"hyp_tangent":"Hyperbolic tangent",
"hyp_cotangent":"Hyperbolic cotangent",
"hyp_secant":"Hyperbolic secant",
"hyp_cosecant":"Hyperbolic cosecant",
"hyp_arc_sine":"Hyperbolic arc sine",
"hyp_arc_cosine":"Hyperbolic arc cosine",
"hyp_arc_tangent":"Hyperbolic arc tangent",
"hyp_arc_cotangent":"Hyperbolic arc cotangent",
"square_roots_and_degrees":"Square roots and degrees",
"square_root":"Square root",
"degree":"Degree",
"root":"Root",
"variable_x":"Variable x to the power y",
"root_y":"Root y of x",
"exponential":"Exponential and logarithm",
"natural_log":"Natural logarithm",
"decimal_log":"Decimal logarithm",
"abs":"Absolute number value",
"rounding":"Rounding",
"round_nearest":"Rounding to the nearest whole number",
"round_nearest_big":"Rounding to the nearest whole number in a big way",
"round_nearest_small":"Rounding to the nearest whole number the smaller side",
"consts":"Constants",
"available_const":"Also are some constants available:",
"keys":"Keyboard keys",
"moved_left":"Graph will be moved left",
"moved_top":"Graph will be moved top",
"moved_right":"Graph will be moved right",
"moved_botom":"Graph will be moved bottom",
"guide":"User's guide",
"using":"Using",
"examples":"Examples",
"other":"Other",
"you_can_view":"You can view example. Don't forget to set a accuracy in option if it will be necessary.",
"save_graph":"Save graph",
"in_some_browsers":"In some browsers when display method \"Canvas\" used you can save graph by clcking it with right mouse button and selecting \"Save image\". Also you can save 3D-graphs.",
"offset":"Offset",
"if_graph_isnt":"If graph isn't in the right plase (larger than canvas) then can you set necessary parameters graph displaying in settings menu.",
"history":"History",
"current":"Current",
"additional":"Additional",
"left_arrow":"left arrow",
"right_arrow":"right arrow",
"top_arrow":"top arrow",
"bottom_arrow":"bottom arrow",
"or":"or",
"funcs":"Functions",
"widget_is_developed":"Widget is developed by",
"if_you_want_to":"If you want to inform about a bug, make a proposal or just ask some questions. You can contact to me at the following e-mail:",
"if_you_want_to_change":"If you want to change background design then you can contact at following address:",
"set_of_def":"Set of definitions:",
"parity":"Parity:",
"zeros":"Zeros of function:",
"signe":"Sign:",
"asympt":"Asymptotes",
"min":"Min",
"ev":"even",
"unev":"uneven",
"na":"n/a",
"curve_lower":"curve is lower than a AH",
"curve_higher":"curve is higher than a AH",
"max":"Max",
"no_min":"No minimum",
"no_max":"No maximum",
"tool_for":"Tool for analysis of function is not reliable on 100%. Don't forget check results of analysis before use it.",
"ah_left":"AH left:",
"ah_right":"AH right:",
"av":"AV:",
"options_saved":"Options saved!",
"cur_version":"Current version:",
"last_version":"The last on-line version:",
"using_web":"This widget is available to using on web-site:",
"show_saved":"Now parameters will be saved"
},
"ru":{
"fnc": "Функция: ",
"display":"Показать",
"x_axis":"ось X",
"y_axis":"ось Y",
"zoom":"Размер",
"color":"Цвет:",
"menus":"Меню",
"tools":"Инструменты",
"options":"Опции",
"help":"Помощь",
"about":"О программе",
"mouse_events":"События мыши:",
"moving":"Движение",
"tangente":"Касательная",
"point":"Точка",
"choosing_color":"Выбор цвета:",
"value":"Значение:",
"saturation":"Насыщенность:",
"red":"Красный:",
"green":"Зеленый:",
"blue":"Голубой:",
"opacity":"Прозрачность:",
"check":"Применить",
"derivative":"Производная:",
"square_under_func":"Область функции:",
"from":"От",
"to":"До",
"calculate":"Посчитать",
"draw":"Зарисовать",
"point_calculate":"Рассчитать точку функции:",
"estimate":"Оценить",
"analysis_of_func":"Анализ функции:",
"start_to_analysis":"Начать анализ",
"quit":"Выйти",
"display_test":"Показать тест:",
"test":"Тест",
"widget":"Виджет",
"widget_options":"Настройки виджета",
"themes_of_widget":"Темы виджета:",
"black":"Черный",
"white":"Белый",
"control_options":"Опции управления:",
"save":"Сохранить",
"load":"Загрузить",
"del":"Удалить",
"save_a_widget_options":"Сохранить или загрузить настройки виджета в/из куки-файлов, или же удалить выбранные опции",
"auto_update":"Автоматическое обновление виджета при загрузке",
"reload_widget":"Перегрузить виджет",
"update":"Обновить",
"the_graphical":"Графический метод отображения:",
"lines":"линии",
"points":"точки",
"image":"изображения",
"zoom_def":"Размер по-умолчанию:",
"update_zoom":"Изменить размер:",
"show_grid":"Показать таблицу",
"show_axis":"Показать оси",
"scale":"Масштаб",
"thickness":"Толщина",
"offset_diagram":"Смещение диаграммы:",
"accuracy_graph":"Точность графика:",
"show_the_style":"Показать стиль:",
"surfaces":"поверхности",
"points":"точки",
"reset_display":"Обновить отображение",
"accuracy_func":"Точность функции:",
"use_the_color":"Использовать цвет:",
"positive_value":"положительное значение",
"negative_value":"отрицательное значение",
"general_value":"основное значение",
"how_it_work":"Как это работает",
"this_widget_allow":"Этот виджет позволяет рисовать математические функции. Введите функцию в верхней части виджета и нажмите \"Показать\"",
"you_can_enter":"Вы можете использовать следующие математические функции:",
"basic_operations":"Основные операции",
"plus":"Сложение",
"minus":"Вычетание",
"multi":"Произведение",
"division":"Частное",
"mod":"Остаток от деления",
"trigonometric":"Тригонометрические функции",
"sine":"Синус",
"cosine":"Косинус",
"tangent":"Тангенс",
"cotangent":"Котангенс",
"secant":"Секанс",
"cosecant":"Косеканс",
"arc_sine":"Арксинус",
"arc_cosine":"Арккосинус",
"arc_tangent":"Арктангенс",
"arc_cotangent":"Арккотангенс",
"hyperbolic_func":"Гиперболические функции",
"hyp_sine":"Гиперболический синус",
"hyp_cosine":"Гиперболический косинус",
"hyp_tangent":"Гиперболический тангенс",
"hyp_cotangent":"Гиперболический котангенс",
"hyp_secant":"Гиперболический секанс",
"hyp_cosecant":"Гиперболический косеканс",
"hyp_arc_sine":"Гиперболический арксинус",
"hyp_arc_cosine":"Гиперболический арккосинус",
"hyp_arc_tangent":"Гиперболический арктангенс",
"hyp_arc_cotangent":"Гиперболический арккотангенс",
"square_roots_and_degrees":"Квардатные корни и степени",
"square_root":"Квадратный корень",
"degree":"Степень",
"root":"Корень",
"variable_x":"Переменная х в степени у",
"root_y":"Корень y степени x",
"exponential":"Экспоненты и логарифмы",
"natural_log":"Натуральный логарифм",
"decimal_log":"Десятичный логарифм",
"abs":"Абсолютное значение числа",
"rounding":"Округление",
"round_nearest":"Округление до ближайшего целого числа",
"round_nearest_big":"Округление до ближайшего целого числа в большую сторону",
"round_nearest_small":"Округление до ближайшего целого числа в меньую сторону",
"consts":"Константы",
"available_const":"Также доступны некоторые константы:",
"keys":"Горячие клавиши",
"moved_left":"График будет сдвинут влево",
"moved_top":"График будет сдвинут вверх",
"moved_right":"График будет сдвинут вправо",
"moved_bottom":"График будет сдвинут вниз",
"guide":"Руководство пользователя",
"using":"Использование",
"examples":"Примеры",
"other":"Другое",
"you_can_view":"Вы можете посмотреть примеры. Не забывайте выставить точность в настройках, если это необходимо.",
"save_graph":"Сохранить график",
"in_some_browsers":"В некоторых браузерах при выборе метода отоюражения \"Canvas\" вы можете сохранить гафик кликом ПКМ на нем и выбором пункта \"Сохранить изображение\". Таким же способом вы можете сохранять 3D-графики.",
"offset":"Смещение",
"if_graph_isnt":"Если график арсположен в неправильном месте (больше, чем холст), то Вы можете выставить необходимые параметры отображения графа в настройках виджета.",
"history":"История",
"current":"Текущие",
"additional":"Дополнительные",
"left_arrow":"стрелка влево",
"right_arrow":"стрелка вправо",
"top_arrow":"стрелка вверх",
"bottom_arrow":"стрелка вниз",
"or":"или",
"funcs":"Функции",
"widget_is_developed":"Виджет разработан ",
"if_you_want_to":"Если вы хотите сообщить о проблеме, внести предложение или задать некоторые вопросы, то можете связаться со мной через электронную почту:",
"if_you_want_to_change":"Если вы хотите изменить дизайн, обращайтесь по адресу:",
"set_of_def":"Набор определений:",
"parity":"Равенство:",
"zeros":"Нули функции:",
"signe":"Знак:",
"asympt":"Ассимптоты",
"min":"Мин",
"ev":"равны",
"unev":"не равны",
"na":"не определено",
"curve_lower":"кривая ниже, чем горизонтальная ассимптота",
"curve_higher":"кривая выше, чем горизонтальная ассимптота",
"max":"Макс",
"no_min":"Нет минимума",
"no_max":"Нет максимума",
"tool_for":"Анализ функции не надежен на 100%. Не забывайте проверить результат анализа перед их использованием.",
"ah_left":"ГА слева:",
"ah_right":"ГА справа:",
"av":"ВА:",
"options_saved":"Настройки сохранены!",
"cur_version":"Текущая версия:",
"last_version":"Последняя он-лайн версия:",
"using_web":"Этот виджет доступен для использования на сайте:",
"show_saved":"Теперь параметры будут сохранены"
},
"fr":{
"fnc":"Fonction: ",
"display":"Afficher",
"x_axis":"Axe des X de:",
"y_axis":"Axe des Y de:",
"zoom":"Zoom",
"color":"Couleur:",
"menus":"Menus",
"tools":"Outils",
"options":"Options",
"help":"Aide",
"about":"À propos",
"mouse_events":"Action de la souris:",
"moving":"Déplacement",
"tangente":"Tangente",
"point":"Point",
"choosing_color":"Choix de la couleur:",
"value":"Valeur:",
"saturation":"Saturation:",
"red":"Rouge:",
"green":"Vert:",
"blue":"Bleu:",
"opacity":"Opacité:",
"check":"Valider",
"derivative":"Dessiner la dérivée de la fonction:",
"square_under_func":"Aire sous la fonction:",
"from":"From",
"to":"To",
"calculate":"Calculer",
"draw":"Dessiner",
"point_calculate":"Calculer un point de la fonction:",
"estimate":"Évaluer",
"analysis_of_func":"Analyse de la fonction:",
"start_to_analysis":"Démarrer l'étude",
"quit":"Fermer",
"display_test":"Afficher les tests:",
"test":"Test",
"widget":"Widget",
"widget_options":"Options du widget",
"themes_of_widget":"Thème du widget:",
"black":"Noir",
"white":"Blanc",
"control_options":"Gèrer les options:",
"save":"Sauvegarder",
"load":"Charger",
"del":"Supprimer",
"save_a_widget_options":"Sauvegarder les options du widget dans les cookies, charger les options depuis les cookies ou supprimer les options actuellement enregistrées.",
"auto_update":"Mise à jour automatique à l'ouverture du widget.",
"reload_widget":"Recharger le widget",
"update":"Mise à jour",
"the_graphical":"Méthode d'affichage du graphique:",
"lines":"lignes",
"points":"points",
"image":"image",
"zoom_def":"Zoom par défaut:",
"update_zoom":"Réinitialiser le zoom",
"show_grid":"Afficher la grille",
"show_axis":"Afficher les axes ",
"scale":"Afficher l'échelle ",
"thickness":"Épaisseur de la fonction:",
"offset_diagram":"Décalage du graphique:",
"accuracy_graph":"Précision des calculs du graphique:",
"show_the_style":"Style d'affichage:",
"surfaces":"surfaces",
"points":"points",
"reset_display":"Réinitialiser l'affichage",
"accuracy_func":"Précision de la fonction:",
"use_the_color":"Utilisation des couleurs:",
"positive_value":"valeur positive",
"negative_value":"valeur négative",
"general_value":"valeur générale",
"how_it_work":"Fonctionnement",
"this_widget_allow":"Ce widget vous permet de dessiner des fonctions mathématiques. Entrez une fonction dans le champ en haut du widget et cliquez sur le bouton \"Afficher\".",
"you_can_enter":"Vous pouvez saisir les fonctions mathématiques suivantes:",
"basic_operations":"Les opérations de base",
"plus":"Addition",
"minus":"Soustraction",
"multi":"Multiplication",
"division":"Division",
"mod":"Modulo",
"trigonometric":"Les fonctions trigonométriques",
"sine":"Sinus",
"cosine":"Cosinus",
"tangent":"Tangente",
"cotangent":"Cotangente",
"secant":"Secante",
"cosecant":"Cosecante",
"arc_sine":"Arcsinus",
"arc_cosine":"Arccosinus",
"arc_tangent":"Arctangente",
"arc_cotangent":"Arccotangente",
"hyperbolic_func":"Les fonctions hyperboliques",
"hyp_sine":"Sinus hyp",
"hyp_cosine":"Cosinus hyp",
"hyp_tangent":"Tangente hyp",
"hyp_cotangent":"Cotangente hyp",
"hyp_secant":"Secante hyp",
"hyp_cosecant":"Cosecante hyp",
"hyp_arc_sine":"Arcsinus hyp",
"hyp_arc_cosine":"Arccosinus hyp",
"hyp_arc_tangent":"Arctangente hyp",
"hyp_arc_cotangent":"Arccotangente hyp",
"square_roots_and_degrees":"Les racines et les puissances",
"square_root":"Racine carrée",
"degree":"Puissances",
"root":"Racines",
"variable_x":"Élève x à une puissance y",
"root_y":"Racine y d'un nombre x",
"exponential":"Les exponentielles et logarithmes",
"natural_log":"logarithme naturel",
"decimal_log":"logarithme de base",
"abs":"La valeur absolue d'un nombre",
"rounding":"Les arrondis",
"round_nearest":"arrondit à l'entier le plus proche",
"round_nearest_big":"arrondit à l'entier supérieur",
"round_nearest_small":"arrondit à l'entier inférieur",
"consts":"Constantes",
"available_const":"Quelques constantes sont aussi disponibles:",
"keys":"Touches clavier",
"moved_left":"déplacer le graphique à gauche",
"moved_top":"déplacer le graphique en haut",
"moved_right":"déplacer le graphique à droite",
"moved_botom":"déplacer le graphique en bas",
"guide":"Guide d'utilisation",
"using":"Utilisation",
"examples":"Exemples",
"other":"Autres",
"you_can_view":"Vous pouvez cliquer sur un exemple pour l'afficher. Pensez à ajuster la précision du graphique dans les options si nécessaire",
"save_graph":"Enregistrer le graphique",
"in_some_browsers":"Dans certains navigateurs, lorsque vous utilisez la méthode d'affichage \"Canvas\", vous pouvez sauvegarder le graphique en cliquant avec le bouton de droite de la souris sur celui-ci et en séléctionnant \"Enregistrer l'image\". Vous pouvez aussi sauvegarder le graphique 3D. ",
"offset":"Décalage",
"if_graph_isnt":"Si le graphique n'est pas à la bonne place (il dépasse de la zone prévue), ajustez le \"décalage du graphique\" dans le menu des options. Pour Konqueror, il faut utiliser un décalage de x=122 et y=48.",
"history":"Historique",
"current":"Actuelle",
"additional":"Supplémentaires",
"left_arrow":"flèche gauche",
"right_arrow":"flèche droite",
"top_arrow":"flèche haut",
"bottom_arrow":"flèche bas",
"or":"ou",
"funcs":"Fonction",
"widget_is_developed":"Widget réalisé par",
"if_you_want_to":"Si vous voulez rapporter un bug, avez une suggestion par rapport au widget ou voulez simplement poser une question, merci de me contacter par:",
"if_you_want_to_change":"Les images d'arrière-plan du widget on été tirées des thèmes du bureau \"plasma-desktop\" de l'environnement:",
"set_of_def":"Ensemble de définition:",
"parity":"Parité:",
"zeros":"Zéros de la fonction:",
"signe":"Signe:",
"asympt":"Asymptotes",
"min":"Min",
"ev":"paire",
"unev":"impaire",
"na":"aucune",
"curve_lower":"courbe au-dessus de l'AH",
"curve_higher":"courbe au-dessous de l'AH",
"max":"Max",
"no_min":"Aucun minimum",
"no_max":"Aucun maximum",
"tool_for":"L'outil permettant d'étudier les fonctions n'est pas fiable à 100%. Pensez à vérifier les résultats de l'étude avant d'en faire une quelconque utilisation.",
"ah_left":"AH gauche:",
"ah_right":"AH droite:",
"av":"AV:",
"options_saved":"Options sauvegardées!",
"cur_version":"Version en cours d'utilisation:",
"last_version":"Dernière version disponible en ligne:",
"using_web":"Ce widget est également utilisable dans un navigateur internet sur le site:",
"show_saved":"Options actuellement sauvegardées"
}
};
\ No newline at end of file
body{
background-color: rgba(255,255,255,0.6);
}
h1{
font-size: 250%;
text-align: center;
text-decoration: underline;
}
h2{
margin-top: 40px;
}
h4{
margin-top: 20px;
margin-bottom: 0px;
}
img{
display: block;
margin-left: auto;
margin-right: auto;
}
p{
text-align: justify;
}
li{
text-align: justify;
}
.droite{
float: right;
font-size: 80%;
font-style: italic;
margin: 5px;
}
.gauche{
float: left;
font-size: 80%;
font-style: italic;
}
#Sommaire{
margin-top: 100px;
margin-bottom: 100px;
}
\ No newline at end of file
/* ----------------- */
/* CSS */
/* ----------------- */
/* Arrière plan du widget */
body{
background-image: url('../Images/fond2.png');
background-repeat: no-repeat;
background-position: 0px 0px;
}
/* Zone d'affichage des fonctions */
#affichage{
position: absolute;
top: 52px;
left: 129px;
width: 500px;
height: 400px;
overflow:hidden;
border: 2px solid black;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/* Texte et boutons qui sont en haut du widget */
#haut{
position: relative;
top: 13px;
left: 20px;
width: 500px;
z-index: 2;
}
/* Champ permettant d'entrer la fonction à dessiner */
#inputEq{
width: 200px;
}
/* Texte à côté du champ de la fonction à dessiner */
#texteFonction{
color: white;
font-weight: bold;
}
/* Partie gauche du widget comprenant les boutons des menus et les options rapides */
#gauche{
position: absolute;
top: 62px;
left: 18px;
width: 100px;
height: 380px;
padding: 2px;
color: white;
font-size: 80%;
background-image: url('../Images/gauche2.png');
border-color: black;
/*border-width: 2px;*/
border-width: 0px;
border-style: solid;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/* Boutons qui sont dans la partie gauche et qui ouvrent les différents menus */
.boutonGauche{
width: 100%;
height: 32px;
text-align: center;
}
/* Partie gauche du widget lorsque l'affichage 3D est activé */
#gauche3D{
position: absolute;
left: -149px;
top: 234px;
width: 360px;
height: 32px;
padding: 2px;
padding-left: 14px;
border: 2px solid rgba(255, 255, 255, 0.4);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: rgba(255, 255, 255, 0.3);
-moz-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
-o-transform: rotate(270deg);
display: none;
z-index: -1;
}
#gauche3D input.boutonGauche3D{
width: 90px;
height: 30px;
}
/* Style pour les menus */
.menu{
position: absolute;
top: 68px;
left: 121px;
width: 450px;
height: 350px;
padding: 10px;
overflow: hidden;
background-color: rgba(255, 255, 255, 0.7);
border-style: none;
border-width: 1px;
border-color: rgba(0,70,128, 0.9);
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
z-index: 2;
display: none;
}
.barreBasMenu{
position: absolute;
right: 0px;
bottom: 0px;
}
.contenuMenu{
font-size: 14px;
padding: 10px;
overflow: auto;
max-height: 315px;
}
.avecBordures{
border-top: 1px solid rgba(255, 255, 255, 0.4);
height: 80%
}
.ongletMenu{
position: relative;
top: 3px;
width: 100%;
}
.ongletMenu tr td{
width: 30%;
height: 30px;
text-align: center;
font-weight: normal;
background-color: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(255, 255, 255, 0.9);
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
opacity: 0.5;
cursor: pointer;
}
.ongletMenu tr td:hover{
opacity: 1;
}
.ongletMenu tr td.ongletMenuActuel{
position:relative;
top:-1px;
opacity: 0.9;
font-weight: bold;
border-bottom : none;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
-moz-border-radius-bottomleft: 0px;
-moz-border-radius-bottomright: 0px;
-webkit-border-bottom-left-radius: 0px;
-webkit-border-bottom-right-radius: 0px;
}
.miniMenu{
position: absolute;
top: 120px;
left: 170px;
width: 320px;
height: 240px;
padding: 10px;
text-align: center;
font-size: 14px;
overflow: auto;
background-color: rgba(255, 255, 255, 0.9);
border-style: solid;
border-width: 1px;
border-color: rgba(0,70,128, 0.9);
border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
z-index: 2;
display: none;
}
.alertMenu{
position: absolute;
top: 170px;
left: 220px;
width: 220px;
height: 140px;
padding: 10px;
text-align: center;
font-size: 14px;
overflow: auto;
background-color: rgba(255, 255, 255, 0.9);
border-style: solid;
border-width: 1px;
border-color: rgba(0,70,128, 0.9);
border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
z-index: 3;
display: none;
}
.miniMenu input{
width: 45%;
height: 32px;
}
.alertMenu input{
width: 45%;
height: 32px;
}
/* Menu des crédits */
#credits{
width: 80%;
margin: auto;
}
#credits tr td{
padding: 20px;
width: 100%;
height: 150px;
text-align: center;
vertical-align: middle;
background-color: rgba(255, 255, 255, 0.7);
border: 2px solid white;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
#credits tr td img{
float: left;
}
#credits tr td a{
font-size: 80%;
}
#credits tr td h3{
text-align:center;
}
/* Aperçu couleur 3D*/
#apercuCouleur3D{
border: 1px solid rgba(0, 0, 0, 0.7);
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
/* Taille des champs contenant seulement 2 ou 3 caractères */
.smallInput{
width: 35px;
}
/* Choix de la saturation et de la valeur dans le ColorPicker */
#colorSV{
float: left;
width: 255px;
height: 255px;
border: 1px solid black;
background-color: red;
cursor: crosshair;
}
/* Choix de la teinte dans le ColorPicker */
#colorT{
float: left;
width: 20px;
height: 255px;
margin-left: 10px;
border: 1px solid black;
background-color: black;
cursor: crosshair;
}
/* Valeurs de la couleur dans le ColorPicker */
#colorValues{
position: relative;
left: 10px;
font-size: 80%;
}
/* Boutons qui ouvrent le ColorPicker */
/*Menu de gauche*/
#buttonColor{
float: left;
position: relative;
left: 75px;
top: -18px;
width: 20px;
height: 20px;
border: 1px white solid;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: rgb(193,255,0);
cursor:pointer;
}
#buttonColor:hover{
border-width: 2px;
left: 74px;
top: -19px;
}
#apercuCouleur{
position: absolute;
right: 20px;
bottom: 40px;
width: 40px;
height: 30px;
border: 1px white solid;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: rgb(193,255,0);
}
#apercuCouleur2{
position: absolute;
right: 65px;
bottom: 40px;
width: 40px;
height: 30px;
border: 1px white solid;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: rgb(193,255,0);
}
/*Fonctions supplémentaires*/
.boutonCouleur{
position: relative;
left: 2px;
top: 0px;
width: 20px;
height: 20px;
color: rgba(0,0,0,0);
border: 1px white solid;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: rgb(0,171,255);
cursor:pointer;
}
.boutonCouleur:hover{
border-width: 2px;
left: 1px;
top: 0px;
}
/* Texte d'information (plus petit) */
.texteSecondaire{
font-size: 11px;
color: rgba(0,0,0,0.5);
margin-left: 10px;
}
/* Style pour le texte où on peut cliquer dessus */
.survol{
cursor: pointer;
}
.survol:hover{
color: rgba(0,0,0,0.5);
}
/* Texte en gras */
.gras{
font-weight: bold;
}
/* Flèches permettant de deplacer l'affichage */
.flecheDeplacement{
color: black;
opacity: 0;
font-size: 56px;
text-align: center;
cursor: pointer;
z-index: 1;
}
.flecheDeplacement:hover{
opacity: 0.4;
}
#flecheHaut{
position: absolute;
top: 46px;
left: 345px;
width: 70px;
height: 55px;
}
#flecheBas{
position: absolute;
top: 381px;
left: 345px;
width: 70px;
height: 55px;
}
#flecheGauche{
position: absolute;
top: 216px;
left: 137px;
width: 55px;
height: 70px;
}
#flecheDroite{
position: absolute;
top: 216px;
left: 567px;
width: 55px;
height: 70px;
}
/* Bouton permettant de minimiser et maximiser le widget */
#miniMax{
position: absolute;
right: 10px;
top: 10px;
font-size: 24px;
color: rgba(0,0,0,0.4);
cursor: pointer;
}
#miniMax:hover{
color: rgba(0,0,0,1);
}
/* Boutons permettant de choisir l'action de la souris dans le menu des outils */
.choixOutil{
width: 125px;
height: 40px;
font-size: 14px;
cursor: pointer;
}
/* Point sous la souris */
#point{
position: absolute;
top: -10px;
left: -10px;
color: white;
}
/* Coordonnées du points sous la souris */
#info{
position: absolute;
top: 57px;
left: 137px;
color: white;
}
/* Outil de tangente */
#tangente{
position: absolute;
top: 52px;
left: 129px;
width: 500px;
height: 400px;
z-index: -1;
}
/* Petits boutons plus et moins dans les options */
.boutonPlus{
position: relative;
top: -7px;
left: -5px;
width: 10px;
height: 10px;
font-size: 9px;
text-align: center;
background-color: rgba(0, 140, 255, 0.2);
border: 1px rgba(0,0,0,0.5) solid;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
cursor: pointer;
display: inline-block;
}
.boutonMoins{
position: relative;
top: 6px;
left: -17px;
width: 10px;
height: 10px;
font-size: 9px;
text-align: center;
background-color: rgba(0, 140, 255, 0.2);
border: 1px rgba(0,0,0,0.5) solid;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
cursor: pointer;
display: inline-block;
}
.boutonPlus:hover{
border: 1px rgba(0,0,0,0.7) solid;
background-color: rgba(0, 140, 255, 0.5);
}
.boutonMoins:hover{
border: 1px rgba(0,0,0,0.7) solid;
background-color: rgba(0, 140, 255, 0.5);
}
/* Bouton qui sert à choisir entre l'affichage 3D et 2D */
#onglet3D{
position: absolute;
top: 30px;
left: 570px;
width: 40px;
height: 21px;
color: white;
text-align: center;
background-color: rgba(255, 255, 255, 0.4);
background-image: url("../Images/onglet1.png");
border: 1px solid black;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
cursor: pointer;
opacity: 0.4;
z-index: 3;
}
#onglet3D:hover{
opacity: 0.9;
}
/* Tableau du signe dans le menu d'étude de la fonction*/
#etudeSigne td{
min-width: 25px;
text-align: center;
}
#etudeSigne td.border{
border: 1px solid black;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
#etudeSigne td.infini{
background-color: rgba(0,0,0,0.5);
}
/* Titres des menus */
h1{
font-size: 16px;
font-weight: 600;
text-align: center;
/*font-style: italic;*/
margin-top: 15px;
margin-bottom: 25px;
}
h2{
font-size: 14px;
font-weight: normal;
font-style: italic;
margin-top: 30px;
}
h3{
font-size: 16px;
font-weight: 600;
text-align: left;
/*font-style: italic;*/
margin-top: 10px;
margin-bottom: 20px;
}
h4{
font-size: 16px;
font-weight: 600;
text-align: center;
/*font-style: italic;*/
margin-top: 15px;
margin-bottom: 10px;
}
/* Petits boutons en haut à droite du widget */
.miniBouton{
width: 12px;
height: 12px;
color: white;
font-size: 12px;
text-align: center;
background-color: rgba(255,255,255,0.5);
border: 1px solid white;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
cursor: pointer;
opacity: 0.5;
}
.miniBouton:hover{
opacity: 1;
}
#boutonAgrandir{
position: absolute;
left: 635px;
top: 11px;
z-index: 3;
}
#boutonFermer{
position: absolute;
left: 615px;
top: 11px;
z-index: 3;
}
/* Menu Mise à Jour */
#mAj{
text-align: center;
font-size: 14px;
}
#mAj h1{
font-size: 22px;
margin-top: 5px;
margin-bottom: 15px;
}
#mAj span object{
position: relative;
bottom: 4px;
width: 150px;
height: 27px;
overflow: hidden;
}
#mAj input{
height: 32px;
}
.boutonSauvegarde{
width: 100px;
height: 32px;
}
#cacheCookies{
position: absolute;
top: 170px;
left: 14px;
width: 93%;
height: 130px;
background-color: rgba(255,255,255,0.7);
border: 1px rgba(255,255,255,0.8) solid;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
text-align: center;
display: none;
}
#cacheMaJ{
position: absolute;
padding-top: 10px;
top: 270px;
left: 14px;
width: 93%;
height: 25px;
background-color: rgba(255,255,255,0.8);
border: 1px rgba(255,255,255,0.8) solid;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
text-align: center;
font-weight: bold;
display: none;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
identifier="http://getuniboard.com/"
version="1.3"
width="675"
height="490"
ub:resizable="false">
<name>Traceur de fonctions mathématiques</name>
<content src="Grapheur.xhtml"/>
</widget>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>GraphMe - Version</title>
</head>
<body>
<span style="font-size:12px; text-align:center;">1.3.1 (2010/09/25)</span>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment