$(document).ready(function(){$("#change_password_form").hide();$("#change_password_toggle").hover(function(){$(this).addClass("change_password_toggle_hover")},function(){$(this).removeClass("change_password_toggle_hover")});navigator.appName=="Microsoft Internet Explorer"?$("#change_password_toggle").toggle(function(){$("#change_password_form").show()},function(){$("#change_password_form").hide()}):$("#change_password_toggle").toggle(function(){$("#change_password_form").slideDown(500)},function(){$("#change_password_form").slideUp(500)})}); $(document).ready(function(){$("#avatar_menu").hide();navigator.appName=="Microsoft Internet Explorer"?$("#avatar_pic").toggle(function(){$("#avatar_menu").show()},function(){$("#avatar_menu").hide()}):$("#avatar_pic").toggle(function(){$("#avatar_menu").slideDown(500)},function(){$("#avatar_menu").slideUp(500)})});$(document).ready(function(){$(".ajaxlinks").hover(function(){$(this).addClass("ajaxlinks_hover")},function(){$(this).removeClass("ajaxlinks_hover")})}); $(document).ready(function(){$(".underhat0").corner("20px");$('#ads_motivator').corner("20px");$('#ads_block').corner("20px");$("#livesearch").corner("10px");$("#yes").corner("10px");$("#no").corner("10px");$("#no").corner("10px");$(".message").corner("5px");$(".regcomplete").corner("5px");$(".ask_form0").corner("10px")}); $(document).ready(function(){$("a[name=modal1], a[name=modal2], a[name=modal3], a[name=modal4]").click(function(a){a.preventDefault();a=$(this).attr("href");var b=$(document).height(),c=$(window).width();$("#mask").css({width:c,height:b});$("#mask").fadeTo("fast",0.5);$("#mask").fadeIn(750);b=$(window).height();c=$(window).width();$(a).css("top",b/2-$(a).height()/2);$(a).css("left",c/2-$(a).width()/2);$(a).fadeIn(1200)});$("a[name=modal5]").click(function(a){a.preventDefault();a=$(this).attr("href"); $("#dialog2").fadeOut("slow");var b=$(window).height(),c=$(window).width();$(a).css("top",b/2-$(a).height()/2);$(a).css("left",c/2-$(a).width()/2);$(a).fadeIn("slow")});$("#mask").click(function(){$(this).fadeOut(500);$(".window").fadeOut(250)})}); $(document).ready(function(){$("#msg").attr("value")=="db_error"&&$("#db_error").slideDown(500);$("#msg").attr("value")=="form_not_filled"&&$("#form_not_filled").slideDown(500);$("#msg2").attr("value")=="form_not_filled"&&$("#form_not_filled").slideDown(500);$("#msg").attr("value")=="email_not_valid"&&$("#email_not_valid").slideDown(500);$("#msg").attr("value")=="pass_not_same"&&$("#pass_not_same").slideDown(500);$("#msg").attr("value")=="pass_not_length"&&$("#pass_not_length").slideDown(500);$("#msg").attr("value")== "query_error"&&$("#query_error").slideDown(500);$("#msg").attr("value")=="email_already"&&$("#email_already").slideDown(500);$("#msg").attr("value")=="reg_error"&&$("#reg_error").slideDown(500);$("#msg").attr("value")=="reg_complete"&&$("#reg_complete").slideDown(500);$("#msg").attr("value")=="login_error"&&$("#login_error").slideDown(500);$("#msg").attr("value")=="email_unreg"&&$("#email_unreg").slideDown(500);$("#msg").attr("value")=="login_false"&&$("#login_false").slideDown(500);$("#msg").attr("value")== "login_true"&&$("#login_true").slideDown(500);$("#msg").attr("value")=="logout_fail"&&$("#logout_fail").slideDown(500);$("#msg").attr("value")=="logout_avoid"&&$("#logout_avoid").slideDown(500);$("#msg").attr("value")=="logout_success"&&$("#logout_success").slideDown(500);$("#msg").attr("value")=="chps_error"&&$("#chps_error").slideDown(500);$("#msg").attr("value")=="chps_ok"&&$("#chps_ok").slideDown(500);$("#msg").attr("value")=="genpass_false"&&$("#genpass_false").slideDown(500);$("#msg").attr("value")== "newpass_false"&&$("#newpass_false").slideDown(500);$("#msg").attr("value")=="email_notsend"&&$("#email_notsend").slideDown(500);$("#msg").attr("value")=="email_notreg"&&$("#email_notreg").slideDown(500);$("#msg").attr("value")=="newpass_true"&&$("#newpass_true").slideDown(500);$("#msg2").attr("value")=="quest_not_filled"&&$("#quest_not_filled").slideDown(500);$("#msg2").attr("value")=="quest_bad_length"&&$("#quest_bad_length").slideDown(500);$("#msg2").attr("value")=="quest_exist_main"&&$("#quest_exist_main").slideDown(500); $("#msg2").attr("value")=="quest_exist_approval"&&$("#quest_exist_approval").slideDown(500);$("#msg2").attr("value")=="insert_error"&&$("#insert_error").slideDown(500);$("#msg2").attr("value")=="add_quest_ok"&&$("#add_quest_ok").slideDown(500);$("#msg2").attr("value")=="quest_delete_not_filled"&&$("#quest_delete_not_filled").slideDown(500);$("#msg2").attr("value")=="quest_delete_false"&&$("#quest_delete_false").slideDown(500);$("#msg2").attr("value")=="quest_delete_ok"&&$("#quest_delete_ok").slideDown(500); $("#msg2").attr("value")=="nickname_bad_length"&&$("#nickname_bad_length").slideDown(500);$("#msg2").attr("value")=="realname_bad_length"&&$("#realname_bad_length").slideDown(500);$("#msg2").attr("value")=="patronymic_bad_length"&&$("#patronymic_bad_length").slideDown(500);$("#msg2").attr("value")=="checkdate_false"&&$("#checkdate_false").slideDown(500);$("#msg2").attr("value")=="nickname_taken"&&$("#nickname_taken").slideDown(500);$("#msg2").attr("value")=="save_details_error"&&$("#save_details_error").slideDown(500); $("#msg2").attr("value")=="save_details_ok"&&$("#save_details_ok").slideDown(500);$("#msg2").attr("value")=="avatar_not_chosen"&&$("#avatar_not_chosen").slideDown(500);$("#msg2").attr("value")=="avatar_bad_filetype"&&$("#avatar_bad_filetype").slideDown(500);$("#msg2").attr("value")=="avatar_bad_canvas_size"&&$("#avatar_bad_canvas_size").slideDown(500);$("#msg2").attr("value")=="avatar_bad_file_size"&&$("#avatar_bad_file_size").slideDown(500);$("#msg2").attr("value")=="avatar_copy_falied"&&$("#avatar_copy_falied").slideDown(500); $("#msg2").attr("value")=="avatar_copy_ok"&&$("#avatar_copy_ok").slideDown(500);$(document).click(function(){$(".message, .regcomplete").fadeOut("fast")})});$(document).ready(function(){$(".login_email").hover(function(){$(this).addClass("login_email_hover")},function(){$(this).removeClass("login_email_hover")})}); $(document).ready(function(){$(".buttyes, .buttno, .buttnext, .buttask, .sent, .buttsearch").css({backgroundPosition:"-20px 35px"}).css({fontWeight:"bold"}).mouseover(function(){$(this).stop().animate({backgroundPosition:"0 100px"},{duration:200}).css({color:"white"})}).mouseout(function(){$(this).stop().animate({backgroundPosition:"-20px 35px"},{duration:200}).css({color:"black"})});$(".uuhat input.button").mouseover(function(){$(this).css({color:"white"})}).mouseout(function(){$(this).css({color:"black"})}); $(".underhat1 input.button").mouseover(function(){$(this).css({color:"white"})}).mouseout(function(){$(this).css({color:"navy"})})});$(document).ready(function(){var a=$(".email"),b=$(".pass1"),c=$(".pass2");a.focus(function(){a.addClass("focus")});b.focus(function(){b.addClass("focus")});c.focus(function(){c.addClass("focus")});a.blur(function(){a.removeClass("focus")});b.blur(function(){b.removeClass("focus")});c.blur(function(){c.removeClass("focus")})}); $(document).ready(function(){$("#ask_input, #ask_input2").click(function(){if(this.value==this.defaultValue){this.value="";$(this).addClass("ask2")}});$("#ask_input, #ask_input2").blur(function(){if(this.value==""){this.value=this.defaultValue;$(this).removeClass("ask2")}$("#livesearch").innerHTML("")});$("#ask_input3").click(function(){if(this.value==this.defaultValue){this.value="";$(this).addClass("ask4")}});$("#ask_input3").blur(function(){if(this.value==""){this.value=this.defaultValue;$(this).removeClass("ask4")}})}); $(document).ready(function(){$("#yesclick").click(function(){$("#status").setValue("yes")});$("#noclick").click(function(){$("#status").setValue("no")});$("#nextclick").click(function(){$("#status").setValue("next")})}); $(document).ready(function(){$(".uuuuhat1").hide();$(".uuuuhat2").hide();$(".uuuuhat3").hide();$(".uuuuhat4").hide();$("#pop_questions").hover(function(){$(this).addClass("sorthover")},function(){$(this).removeClass("sorthover")});$("#yes_questions").hover(function(){$(this).addClass("sorthover")},function(){$(this).removeClass("sorthover")});$("#div_questions").hover(function(){$(this).addClass("sorthover")},function(){$(this).removeClass("sorthover")});$("#no_questions").hover(function(){$(this).addClass("sorthover")}, function(){$(this).removeClass("sorthover")});$("#new_questions").hover(function(){$(this).addClass("sorthover")},function(){$(this).removeClass("sorthover")});$("#pop_questions").click(function(){$(".uuuuhat1").hide();$(".uuuuhat2").hide();$(".uuuuhat3").hide();$(".uuuuhat4").hide();$(".uuuuhat0").show();$(this).addClass("sortchoice");$("#yes_questions").removeClass("sortchoice");$("#div_questions").removeClass("sortchoice");$("#no_questions").removeClass("sortchoice");$("#new_questions").removeClass("sortchoice")}); $("#yes_questions").click(function(){$(".uuuuhat0").hide();$(".uuuuhat2").hide();$(".uuuuhat3").hide();$(".uuuuhat4").hide();$(".uuuuhat1").show();$(this).addClass("sortchoice");$("#pop_questions").removeClass("sortchoice");$("#div_questions").removeClass("sortchoice");$("#no_questions").removeClass("sortchoice");$("#new_questions").removeClass("sortchoice")});$("#div_questions").click(function(){$(".uuuuhat0").hide();$(".uuuuhat1").hide();$(".uuuuhat3").hide();$(".uuuuhat4").hide();$(".uuuuhat2").show(); $(this).addClass("sortchoice");$("#pop_questions").removeClass("sortchoice");$("#yes_questions").removeClass("sortchoice");$("#no_questions").removeClass("sortchoice");$("#new_questions").removeClass("sortchoice")});$("#no_questions").click(function(){$(".uuuuhat0").hide();$(".uuuuhat1").hide();$(".uuuuhat2").hide();$(".uuuuhat4").hide();$(".uuuuhat3").show();$(this).addClass("sortchoice");$("#pop_questions").removeClass("sortchoice");$("#yes_questions").removeClass("sortchoice");$("#div_questions").removeClass("sortchoice"); $("#new_questions").removeClass("sortchoice")});$("#new_questions").click(function(){$(".uuuuhat0").hide();$(".uuuuhat1").hide();$(".uuuuhat2").hide();$(".uuuuhat3").hide();$(".uuuuhat4").show();$(this).addClass("sortchoice");$("#pop_questions").removeClass("sortchoice");$("#yes_questions").removeClass("sortchoice");$("#div_questions").removeClass("sortchoice");$("#no_questions").removeClass("sortchoice")})}); $(document).ready(function(){$a=$("#yes_rate").attr("value");$b=$("#no_rate").attr("value");$c=parseInt($a);$d=parseInt($b);if($c==0&&$d==0)$d=$c=50;if(navigator.appName=="Microsoft Internet Explorer")if($c==100){$c=99;$d=1}else if($d==100){$c=1;$d=99}line1=[["yes",$c],["no",$d]];plot1=$.jqplot("chart1",[line1],{seriesColors:["#92d5ea","#be1e2d"],axesDefaults:{show:false},title:"",seriesDefaults:{renderer:$.jqplot.PieRenderer,rendererOptions:{diameter:120,sliceMargin:1,padding:10}},grid:{background:"white", borderColor:"white",shadow:false}})});function number_format(a,b,c,d){a=a;var g=isNaN(b=Math.abs(b))?2:b;b=c==undefined?",":c;d=d==undefined?".":d;c=a<0?"-":"";var f=parseInt(a=Math.abs(+a||0).toFixed(g))+"",e=(e=f.length)>3?e%3:0;return c+(e?f.substr(0,e)+d:"")+f.substr(e).replace(/(\d{3})(?=\d)/g,"$1"+d)+(g?b+Math.abs(a-f).toFixed(g).slice(2):"")} function dothetron0(){today=new Date;var a,b;a=document.all.bmonth.value;b=document.all.bday.value;today.setMonth(a-1);today.setDate(b);today.setHours(0);today.setMinutes(0);today.setSeconds(0);unix_bd=today.getTime();current_time=new Date;unix_current=current_time.getTime();current_year=current_time.getFullYear();past_bd_year=today.getFullYear()-1;yesterday=new Date;yesterday.setFullYear(past_bd_year);yesterday.setMonth(a-1);yesterday.setDate(b);yesterday.setHours(0);yesterday.setMinutes(0);yesterday.setSeconds(0); past_bd=yesterday.getTime();full_length=unix_bd-past_bd;if(unix_current>unix_bd){past_bd=unix_bd;today.setYear(current_year+1);unix_bd=today.getTime();full_length=unix_bd-past_bd}bday_unix_left=unix_bd-unix_current;percent_complete=100-bday_unix_left/full_length*100;pc=number_format(percent_complete,6,".");document.all.woohoo0.innerHTML=pc+"%"} function dothetron1(){today=new Date;yesterday=new Date;tomorrow=new Date;current_year=today.getFullYear();yesterday.setMonth(0);yesterday.setDate(1);yesterday.setHours(0);yesterday.setMinutes(0);yesterday.setSeconds(0);tomorrow.setFullYear(current_year+1);tomorrow.setMonth(0);tomorrow.setDate(1);tomorrow.setHours(0);tomorrow.setMinutes(0);tomorrow.setSeconds(0);today_unix=today.getTime();yesterday_unix=yesterday.getTime();tomorrow_unix=tomorrow.getTime();year_length=tomorrow_unix-yesterday_unix; newyear_unix_left=tomorrow_unix-today_unix;percent_complete=100-newyear_unix_left/year_length*100;pc=number_format(percent_complete,6,".");document.all.woohoo1.innerHTML=pc+"%"}setInterval("dothetron0()",1E3);setInterval("dothetron1()",1E3);var xmlhttp; function showResult(a){if(a.length==0){document.getElementById("livesearch").innerHTML="";document.getElementById("livesearch").style.border="0px";document.getElementById("livesearch").style.background="";document.getElementById("livesearch").style.width="485px";document.getElementById("livesearch").style.color=""}else{xmlhttp=GetXmlHttpObject();if(xmlhttp==null)alert("Your browser does not support XML HTTP Request");else{a=encodeURI(a);var b="ajaxsearch.php";b=b+"?q="+a;b=b+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",b,true);xmlhttp.send(null)}}}function stateChanged(){if(xmlhttp.readyState==4){document.getElementById("livesearch").innerHTML=xmlhttp.responseText;document.getElementById("livesearch").style.border="1px solid #A5ACB2";document.getElementById("livesearch").style.background="#8fd2fe";document.getElementById("livesearch").style.width="485px";document.getElementById("livesearch").style.color="white"}} function GetXmlHttpObject(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("Microsoft.XMLHTTP");return null};
