-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.php
619 lines (528 loc) · 29.2 KB
/
graph.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<meta name = "viewport" content = "width=device-width, initial-scale=1.0">
<script type="text/javascript" src="graph.js" charset="utf-8"></script>
<link rel="stylesheet" href="http://www.jointjs.com/downloads/joint.min.css">
<link rel="stylesheet" href="bootstrap-3.3.2-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="graph.css">
<script type="text/javascript" src="http://www.jointjs.com/downloads/joint.min.js" ></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="bootstrap-3.3.2-dist/js/bootstrap.js" ></script>
<title>Whatly</title>
<body>
<div id="top_nav" class = "navbar navbar-default navbar-fixed-top" role="navigation">
<div class = "container-fluid">
<div class = "navbar-header">
<!--<a href= "#" calss = "navbar-brand btn btn-lg"><img src="whatly1.png" alt="whatly" width="150" height="80"></a>-->
<button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse">
<span class="sr-only">Toggle navigation</span>
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
</button>
<ul class = "nav navbar-brand navbar-left"><a calss = "btn btn-success btn-lg">Whatly</a></ul>
</div>
<div class ="collapse navbar-collapse navHeaderCollapse">
<!--<ul class = "nav navbar-nav navbar-left"><li><a calss = "btn btn-default btn-lg" href="#">Whatly</a></li></ul>-->
<ul class = "nav navbar-nav navbar-right">
<li class = "active dropdown"><a href="#" id ='file' class= "dropdown-toggle" data-toggle = "dropdown">File <b class = "caret"></b></a>
<ul class = "dropdown-menu">
<li><a href="new-engine.php" id='new'>New</a></li>
<li class = "dropdown"><a href="#" id='open' class = "btn-default" data-toggle = "modal" data-target="#openModal">Graphs</a></li>
<li><a href="#" class="btn-default" data-toggle="modal" data-target="#beLogSaveRejectModal" id = "save-as-submit">Save as</a></li>
<li><a href="#" class="btn-default" data-toggle="modal" data-target="#beLogSaveRejectModal" id="save-submit">Save</a></li>
<li><a href="#" id='print'>Print</a></li>
</ul>
</li>
<li class ="dropdown"><a href="#" id = 'language' class = "dropdown-toggle" data-toggle = "dropdown">Language <b class = "caret"></b></a>
<ul class = "dropdown-menu">
<li><a href="#" id='english' onclick="english(); return false;">English</a></li>
<li><a href="#" id='mandarin' onclick="mandarin(); return false;">Mandarin</a></li>
<li><a href="#" id='spanish' onclick="spanish(); return false;">Spanish</a></li>
<li><a href="#" id='french' onclick="french(); return false;">French</a></li>
</ul>
</li>
<li class = "dropdown"><a href="#" id= 'help' data-toggle = "modal">Watch demo</a></li>
<li class = "dropdown"><a href="#" id= 'help' data-toggle = "modal">About</a></li>
<li class="log-in" id ="log"><a href="#" class="btn btn-lg" data-toggle="modal" data-target="#logInModal">Log in</a></li>
<li class="register" id="reg"><a href="#" class="btn btn-lg" data-toggle="modal" data-target="#registerModal">Register</a>
<!--Register modal-->
<div class="modal fade" id="registerModal" tabindex="-1" role="dialog" aria-labeledby="registerLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="registerLabel">Register</h4>
</div>
<div class="modal-body">
<form name="register-form" action="register-engine.php" method="POST" class="pure-form form" onsubmit ="return validateFormRegister();">
<div class='name form-group'>
<input type="text" placeholder="Name*" name="name" id="name-register" class="form-control">
</div>
<div class='e-mail form-group'>
<input type="text" placeholder="E-mail*" name="e-mail" id="e-mail-register" class="form-control">
</div>
<div class='username form-group'>
<input type="text" placeholder="User name*" name="user-name2" id="username-register" class="form-control">
</div>
<div class='password form-group'>
<input type="password" placeholder="Password*" name="password2" id="psw-register" class="form-control">
</div>
<div class='re-password form-group'>
<input type="password" placeholder="Repeat password*" name="re-password" id="rpsw-register" class="form-control">
</div>
<!--<input type="submit" value="Sign up" id="register-submit">-->
<button type="submit" class="btn btn-info btn-lg">Save</button>
</form>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<!--The modals-->
<!--Open modal-->
<div class="modal fade" id="openModal" tabindex="-1" role="dialog" aria-labelledby="openLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="openLabel">Open graphs</h4>
</div>
<div class="modal-body" >
<div class="table-responsive">
<table class="table" id="myTable">
<thead>
<tr>
<th>Graph name</th>
<th>Remove the graph</th>
</tr>
</thead>
<tbody id= "graphList">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--Before log in save reject-->
<div class="modal fade" id="beLogSaveRejectModal" tabindex="-1" role="dialog" aria-labelledby="beLogSaveRejectLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="beLogSaveRejectLabel"></h4>
</div>
<div class="modal-body">
<p id='save-as-confirm-p'>Please log in before saving the graph.</p>
</div>
</div>
</div>
</div>
<!--Save as modal window-->
<div class="modal fade" id="saveAsModal" tabindex="-1" role="dialog" aria-labelledby="saveAsLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="saveAsLabel">Save as</h4>
</div>
<div class="modal-body">
<form name="save-as-form" action="save-as-engine.php" method="POST" class="pure-form form" id = "form-save-as" onsubmit ="return validateFormSaveAs();">
<div class="form-group">
<p id = 'save-as-p'>Please enter a title for your graph:</p>
<input type="text" placeholder="Title" name="title" id="title-save-as" class="form-control">
</div>
<div>
<input type="text" placeholder="Graph" name="graph" id="graph-txt">
</div>
<!--<input type="submit" value="Save-as" id = "save-as-submit">-->
<button type="submit" class="btn btn-info btn-lg" value="Save-as" >Save</button>
</form>
</div>
</div>
</div>
</div>
<!--Save modal window-->
<div class="modal fade" id="saveModal" tabindex="-1" role="dialog" aria-labeledby="saveLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="saveLabel"></h4>
</div>
<div class="modal-body">
<form name="save-form" action="save-engine.php" method="POST" class="pure-form" id = "form-save"; >
<div>
<p id= 'save-p'>Please click on save to save the graph:</p>
<input type="hidden" placeholder="Title" name="title" id="title-save">
</div>
<div>
<input type="hidden" placeholder="Graph" name="graph" id="graph-txt-save">
</div>
<div>
<input type="hidden" placeholder="Count" name="count" id="count-save">
</div>
<!--<input type="submit" value="Save" id = "save-submit">-->
<button type="submit" class="btn btn-info btn-lg" value="Save">Save</button>
</form>
</div>
</div>
</div>
</div>
<!--Save reject Modal window-->
<div class="modal fade" id="saveRejectModal" tabindex="-1" role="dialog" aria-labelledby="saveRejectLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="saveRejectLabel"></h4>
</div>
<div class="modal-body">
<p id='save-as-confirm-p'>Since you haven't saved this graph before you have to click on save as for saving this graph .</p>
</div>
</div>
</div>
</div>
<!--Remove confirm modal-->
<div class="modal fade" id="removeModal" tabindex="-1" role="dialog" aria-labeledby="removeLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="closeRemove">X</button>
<h4 class="modal-title" id="removeLabel"></h4>
</div>
<div class="modal-body">
<form name="save-form" action="remove-engine.php" method="POST" class="pure-form" id = "form-save"; >
<div>
<p id= 'save-p'>Are you sure you want to remove the graph?</p>
<input type="hidden" placeholder="Title" name="title-remove" id="title-remove">
</div>
<!--<div>
<input type="text" placeholder="Count" name="count" id="count-save">
</div>-->
<!--<input type="submit" value="Save" id = "save-submit">-->
<button type="submit" class="btn btn-info btn-lg" value="Save">Remove</button>
</form>
</div>
</div>
</div>
</div>
<!--Log in modal-->
<div class="modal fade" id="logInModal" tabindex="-1" role="dialog" aria-labelledby="logInLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="logInLabel">Log In</h4>
</div>
<div class="modal-body">
<form name="sign-in-form" action="log-in-engine.php" method="POST" class="pure-form form" onsubmit="return validateFormSignIn();">
<div class='username form-group'>
<input type="text" placeholder="email" name="email-login" id="em-log-in" class="form-control">
</div>
<div class='password form-group'>
<input type="password" placeholder="Password" name="password1" id = "psw-log-in" class="form-control">
</div>
<!--<input type="submit" value="Sign in" id = "sign-in-submit">-->
<button type="submit" class="btn btn-info btn-lg">Log In</button>
</form>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!--This (div) is the part that the whole javascript code would be called in-->
<div id="myholder"></div>
</body>
<script type="text/javascript" src="graph.js"></script>
<script type="text/javascript">
//The code for form validation
function validateFormSignIn() {
var usernameValidate = document.forms["sign-in-form"]["email-login"].value;
var passwordValidate = document.forms["sign-in-form"]["password1"].value;
if ((usernameValidate == null || usernameValidate == "") || (passwordValidate == null || passwordValidate == "")) {
alert("You must fill out your username/password!!");
return false;
}
}
function validateFormRegister() {
var flag = 1;
var nameValidate = document.forms["register-form"]["name"].value;
var emailValidate = document.forms["register-form"]["e-mail"].value;
var usernameValidate = document.forms["register-form"]["user-name2"].value;
var passwordValidate = document.forms["register-form"]["password2"].value;
var repasswordValidate = document.forms["register-form"]["re-password"].value;
var nameValidateLen = nameValidate.length;
var usernameValidateLen = usernameValidate.length;
var passwordValidateLen = passwordValidate.length;
var repasswordValidateLen = repasswordValidate.length;
var atpos = emailValidate.indexOf("@");
var dotpos = emailValidate.lastIndexOf(".");
if(flag==1){
if (usernameValidateLen > 17){
alert("You cannot have a username longer than 16 letters. choose another username.");
return false;
}
if ((nameValidate == null || nameValidate == "") || (emailValidate == null || emailValidate == "") || (usernameValidate == null || usernameValidate == "") || (passwordValidate == null || passwordValidate == "") || (repasswordValidate == null || repasswordValidate == "")) {
alert("You must fill out all the boxes in the form!!");
return false;
}
if (nameValidateLen > 31){
alert("You cannot have the name longer than 30 letters. So please shorten your name.");
return false;
}
if (atpos< 1 || dotpos<atpos+2 || dotpos+2>=emailValidate.length) {
alert("Not a valid e-mail address");
return false;
}
if (!(passwordValidate == repasswordValidate)){
alert("Passwords don't match!!");
return false;
}
if(passwordValidateLen > 21 || passwordValidateLen < 11){
alert("Please choose a password longer than 10 and shorter than 20.");
return false;
}
}
}
function validateFormSaveAs() {
var titleValidate = document.forms["save-as-form"]["title"].value;
if (titleValidate == null || titleValidate == "") {
alert("You must fill out the title!!");
return false;
}
var titleValidateLen = titleValidate.length;
if (titleValidateLen > 16){
alert("Please choose a title with lenght of shorter than 16");
return false;
}
}
//Functions for changing languages
//$('#english').click(function(){ english(); return false; });
var log = 0;
var language='en';
function readCookie(name) {
var cookiename = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(cookiename) == 0) return c.substring(cookiename.length,c.length);
}
return null;
}
log = readCookie('log-statue-cookie');
user = readCookie('log-in-cookie');
var language;
function english(){
language = "en";
if (log==1){
document.getElementById("logOut").innerHTML = "Log out";
}
//document.getElementById("log").style.marginLeft = "830px";
document.getElementById("new").innerHTML = "New";
document.getElementById("file").innerHTML = "File";
document.getElementById("open").innerHTML = "Open";
document.getElementById("save-as").innerHTML = "Save as";
document.getElementById("save-as-leg").innerHTML = "Save as";
document.getElementById("save-as-p").innerHTML = "Please enter a title for your graph:";
document.getElementById("save-as-confirm-p").innerHTML = "You have saved your graph successfully.";
document.getElementById("save").innerHTML = "Save";
document.getElementById("save-leg").innerHTML = "Save:";
document.getElementById("save-p").innerHTML = "Please click on save to save the graph:";
document.getElementById("save-err-leg").innerHTML = "Save error:";
document.getElementById("save-err-p").innerHTML = "For saving this graph you have to click on save as.";
document.getElementById("print").innerHTML = "print";
document.getElementById("language").innerHTML = "Language";
document.getElementById("english").innerHTML = "English";
document.getElementById("mandarin").innerHTML = "Mandarin";
document.getElementById("spanish").innerHTML = "Spanish";
document.getElementById("french").innerHTML = "French";
document.getElementById("help").innerHTML = "Help";
document.getElementById("manual").innerHTML = "Manual";
document.getElementById("tips").innerHTML = "Tips";
document.getElementById("log-in").innerHTML = "Log in";
document.getElementById("log-in-leg").innerHTML = "Sign in:";
document.getElementById("log-error-p").innerHTML = "Please enter a correct username or password";
document.getElementById("register-a").innerHTML = "Register";
document.getElementById("register-leg").innerHTML = "Register:";
document.getElementById("reg-confirm-p").innerHTML = "Now you can log in to your account";
document.getElementById("reg-denied-p").innerHTML = "Registration has been denied since you are using a registered e-mail or user-name.";
document.getElementById("txarea").innerHTML = "Start writing";
document.getElementById("title-save-as").placeholder = "Title";
document.getElementById("em-log-in").placeholder = "E-mail";
document.getElementById("psw-log-in").placeholder = "Password";
document.getElementById("name-register").placeholder = "Name*";
document.getElementById("e-mail-register").placeholder = "E-mail*";
document.getElementById("username-register").placeholder = "User name*";
document.getElementById("psw-register").placeholder = "Password*";
document.getElementById("rpsw-register").placeholder = "Repeat password*";
document.getElementById("save-as-submit").value = "Save-as";
document.getElementById("save-submit").value = "Save";
document.getElementById("sign-in-submit").value = "Sign in";
document.getElementById("register-submit").value = "Sign up";
}
function mandarin(){
language = "man";
if (log==1){
document.getElementById("logOut").innerHTML = "注销";
//document.getElementById("log").style.marginLeft = "870px";
}
if (log==0){
//document.getElementById("log").style.marginLeft = "900px";
}
document.getElementById("new").innerHTML = "新";
document.getElementById("file").innerHTML = "文件";
document.getElementById("open").innerHTML = "开放";
document.getElementById("save-as").innerHTML = "除";
document.getElementById("save-as-leg").innerHTML = "除";
document.getElementById("save-as-p").innerHTML = "请输入一个标题为您的图表所示:";
document.getElementById("save-as-confirm-p").innerHTML = "您已成功保存您的图形。";
document.getElementById("save").innerHTML = "保存";
document.getElementById("save-leg").innerHTML = "保存:";
document.getElementById("save-p").innerHTML = "请点击保存,保存图:";
document.getElementById("save-err-leg").innerHTML = "保存错误:";
document.getElementById("save-err-p").innerHTML = "保存这个图,你必须点击另存为。";
document.getElementById("print").innerHTML = "打印";
document.getElementById("language").innerHTML = "语言";
document.getElementById("english").innerHTML = "英语";
document.getElementById("mandarin").innerHTML = "普通话";
document.getElementById("spanish").innerHTML = "西班牙语";
document.getElementById("french").innerHTML = "法国";
document.getElementById("help").innerHTML = "救命";
document.getElementById("manual").innerHTML = "手册";
document.getElementById("tips").innerHTML = "温馨提示";
document.getElementById("log-in").innerHTML = "登录";
document.getElementById("log-in-leg").innerHTML = "登入:";
document.getElementById("log-error-p").innerHTML = "请输入正确的用户名或密码";
document.getElementById("register-a").innerHTML = "注册";
document.getElementById("register-leg").innerHTML = "注册::";
document.getElementById("reg-confirm-p").innerHTML = "现在,您可以在您的帐户登录";
document.getElementById("reg-denied-p").innerHTML = "因为你使用的是已注册的电子邮件或用户名的注册已被拒绝。";
document.getElementById("txarea").innerHTML = "动笔";
document.getElementById("title-save-as").placeholder = "称号";
document.getElementById("em-log-in").placeholder = "电子邮件";
document.getElementById("psw-log-in").placeholder = "密码";
document.getElementById("name-register").placeholder = "名字*";
document.getElementById("e-mail-register").placeholder = "电子邮件*";
document.getElementById("username-register").placeholder = "用户名*";
document.getElementById("psw-register").placeholder = "密码*";
document.getElementById("rpsw-register").placeholder = "重复密码*";
document.getElementById("save-as-submit").value = "另存为";
document.getElementById("save-submit").value = "保存";
document.getElementById("sign-in-submit").value = "登入";
document.getElementById("register-submit").value = "报名";
}
function spanish(){
language = 'span';
if (log==1){
document.getElementById('logOut').innerHTML = "finalizar la sesión";
//document.getElementById("log").style.marginLeft = "670px";
}
if (log==0){
//document.getElementById("log").style.marginLeft = "700px";
}
document.getElementById('new').innerHTML = 'nuevo';
document.getElementById('file').innerHTML = 'expediente';
document.getElementById('open').innerHTML = 'abierto';
document.getElementById('save-as').innerHTML = 'Guardar como';
document.getElementById('save-as-leg').innerHTML = 'Guardar como';
document.getElementById('save-as-p').innerHTML = 'Por favor, introduzca un título para el gráfico:';
document.getElementById('save-as-confirm-p').innerHTML = 'Ha guardado tu gráfica con éxito.';
document.getElementById('save').innerHTML = 'Guardar';
document.getElementById('save-leg').innerHTML = 'Guardar:';
document.getElementById('save-p').innerHTML = 'Por favor, haga clic en Guardar para guardar el gráfico:';
document.getElementById('save-err-leg').innerHTML = 'Guardar error:';
document.getElementById('save-err-p').innerHTML = 'Para salvar este gráfico tienes que hacer clic en Guardar como.';
document.getElementById('print').innerHTML = 'impresión';
document.getElementById('language').innerHTML = 'idioma';
document.getElementById('english').innerHTML = 'Inglés';
document.getElementById('mandarin').innerHTML = 'mandarín';
document.getElementById('spanish').innerHTML = 'español';
document.getElementById('french').innerHTML = 'francés';
document.getElementById('help').innerHTML = 'ayuda';
document.getElementById('manual').innerHTML = 'manual';
document.getElementById('tips').innerHTML = 'Consejos';
document.getElementById('log-in').innerHTML = 'iniciar sesión';
document.getElementById('log-in-leg').innerHTML = 'Registrarse:';
document.getElementById('log-error-p').innerHTML = 'Por favor, introduzca un nombre de usuario o contraseña correcta';
document.getElementById('register-a').innerHTML = 'Registrarse';
document.getElementById('register-leg').innerHTML = 'Registrarse:';
document.getElementById('reg-confirm-p').innerHTML = 'Ahora usted puede iniciar sesión en su cuenta';
document.getElementById('reg-denied-p').innerHTML = 'Registro ha sido negado dado que está utilizando un correo electrónico registrada o nombre de usuario.';
document.getElementById('txarea').innerHTML = "Comienza a escribir";
document.getElementById('title-save-as').placeholder = 'título';
document.getElementById('em-log-in').placeholder = 'Email';
document.getElementById('psw-log-in').placeholder = 'contraseña';
document.getElementById('name-register').placeholder = 'nombre*';
document.getElementById('e-mail-register').placeholder = 'E-mail*';
document.getElementById('username-register').placeholder = 'nombre de usuario*';
document.getElementById('psw-register').placeholder = 'contraseña*';
document.getElementById('rpsw-register').placeholder = 'Repita la contraseña*';
document.getElementById('save-as-submit').value = 'guardar como';
document.getElementById('save-submit').value = "guardar";
document.getElementById('sign-in-submit').value = "registrarse";
document.getElementById('register-submit').value = "contratar";
}
function french(){
language = 'frc';
if (log==1){
document.getElementById('logOut').innerHTML = "déconnecter";
//document.getElementById("log").style.marginLeft = "700px";
}
if (log==0){
//document.getElementById("log").style.marginLeft = "700px";
}
document.getElementById('new').innerHTML = 'nouveau';
document.getElementById('file').innerHTML = 'fichier';
document.getElementById('open').innerHTML = 'ouvert';
document.getElementById('save-as').innerHTML = 'enregistrer sous';
document.getElementById('save-as-leg').innerHTML = 'enregistrer sous';
document.getElementById('save-as-p').innerHTML = 'Se il vous plaît donner un titre à votre graphique:';
document.getElementById('save-as-confirm-p').innerHTML = 'Vous avez enregistré avec succès votre graphique.';
document.getElementById('save').innerHTML = 'Enregistrer';
document.getElementById('save-leg').innerHTML = 'Enregistrer:';
document.getElementById('save-p').innerHTML = 'Se il vous plaît cliquez sur Enregistrer pour enregistrer le graphique:';
document.getElementById('save-err-leg').innerHTML = 'Enregistrer erreur:';
document.getElementById('save-err-p').innerHTML = 'Pour sauver ce graphique, vous devez cliquer sur Enregistrer sous.';
document.getElementById('print').innerHTML = 'imprimer';
document.getElementById('language').innerHTML = 'langue';
document.getElementById('english').innerHTML = 'anglais';
document.getElementById('mandarin').innerHTML = 'mandarin';
document.getElementById('spanish').innerHTML = 'espagnol';
document.getElementById('french').innerHTML = 'français';
document.getElementById('help').innerHTML = 'Aidez-Moi';
document.getElementById('manual').innerHTML = 'manuel';
document.getElementById('tips').innerHTML = 'Conseils';
document.getElementById('log-in').innerHTML = 'Se connecter';
document.getElementById('log-in-leg').innerHTML = 'Se connecter:';
document.getElementById('log-error-p').innerHTML = "Se il vous plaît entrer un nom d'utilisateur ou mot de passe correct";
document.getElementById('register-a').innerHTML = 'Se enregistrer';
document.getElementById('register-leg').innerHTML = 'Se enregistrer:';
document.getElementById('reg-confirm-p').innerHTML = 'Maintenant, vous pouvez vous connecter à votre compte';
document.getElementById('reg-denied-p').innerHTML = "Enregistrement a été refusé puisque vous utilisez un e-mail recommandé ou nom d'utilisateur.";
document.getElementById('txarea').innerHTML = "Commencez à écrire";
document.getElementById('title-save-as').placeholder = 'titre';
document.getElementById('em-log-in').placeholder = "Email";
document.getElementById('psw-log-in').placeholder = "mot de passe";
document.getElementById('name-register').placeholder = "nom*";
document.getElementById('e-mail-register').placeholder = "Email*";
document.getElementById('username-register').placeholder = "Nom d'utilisateur*";
document.getElementById('psw-register').placeholder = "mot de passe*";
document.getElementById('rpsw-register').placeholder = "Répéter le mot de passe*";
document.getElementById('save-as-submit').value = 'enregistrer en tant que';
document.getElementById('save-submit').value = "sauver";
document.getElementById('sign-in-submit').value = "se connecter";
document.getElementById('register-submit').value = "signer";
}
</script>
</html>