1$(document).ready(function(){ 2 3 var tag = window.location.hash; 4 5 if(tag == '#comment'){ 6 show_comment_form(); 7 } 8 9 10}); 11 12function show_photo(id) { 13 prepare_modal_layout(260, 180, '<div id="photo_popup"></div>'); 14 get_photo(id, 'photo_popup'); 15}; 16 17function get_photo(id, container_id) { 18 var xmlhttp; 19 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 20 xmlhttp=new XMLHttpRequest(); 21 } else if (window.ActiveXObject) {// code for IE6, IE5 22 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 23 } else { 24 alert("Your browser does not support XMLHTTP!"); 25 } 26 xmlhttp.onreadystatechange=function() { 27 if(xmlhttp.readyState==4) { 28 if (xmlhttp.responseText == 'false') { 29 alert('FATAL ERROR! Could not get message form data.'); 30 } else { 31 var width_old = $('#modal_window').width(); 32 div = document.getElementById(container_id) 33 div.innerHTML = xmlhttp.responseText; 34 var left = $('#modal_window').css('marginLeft').replace(/px/, ''); 35 var height = $('#modal_window .photo_popup_container img').height(); 36 var width = $('#modal_window .photo_popup_container img').width(); 37 var width_delta = Math.floor((width - width_old) / 2); 38 left = parseInt(left) - parseInt(width_delta); 39 $(div).css({'display' : 'none'}); 40 $('#modal_window').animate({'height' : (parseInt(height) + 40) + 'px', 'width' : (parseInt(width) + 40) + 'px', 'marginLeft' : left + 'px'}, 200, function() { 41 $(div).css({'display' : 'block'}); 42 }); 43 } 44 } 45 } 46 xmlhttp.open("GET", "/scripts_ajax/photo.popup.php?id=" + id, true); 47 xmlhttp.send(null); 48} 49 50 51function show_login_data (email) { 52 $('dl.helpers .account').remove(); 53 $('dl.helpers').append('<dt class="account" id="menu_profile"><a href="#" onclick="show_profile_form(); return false;">' + email + '</a></dt>'); 54 $('dl.helpers').append('<dt class="account" id="menu_logout"><a href="#" onclick="logout(); return false;">ÐÑйÑи</a></dt>'); 55} 56 57function hide_login_data () { 58 $('dl.helpers .account').remove(); 59 $('dl.helpers').append('<dt class="account" id="menu_register"><a href="#" onclick="show_register_form(); return false;">РегиÑÑÑаÑиÑ</a></dt>'); 60 $('dl.helpers').append('<dt class="account" id="menu_login"><a href="#" onclick="show_login_form(); return false;">ÐÑ Ð¾Ð´</a></dt>'); 61} 62 63function logout () { 64 65 jQuery.ajax({ 66 type : "POST", 67 dataType : 'json', 68 async : false, 69 url : "/scripts_ajax/logout.php", 70 success : function(data){ 71 72 } 73 }); 74 75 //clear_cookie('user_cookie'); 76 window.location.reload(); 77 //hide_login_data(); 78} 79 80 81 82function show_register_form() { 83 prepare_modal_layout(350, 470, '<div id="register_popup"></div>'); 84 get_register_form('register_popup'); 85}; 86 87function get_register_form(container_id) { 88 var xmlhttp; 89 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 90 xmlhttp=new XMLHttpRequest(); 91 } else if (window.ActiveXObject) {// code for IE6, IE5 92 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 93 } else { 94 alert("Your browser does not support XMLHTTP!"); 95 } 96 xmlhttp.onreadystatechange=function() { 97 if(xmlhttp.readyState==4) { 98 if (xmlhttp.responseText == 'false') { 99 alert('FATAL ERROR! Could not get message form data.'); 100 } else { 101 div = document.getElementById(container_id) 102 div.innerHTML = xmlhttp.responseText; 103 init_register_form(); 104 } 105 } 106 } 107 xmlhttp.open("GET", "/scripts_ajax/register.popup.form.php", true); 108 xmlhttp.send(null); 109} 110 111function init_register_form() { 112 var register_popup_options = { 113 url: '/scripts_ajax/register.popup.execute.php', 114 type: 'POST', 115 beforeSubmit: function() { 116 return process_register_form(); 117 }, 118 success: function(response, status, xhr, $form) { 119 div = document.getElementById("register_popup") 120 div.innerHTML = response; 121 var height = $('#modal_window .register_form').height(); 122 $(div).css({'display' : 'none'}); 123 124 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 125 $(div).css({'display' : 'block'}); 126 }); 127 128 /* 129 $('#modal_window').fadeOut(200, function() { 130 $(div).css({'display' : 'block'}); 131 }); 132 */ 133 init_register_form(); 134 } 135 }; 136 $('form#register_form').ajaxForm(register_popup_options); 137} 138 139function process_register_form() { 140 var email = $("#field_email").val(); 141 var password = $("#field_password").val(); 142 var password_repeat = $("#field_password_repeat").val(); 143 email = email.toLowerCase(); 144 if (email == '') { 145 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 146 } else if ((email != '') && (email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 147 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 148 } else if (password == '') { 149 alert('ÐÑ Ð½Ðµ Ñказали паÑолÑ'); 150 } else if (password != password_repeat) { 151 alert('ÐаÑÐ¾Ð»Ñ Ð¸ его повÑÐ¾Ñ Ð½Ðµ ÑовпадаÑÑ'); 152 } else { 153 return true; 154 } 155 return false;
156} 157 158 159 160function show_profile_form() { 161 prepare_modal_layout(600, 300, '<div id="profile_popup"></div>'); 162 get_profile_form('profile_popup'); 163}; 164 165function get_profile_form(container_id) { 166 var xmlhttp; 167 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 168 xmlhttp=new XMLHttpRequest(); 169 } else if (window.ActiveXObject) {// code for IE6, IE5 170 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 171 } else { 172 alert("Your browser does not support XMLHTTP!"); 173 } 174 xmlhttp.onreadystatechange=function() { 175 if(xmlhttp.readyState==4) { 176 if (xmlhttp.responseText == 'false') { 177 alert('FATAL ERROR! Could not get message form data.'); 178 } else { 179 div = document.getElementById(container_id) 180 div.innerHTML = xmlhttp.responseText; 181 init_profile_form(); 182 } 183 } 184 } 185 xmlhttp.open("GET", "/scripts_ajax/profile.popup.php", true); 186 xmlhttp.send(null); 187} 188 189function init_profile_form() { 190 var profile_popup_options = { 191 url: '/scripts_ajax/profile.popup.php', 192 type: 'POST', 193 beforeSubmit: function() { 194 return process_profile_form(); 195 }, 196 success: function(response, status, xhr, $form) { 197 div = document.getElementById("profile_popup") 198 div.innerHTML = response; 199 var height = $('#modal_window .profile_form').height(); 200 $(div).css({'display' : 'none'}); 201 202 203 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 204 $(div).css({'display' : 'block'}); 205 }); 206 /* 207 $('#modal_window').fadeOut(200, function() { 208 $(div).css({'display' : 'block'}); 209 }); 210 */ 211 init_profile_form(); 212 } 213 }; 214 $('form#profile_form').ajaxForm(profile_popup_options); 215 $('form#profile_avatar_form').ajaxForm(profile_popup_options); 216} 217 218function process_profile_form() { 219 return true; 220} 221 222 223 224function show_subscription_form() { 225 prepare_modal_layout(350, 200, '<div id="subscription_popup"></div>'); 226 get_subscription_form('subscription_popup'); 227}; 228 229function get_subscription_form(container_id) { 230 var xmlhttp; 231 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 232 xmlhttp=new XMLHttpRequest(); 233 } else if (window.ActiveXObject) {// code for IE6, IE5 234 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 235 } else { 236 alert("Your browser does not support XMLHTTP!"); 237 } 238 xmlhttp.onreadystatechange=function() { 239 if(xmlhttp.readyState==4) { 240 if (xmlhttp.responseText == 'false') { 241 alert('FATAL ERROR! Could not get message form data.'); 242 } else { 243 div = document.getElementById(container_id) 244 div.innerHTML = xmlhttp.responseText; 245 init_subscription_form(); 246 } 247 } 248 } 249 xmlhttp.open("GET", "/scripts_ajax/subscription.popup.php?lang=" + lang_lower, true); 250 xmlhttp.send(null); 251} 252 253function init_subscription_form() { 254 var subscription_popup_options = { 255 url: '/scripts_ajax/subscription.popup.php', 256 type: 'POST', 257 beforeSubmit: function() { 258 return process_subscription_form(); 259 }, 260 success: function(response, status, xhr, $form) { 261 div = document.getElementById("subscription_popup") 262 div.innerHTML = response; 263 var height = $('#modal_window .subscription_form').height(); 264 $(div).css({'display' : 'none'}); 265 266 267 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 268 $(div).css({'display' : 'block'}); 269 }); 270 /* 271 $('#modal_window').fadeOut(200, function() { 272 $(div).css({'display' : 'block'}); 273 }); 274 */ 275 init_subscription_form(); 276 } 277 }; 278 $('form#subscription_form').ajaxForm(subscription_popup_options); 279} 280 281function process_subscription_form() { 282 var email = $("#field_email").val(); 283 var name = $("#field_name").val(); 284 email = email.toLowerCase(); 285 if (email == '') { 286 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 287 } else if ((email != '') && (email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 288 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 289 } else if (name == '') { 290 alert('ÐÑ Ð½Ðµ Ñказали ваÑе имÑ'); 291 } else { 292 return true; 293 } 294 return false; 295} 296 297 298 299function show_email_form(quote) { 300 prepare_modal_layout(470, 370, '<div id="email_popup"></div>'); 301 get_email_form('email_popup',quote); 302}; 303 304function get_email_form(container_id,quote) { 305 var xmlhttp; 306 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 307 xmlhttp=new XMLHttpRequest(); 308 } else if (window.ActiveXObject) {// code for IE6, IE5 309 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 310 } else { 311 alert("Your browser does not support XMLHTTP!"); 312 } 313 xmlhttp.onreadystatechange=function() { 314 if(xmlhttp.readyState==4) { 315 if (xmlhttp.responseText == 'false') { 316 317 remove_modal_layout(); 318 return false;
319 //alert('FATAL ERROR! Could not get message form data.'); 320 } else { 321 div = document.getElementById(container_id) 322 div.innerHTML = xmlhttp.responseText; 323 init_email_form(); 324 } 325 } 326 } 327 328 var dop_url = ''; 329 if(typeof quote != "undefined") 330 dop_url = '?quote='+quote; 331 332 xmlhttp.open("GET", "/scripts_ajax/email.popup.php"+dop_url, true); 333 xmlhttp.send(null); 334} 335 336function init_email_form() { 337 var email_popup_options = { 338 url: '/scripts_ajax/email.popup.php', 339 type: 'POST', 340 beforeSubmit: function() { 341 //return process_email_form(); 342 }, 343 success: function(response, status, xhr, $form) { 344 div = document.getElementById("email_popup") 345 div.innerHTML = response; 346 var height = $('#modal_window .email_form').height(); 347 $(div).css({'display' : 'none'}); 348 349 350 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 351 $(div).css({'display' : 'block'}); 352 }); 353 /* 354 $('#modal_window').fadeOut(200, function() { 355 $(div).css({'display' : 'block'}); 356 }); 357*/ 358 init_email_form(); 359 } 360 }; 361 $('form#email_form').ajaxForm(email_popup_options); 362} 363 364function process_email_form() { 365 366 if($("#field_email").length > 0){ 367 var email = $("#field_email").val(); 368 email = email.toLowerCase(); 369 if (email == '') { 370 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 371 return false; 372 } 373 else if ((email != '') && (email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 374 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 375 return false; 376 } 377 } 378 379/* 380 if($("#field_name").length > 0){ 381 382 var name = $("#field_name").val(); 383 if (name == '') { 384 alert('ÐÑ Ð½Ðµ Ñказали ваÑе имÑ'); 385 return false; 386 } 387 } 388*/ 389 390 var message = $("#field_message").val(); 391 if (message == '') { 392 alert('ÐÑ Ð½Ðµ ввели Ñвое ÑообÑение'); 393 } else { 394 return true; 395 } 396 397 return false; 398} 399 400 401 402 403function show_email_link_form(article_id) { 404 prepare_modal_layout(470, 440, '<div id="email_link_popup"></div>'); 405 get_email_link_form('email_link_popup', article_id); 406}; 407 408function get_email_link_form(container_id, article_id) { 409 var xmlhttp; 410 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 411 xmlhttp=new XMLHttpRequest(); 412 } else if (window.ActiveXObject) {// code for IE6, IE5 413 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 414 } else { 415 alert("Your browser does not support XMLHTTP!"); 416 } 417 xmlhttp.onreadystatechange=function() { 418 if(xmlhttp.readyState==4) { 419 if (xmlhttp.responseText == 'false') { 420 alert('FATAL ERROR! Could not get message form data.'); 421 } else { 422 div = document.getElementById(container_id) 423 div.innerHTML = xmlhttp.responseText; 424 init_email_link_form(); 425 } 426 } 427 } 428 xmlhttp.open("GET", "/scripts_ajax/email.link.popup.php?article_id="+encodeURIComponent(article_id), true); 429 xmlhttp.send(null); 430} 431 432function init_email_link_form() { 433 var email_link_popup_options = { 434 url: '/scripts_ajax/email.link.popup.php', 435 type: 'POST', 436 beforeSubmit: function() { 437 return process_email_link_form(); 438 }, 439 success: function(response, status, xhr, $form) { 440 div = document.getElementById("email_link_popup") 441 div.innerHTML = response; 442 var height = $('#modal_window .email_link_form').height(); 443 $(div).css({'display' : 'none'}); 444 445 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 446 $(div).css({'display' : 'block'}); 447 }); 448 449 /*$('#modal_window').fadeOut(200, function() { 450 $(div).css({'display' : 'block'}); 451 });*/ 452 init_email_link_form(); 453 } 454 }; 455 $('form#email_link_form').ajaxForm(email_link_popup_options); 456} 457 458function process_email_link_form() { 459 var to_email = $("#field_to_email").val(); 460 var from_email = $("#field_from_email").val(); 461 var from_name = $("#field_from_name").val(); 462 to_email = to_email.toLowerCase(); 463 from_email = from_email.toLowerCase(); 464 if (to_email == '') { 465 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ ÑлекÑÑонной поÑÑÑ Ð¿Ð¾Ð»ÑÑаÑелÑ'); 466 } else if ((to_email != '') && (to_email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 467 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ Ð¿Ð¾Ð»ÑÑаÑелÑ'); 468 } else if (from_email == '') { 469 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ Ð²Ð°Ñей ÑлекÑÑонной поÑÑÑ'); 470 } else if ((from_email != '') && (from_email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 471 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ Ð²Ð°Ñей ÑлекÑÑонной поÑÑÑ'); 472 } else if (from_name == '') { 473 alert('ÐÑ Ð½Ðµ Ñказали ваÑе имÑ'); 474 } else { 475 return true; 476 } 477 return false;
478} 479 480 481 482 483function show_photo_order_form(photo_id) { 484 remove_gallery(); 485 prepare_modal_layout(770, 490, '<div id="photo_order_popup"></div>'); 486 get_photo_order_form('photo_order_popup', photo_id); 487}; 488 489function get_photo_order_form(container_id, photo_id) { 490 var xmlhttp; 491 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 492 xmlhttp=new XMLHttpRequest(); 493 } else if (window.ActiveXObject) {// code for IE6, IE5 494 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 495 } else { 496 alert("Your browser does not support XMLHTTP!"); 497 } 498 xmlhttp.onreadystatechange=function() { 499 if(xmlhttp.readyState==4) { 500 if (xmlhttp.responseText == 'false') { 501 alert('FATAL ERROR! Could not get message form data.'); 502 } else { 503 div = document.getElementById(container_id) 504 div.innerHTML = xmlhttp.responseText; 505 init_photo_order_form(); 506 } 507 } 508 } 509 xmlhttp.open("GET", "/scripts_ajax/photo.order.popup.php?photo_id="+encodeURIComponent(photo_id), true); 510 xmlhttp.send(null); 511} 512 513function init_photo_order_form() { 514 var photo_order_popup_options = { 515 url: '/scripts_ajax/photo.order.popup.php', 516 type: 'POST', 517 beforeSubmit: function() { 518 return process_photo_order_form(); 519 }, 520 success: function(response, status, xhr, $form) { 521 div = document.getElementById("photo_order_popup") 522 div.innerHTML = response; 523 var height = $('#modal_window .photo_order_form').height(); 524 $(div).css({'display' : 'none'}); 525 526 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 527 $(div).css({'display' : 'block'}); 528 }); 529 530 /*$('#modal_window').fadeOut(200, function() { 531 $(div).css({'display' : 'block'}); 532 });*/ 533 init_photo_order_form(); 534 } 535 }; 536 $('form#photo_order_form').ajaxForm(photo_order_popup_options); 537} 538 539function process_photo_order_form() { 540 var from_email = $("#field_from_email").val(); 541 var from_phone = $("#field_from_phone").val(); 542 var from_name = $("#field_from_name").val(); 543 from_email = from_email.toLowerCase(); 544 if (from_name == '') { 545 alert('ÐÑ Ð½Ðµ Ñказали ваÑе имÑ'); 546 } else if (from_email == '' && from_phone == '') { 547 alert('ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑказаÑÑ Ð»Ð¸Ð±Ð¾ адÑÐµÑ ÑлекÑÑонной поÑÑÑ, либо ÑелеÑон'); 548 } else if ((from_email != '') && (from_email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 549 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ Ð²Ð°Ñей ÑлекÑÑонной поÑÑÑ'); 550 } else { 551 return true; 552 } 553 return false; 554} 555 556 557 558 559function show_login_form() { 560 prepare_modal_layout(260, 180, '<div id="login_popup"></div>'); 561 get_login_form('login_popup'); 562}; 563 564function show_login_socform() { 565 prepare_modal_layout(260, 180, '<div id="login_popup"></div>'); 566 get_login_socform('login_popup'); 567}; 568 569function get_login_socform(container_id) { 570 var xmlhttp; 571 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 572 xmlhttp=new XMLHttpRequest(); 573 } else if (window.ActiveXObject) {// code for IE6, IE5 574 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 575 } else { 576 alert("Your browser does not support XMLHTTP!"); 577 } 578 xmlhttp.onreadystatechange=function() { 579 if(xmlhttp.readyState==4) { 580 if (xmlhttp.responseText == 'false') { 581 alert('FATAL ERROR! Could not get message form data.'); 582 } else { 583 div = document.getElementById(container_id) 584 div.innerHTML = xmlhttp.responseText; 585 } 586 } 587 } 588 xmlhttp.open("GET", "/scripts_ajax/login.popup.socform.php", true); 589 xmlhttp.send(null); 590} 591 592function get_login_form(container_id) { 593 var xmlhttp; 594 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 595 xmlhttp=new XMLHttpRequest(); 596 } else if (window.ActiveXObject) {// code for IE6, IE5 597 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 598 } else { 599 alert("Your browser does not support XMLHTTP!"); 600 } 601 xmlhttp.onreadystatechange=function() { 602 if(xmlhttp.readyState==4) { 603 if (xmlhttp.responseText == 'false') { 604 alert('FATAL ERROR! Could not get message form data.'); 605 } else { 606 div = document.getElementById(container_id) 607 div.innerHTML = xmlhttp.responseText; 608 } 609 } 610 } 611 xmlhttp.open("GET", "/scripts_ajax/login.popup.form.php", true); 612 xmlhttp.send(null); 613} 614 615function process_login_form() 616{ 617 var email = $("#login_email").val(); 618 var password = $("#login_password").val(); 619 var container_id = "login_popup"; 620 email = email.toLowerCase(); 621 if (email == '') { 622 alert('ÐÑ Ð½Ðµ Ñказали адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 623 } else if ((email != '') && (email.search(/^[a-z0-9._-]+@[a-z0-9_-]+(\.[a-z]+){1,2}$/) != 0)) { 624 alert('ÐÑ Ñказали невеÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ'); 625 } else if (password == '') { 626 alert('ÐÑ Ð½Ðµ Ñказали паÑолÑ'); 627 } else { 628 submit_login_form(email, password, container_id); 629 } 630} 631 632function submit_login_form(email, password, container_id) 633{ 634 var xmlhttp; 635 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 636 xmlhttp=new XMLHttpRequest(); 637 } else if (window.ActiveXObject) {// code for IE6, IE5 638 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 639 } else { 640 alert("Your browser does not support XMLHTTP!"); 641 } 642 xmlhttp.onreadystatechange=function() { 643 if(xmlhttp.readyState==4) { 644 if (xmlhttp.responseText == 'false') { 645 alert('FATAL ERROR! Could not get message result data.'); 646 } else { 647 div = document.getElementById(container_id) 648 div.innerHTML = xmlhttp.responseText; 649 var height = $('#modal_window .login_form').height(); 650 $(div).css({'display' : 'none'}); 651 652 $('#modal_window').animate({'height' : (height + 50) + 'px'}, 200, function() { 653 $(div).css({'display' : 'block'}); 654 }); 655 656 /*$('#modal_window').fadeOut(200, function() { 657 $(div).css({'display' : 'block'}); 658 });*/ 659 } 660 } 661 } 662 var params = "email="+encodeURIComponent(email)+"&password="+encodeURIComponent(password); 663 xmlhttp.open("POST", "/scripts_ajax/login.popup.execute.php", true); 664 xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 665 //xmlhttp.setRequestHeader("Content-length", params.length); 666 //xmlhttp.setRequestHeader("Connection", "close"); 667 xmlhttp.send(params); 668} 669 670 671 672function prepare_modal_cross () { 673 var modal_cross = document.createElement('img'); 674 modal_cross.id = 'modal_cross'; 675 modal_cross.src = '/graphics/modal_cross.png'; 676 modal_cross.style.zIndex = '9999999'; 677 modal_cross.style.position = 'fixed'; 678 modal_cross.style.zoom = '1'; 679 modal_cross.style.right = '0px'; 680 modal_cross.style.top = '0px'; 681 modal_cross.style.width = '50px'; 682 modal_cross.style.height = '50px'; 683 modal_cross.style.cursor = 'pointer'; 684 modal_cross.style.display = 'none'; 685 686 return modal_cross; 687} 688 689 690function prepare_modal_back () { 691 var modal = document.createElement('div'); 692 modal.id = 'modal'; 693 modal.style.zIndex = '9999'; 694 modal.style.position = 'absolute'; 695 modal.style.zoom = '1'; 696 modal.style.left = '0px'; 697 modal.style.top = '0px'; 698 modal.style.width = $(window).width() + 'px'; 699 modal.style.height = $(document).height() + 'px'; 700 modal.style.opacity = '0.90'; 701 modal.style.filter = 'alpha(opacity = 90)'; 702 modal.style.backgroundColor = '#e0e0e0'; 703// modal.style.webkitBoxShadow = 'inset 0px 0px 240px #777777'; 704// modal.style.MozBoxShadow = 'inset 0px 0px 240px #777777'; 705// modal.style.boxShadow = 'inset 0px 0px 480px #777777'; 706 modal.style.display = 'none'; 707 708 return modal; 709} 710 711function prepare_modal_window (width, height, inner_html) { 712 var modal_window = document.createElement('div'); 713 714 modal_window.id = 'modal_window'; 715 modal_window.style.zIndex = '99999'; 716 modal_window.style.position = 'fixed'; 717 modal_window.style.left = '50%'; 718 modal_window.style.marginLeft = '-' + Math.floor(width / 2) + 'px'; 719 modal_window.style.top = 100 + 'px'; 720 modal_window.style.width = width + 'px'; 721 //modal_window.style.height = height + 'px'; 722 modal_window.style.backgroundColor = '#fff'; 723 modal_window.style.webkitBoxShadow = '0px 0px 6px #999999'; 724 //modal_window.style.webkitBorderRadius = '10px'; 725 modal_window.style.MozBoxShadow = '0px 0px 6px #999999'; 726 //modal_window.style.MozBorderRadius = '10px'; 727 modal_window.style.boxShadow = '0px 0px 12px #999999'; 728 //modal_window.style.borderRadius = '10px'; 729 if (navigator.userAgent.toLowerCase().indexOf('msie') > -1) { 730 modal_window.style.border = '3px solid #bbbbbb'; 731 } 732 modal_window.style.display = 'none'; 733 734 modal_window.innerHTML = inner_html; 735 736 return modal_window; 737} 738 739function remove_modal_layout () { 740 if (navigator.userAgent.toLowerCase().indexOf('msie') > -1) { 741 $('#modal_window').animate({'top': '120px'}, 200, function () { 742 $('#modal').animate({'opacity': '0.0'}, 300, function () { 743 $('#modal').remove(); 744 }); 745 $('#modal_window').remove(); 746 }); 747 } else { 748 $('#modal_window').animate({'opacity': '0.0', 'top': '120px'}, 200, function () { 749 $('#modal').animate({'opacity': '0.0'}, 300, function () { 750 $('#modal').remove(); 751 }); 752 $('#modal_window').remove(); 753 }); 754 } 755 756 window.location.hash = ''; 757} 758 759function prepare_modal_layout (width, height, inner_html) { 760 var _body = document.getElementsByTagName('body')[0]; 761 762 var modal = prepare_modal_back(); 763 var modal_window = prepare_modal_window(width, height, inner_html); 764 765 _body.appendChild(modal_window); 766 _body.appendChild(modal); 767 768 $(modal).click(function(){ 769 remove_modal_layout(); 770 }); 771 772 $(modal).show(); 773 $(modal).css({'opacity': '0.0'}); 774 $(modal).animate({'opacity': '0.85'}, 200, function () { 775 $(modal_window).show(); 776 if (navigator.userAgent.toLowerCase().indexOf('msie') > -1) { 777 $(modal_window).css({'top': '80px'}); 778 $(modal_window).animate({'top': '100px'}, 300); 779 } else { 780 $(modal_window).css({'opacity': '0.0', 'top': '80px'}); 781 $(modal_window).animate({'opacity': '1.0', 'top': '100px'}, 300); 782 } 783 }); 784}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.