var Avatar=new Image();var AvatarHead=new Image();function updateProfileDataOnData(a){if(document.getElementById("user_prifile_avatar")){if(a.avatar){Avatar.src=SITE_COST_BASE_URL+"/image/"+a.avatar}else{Avatar.src=SITE_COST_BASE_URL+"/img/no_avatar.gif"}Avatar.onload=function(){document.getElementById("user_prifile_avatar").src=this.src;document.getElementById("user_prifile_avatar").width=this.width;document.getElementById("user_prifile_avatar").height=this.height}}if(document.getElementById("user_prifile_avatar_head")){if(a.avatar){AvatarHead.src=SITE_COST_BASE_URL+"/image/"+a.avatar.replace(/(\.[a-z]+)/,"_70x70$1")}else{AvatarHead.src=SITE_COST_BASE_URL+"/img/no_avatar_head.gif"}AvatarHead.onload=function(){document.getElementById("user_prifile_avatar_head").src=this.src;document.getElementById("user_prifile_avatar_head").width=this.width;document.getElementById("user_prifile_avatar_head").height=this.height}}if(document.getElementById("user_prifile_nick")){document.getElementById("user_prifile_nick").innerHTML=a.nick}return true}function updateProfileData(){HTTPReqSendUsr("getData",[],updateProfileDataOnData)}function showProps(b,c){var a="";if("undefined"==typeof(c)){var c="";a="["}else{}for(p in b){if("object"==typeof(b[p])){a=a+showProps(b[p],c+"["+p+"]")}else{a=a+c+"["+p+"]="+b[p].toString()+"\n"}}if(""==c){alert(a+"]")}else{return a}}function fetchTpl(e,a){if("string"==typeof(e)&&""!=e){var b=Array(),d,c;b=fetchTplgetVals(a,"");for(c in b){e=e.replace(new RegExp(c,"g"),b[c])}}return e}function fetchTplgetVals(a,d){var b=Array(),c=Array();for(i in a){if(""==d){key="{[$]"+i}else{key=d+"."+i}if("object"==typeof(a[i])&&!isNull(a[i])){c=fetchTplgetVals(a[i],key);for(j in c){b[j]=c[j]}}else{if(isNull(a[i])){a[i]=""}key=key+"}";b[key]=a[i]}}return b}function isNull(a){return(a==null)}function getElemVal(b){var e=document.getElementsByName(b);var c;var h;if(e.length>1){for(c=0;c<e.length;c++){if(e[c].checked){h=e[c].value}}}else{if(0==e.length){var a=getElemVal(b+"[m]");var g=getElemVal(b+"[d]");var k=getElemVal(b+"[Y]");if(g<10){g="0"+g}if(a<10){a="0"+a}h=k+"-"+a+"-"+g}else{if("SELECT"==e[0].tagName){var f=e[0];h=f.options[f.selectedIndex].value}else{h=e[0].value}}}return h}function positionRelativeObj(a){var c=a;var b={x:progressPos.x,y:progressPos.y};if(a){do{b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}while(a.offsetParent)}return b}function positionObj(a){var c=a;var b={x:0,y:0};if(a){do{b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}while(a.offsetParent)}return b}function progressShow(b){var a=document.getElementById("HTML_AJAX_LOADING");if(a){var b;a.style.display="block";a.style.position="absolute";if("undefined"==typeof b){b=positionRelativeObj(document.getElementById("main_site_logo"))}a.style.top=b.y.toString().concat("px");a.style.left=b.x.toString().concat("px")}}function progressHide(){var a=document.getElementById("HTML_AJAX_LOADING");if(a){a.style.display="none"}}function in_array(c,b){for(var a=0;a<b.length;a++){if(b[a]==c){return true}}return false}var ErrShow;function HTTPReqSendUsr(d,b,c,a){var e=function(f){ErrShow=f;return};if("undefined"==typeof(a)){a=SITE_COST_BASE_URL_SUB+"/user/server"}if("undefined"==typeof(c)){var c=function(f){return}}$.ajax({url:a,type:"POST",data:HTTPReqFormEncoded({servMethod:d,args:b}),dataType:"json",success:c,error:e})}HTTPReqFormEncoded=function(h,a){var c=[];var g,f="",d;if("undefined"==typeof(a)){a=""}for(var b in h){if(""==a){f=b}else{f=a+"["+b+"]"}if("object"==typeof(h[b])&&!isNull(h[b])){encLoc=HTTPReqFormEncoded(h[b],f);for(d=0;d<encLoc.length;d++){c.push(encLoc[d])}}else{c.push(f+"="+encodeURIComponent(h[b]))}}if(""==a){return c.join("&")}else{return c}};function hideSearchText(b,a){if(a==b.value){b.value=""}}function showSearchText(b,a){if(""==b.value){b.value=a}}var SignInBlock={blockId:"sign_in_block"};SignInBlock.hide=function(){document.getElementById("sign_in_block").style.display="none"};SignInBlock.show=function(c){var f=positionObj(c);var b=330;var a=410;var e=(screen.width-b)/2;var d=f.y;document.getElementById("sign_in_block").style.top=d+"px";document.getElementById("sign_in_block").style.left=e+"px";document.getElementById("sign_in_block").style.width=b+"px";document.getElementById("sign_in_block").style.height=a+"px";document.getElementById("sign_in_block").style.display="block"};function artEdAddAddonBlockSH(a,f,c,g,d){var e=document.getElementById(a);var b=document.getElementById(f);if("undefined"==typeof(c)){c=true}if("undefined"==typeof(g)){g="img/plusArtEd.gif"}if("undefined"==typeof(d)){d="img/minusArtEd.gif"}if(e){if("none"==e.style.display){e.style.display="";if(b){b.style.backgroundImage="url("+SITE_COST_BASE_URL+"/"+d+")"}}else{if(b){b.style.backgroundImage="url("+SITE_COST_BASE_URL+"/"+g+")"}e.style.display="none"}if(b&&c){b.focus()}}return}function intval(a){a=parseInt(a);if(isNaN(a)){a=0}return a}function floatval(a){a=parseFloat(a);if(isNaN(a)){a=0}return a}function hideSearchText(b,a){if(a==b.value){b.value=""}}function showSearchText(b,a){if(""==b.value){b.value=a}}function showHTMLEditor(b,f,c,a){if("undefined"==typeof(f)){f="default"}if("undefined"==typeof(c)){c=530}if("undefined"==typeof(a)){a=500}var e={"default":{theme_advanced_buttons1:"cut,copy,paste,pastetext,pasteword,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,code"},"short":{theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,|,link,unlink,removeformat"}};var d={mode:"exact",elements:b,theme:"advanced",width:c,height:a,theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_buttons1:"",theme_advanced_buttons2:"",theme_advanced_buttons3:"",convert_urls:false,content_css:SITE_COST_EDITOR_BASE_URL+"/css/content.css",template_external_list_url:SITE_COST_EDITOR_BASE_URL+"/lists/template_list.js",external_link_list_url:SITE_COST_EDITOR_BASE_URL+"/lists/link_list.js",external_image_list_url:SITE_COST_EDITOR_BASE_URL+"/lists/image_list.js",media_external_list_url:SITE_COST_EDITOR_BASE_URL+"/lists/media_list.js"};for(i in e[f]){d[i]=e[f][i]}tinyMCE.init(d);return true}function goog_an_log(b,d,a,c){if("undefined"!=typeof(pageTracker)){pageTracker._trackEvent(b,d,a)}return}function montre(h){for(var a=2;a<=12;a++){if(document.getElementById("smenu"+a)){document.getElementById("smenu"+a).style.display="none"}if(document.getElementById("menu_sect_"+a)){document.getElementById("menu_sect_"+a).className="li"+a}}var e=document.getElementById(h);if(e){e.style.display="block";var b=new RegExp("smenu","g");var a=h.replace(b,"");if(document.getElementById("menu_sect_"+a)){document.getElementById("menu_sect_"+a).className="li"+a+"h"}var c=0;var g=0;var f=20;c=$("#menu_sect_"+a).position();c=c.left;g=$("#"+h).attr("offsetWidth");while(c+g>990){c-=5;f+=5}$("#"+h).css("margin-left",c+"px");$("#"+h+" .point").css("left",f)}}var QuicklyTour={tpl:"",handler_id:"div_quickly_tour_slide"};QuicklyTour.showTour=function(g,c){document.getElementById("div_trans").style.height="25000px";document.getElementById("div_trans").style.display="block";var b=600;var a=540;var e=(screen.width-b)/2;var d=(screen.height-a)/3+window.scrollY-30;if(isNaN(e)){e=0}if(isNaN(d)){var f=positionObj(c);d=f.y;if("Foot_"==c.id.substr(0,5)){d-=a-45}}document.getElementById(this.handler_id).style.width=b+"px";document.getElementById(this.handler_id).style.height=a+"px";document.getElementById(this.handler_id).style.left=e+"px";document.getElementById(this.handler_id).style.top=d+"px";document.getElementById(this.handler_id).style.display="block";this.showSlide(g,0);return false};QuicklyTour.showSlideOnData=function(a){if(a.status){document.getElementById(QuicklyTour.handler_id).innerHTML=a.html}else{QuicklyTour.hide()}};QuicklyTour.showSlide=function(b,a){HTTPReqSendUsr("quicklyTourSlide",[b,a],QuicklyTour.showSlideOnData)};QuicklyTour.hide=function(){document.getElementById(this.handler_id).style.display="none";document.getElementById("div_trans").style.display="none";return};function langSetHint(){$("img.tooltip_title").each(function(a){$(this).bt({fill:"#F7F7F7",strokeStyle:"#B7B7B7",spikeLength:10,spikeGirth:10,padding:8,cornerRadius:0,positions:["right","bottom"],cssStyles:{fontFamily:'"lucida grande",tahoma,verdana,arial,sans-serif',fontSize:"11px"}})})}var inp123;function handleEmptyVal(a){if(a){var b=a.parent();var c=b.children("span");if(!a.val()){b.addClass("input-placeholding")}a.focus(function(){if(!b.noplaceholding){b.removeClass("input-placeholding");b.noplaceholding=true}});a.blur(function(){if(a.val()==""){b.addClass("input-placeholding");b.noplaceholding=false}});a.change(function(){if(!b.noplaceholding){b.removeClass("input-placeholding");b.noplaceholding=true}});c.mousedown(function(){a.focus();return false})}return true};