var xmlHttp=null;var gh_db_obj_id_counter=0;var gh_db_loading=new Image();gh_db_loading.src="/ghdb/loading.gif";var gh_db_timers=new Array();function gh_db_show(a,f,b,r,d,q,c,p,m,g){if(!a){a=window.event}var n=document.getElementById(r);var e=document.getElementById(d);if(!g){g=2000}var o=gh_db_getAtrax(a,f,h,e,n);o.xmlHttp.open("GET",b,true);o.xmlHttp.send(null);return false;function h(u,s,t){var v=gh_db_parse_html(u,s,t,q,"html",c,p,m,g);t.innerHTML="";t.appendChild(v.reply);ghdb_htabs_init(t);return false}}function gh_la2_showtip_img2(f,e,c,d,a){var b=gh_db_createlayer(f.parentNode,e);b.innerHTML='<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><img src="http://forums.goha.ru/se/ramka/top-left.jpg" border="0" width="9px" height="35px" /></td><td onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="http://forums.goha.ru/se/ramka/top1.jpg" border="0" width="'+(d-23)+'px" height="35px" /></td><td><img src="http://forums.goha.ru/se/ramka/top2.jpg" alt="Close" border="0" width="23px" height="35px"  style="cursor: pointer;" onclick="return gh_db_close_seek(this,event);" /></td><td><img src="http://forums.goha.ru/se/ramka/top-right.jpg" border="0" width="9px" height="35px" /></td></tr><tr><td><img src="http://forums.goha.ru/se/ramka/left.jpg" border="0" width="9px" height="'+a+'px" /></td><td colspan="2"><img border="0" src="'+c+'" width="'+d+'px" height="'+a+'px" /></td><td><img src="http://forums.goha.ru/se/ramka/right.jpg" border="0" width="9px" height="'+a+'px" /></td></tr><tr><td><img src="http://forums.goha.ru/se/ramka/bottom-left.jpg" border="0" width="9px" height="18px" /></td><td colspan="2"><img src="http://forums.goha.ru/se/ramka/bottom.jpg" border="0" width="'+d+'px" height="18px" /></td><td><img src="http://forums.goha.ru/se/ramka/bottom-right.jpg" border="0" width="9px" height="18px" /></td></tr></tbody></table>';b.style.zIndex=100;gh_db_center_obj(b)}function gh_db_show_page(event,obj,url,result_holder,status_holder,skin,width,height,clickonly,hidetime){if(!event){event=window.event}var holder=document.getElementById(result_holder);var holder_status=document.getElementById(status_holder);if(!hidetime){hidetime=2000}var x=gh_db_getAtrax(event,obj,ghdb_GetData,holder_status,holder);x.xmlHttp.open("GET",url,true);x.xmlHttp.send(null);return false;function ghdb_GetData(event,handler,holder_result){var obj=gh_db_parse_html(event,handler,holder_result,skin,"html",width,height,clickonly,hidetime);document.title=obj.title;holder_result.innerHTML="";holder_result.appendChild(obj.reply);ghdb_htabs_init(holder_result);if(obj.sonload){eval(obj.sonload)}return false}}function gh_db_showtip(h,f,g,e,b,a,c,d){if(d==null){d=300}if(!h.id){h.id="ghdb_"+h.tagName+"_"+(++gh_db_obj_id_counter)}if(d==0){return gh_db_showtip_now(h,f,g,e,b,a,c,d)}h.onmouseout=function(m){if(gh_db_timers[h.id+"_tooltip_pre"]&&gh_db_timers[h.id+"_tooltip_pre"]!="disabled"){clearTimeout(gh_db_timers[h.id+"_tooltip_pre"])}return false};gh_db_timers[h.id+"_tooltip_pre"]=setTimeout(function(){return gh_db_showtip_now(h,f,g,e,b,a,c,d)},d);return false}function gh_db_showtip_now(f,a,q,b,p,h,g,d){if(!a){a=window.event}if(d==null){d=300}if(f.tagName!="A"){return false}var c=/^.+\.([^.]+)$/.exec(f.href);if(!a){a=window.event}if(c!=null){c=c[1]}else{c=""}if(!f.id){f.id="ghdb_"+f.tagName+"_"+(++gh_db_obj_id_counter)}if(!g){g=2000}if(a!=null){var o=a.x||a.layerX;var m=a.y||a.layerY}else{}if(gh_db_timers[f.id+"_tooltip"]&&gh_db_timers[f.id+"_tooltip"]!="disabled"){clearTimeout(gh_db_timers[f.id+"_tooltip"])}if(a.type=="mouseover"){if(h!=-1){f.onclick=function(t){var s=gh_db_ObjById(f.id+"_tooltip");if(!s){return gh_db_showtip(f,t,q,b,p,h,g,d)}if(gh_db_timers[s.id]&&gh_db_timers[s.id]=="disabled"){gh_db_timers[s.id]=setTimeout('gh_db_closetip("'+s.id+'")',100);gh_db_closetip(s.id);return false}gh_db_timers[s.id]="disabled";gh_db_showtip(f,t,q,b,p,h,g,d);return false}}if(h==1){return false}if(g>0){if(!gh_db_timers[f.id+"_tooltip"]||gh_db_timers[f.id+"_tooltip"]!="disabled"){f.onmouseout=function(s){gh_db_timers[f.id+"_tooltip"]=setTimeout('gh_db_closetip("'+f.id+'_tooltip")',g,d);return false}}}else{gh_db_timers[f.id+"_tooltip"]="disabled"}}if(a.type=="click"){f.onmouseout=null;gh_db_timers[f.id+"_tooltip"]="disabled"}var r=gh_db_ObjById(f.id+"_tooltip");if(r==null){r=gh_db_createlayer(f.parentNode,f.id+"_tooltip",o,m);if(g>0){r.onmouseover=function(s){if(gh_db_timers[r.id]&&gh_db_timers[r.id]=="disabled"){return false}clearTimeout(gh_db_timers[r.id]);return false};r.onmouseout=function(s){if(gh_db_timers[r.id]&&gh_db_timers[r.id]=="disabled"){return false}gh_db_timers[r.id]=setTimeout('gh_db_closetip("'+r.id+'")',g,d);return false}}r.innerHTML='<img src="'+gh_db_loading.src+'" border="0">Loading...';if(c=="jpg"||c=="gif"||c=="png"){var e=new Image();e.onload=function(s){document.body.style.cursor="auto";f.style.cursor="pointer";return gh_db_skin(s,e,f.title?f.title:e.src,r,q,c,b,p,h,g,d)};e.src=f.href;f.style.cursor="wait";document.body.style.cursor="wait";return false}else{var o=gh_db_getAtrax(a,f,gh_db_pfunc_html,r,r,c,q,b,p,h,g,d);var n=f.href;n=n.replace("/db/","/ghdb/");o.xmlHttp.open("GET",n,true);o.xmlHttp.send(null);return false}}else{r.style.display="block";gh_db_position_obj(r,0,0)}return false}function gh_db_showtip_now_force(g,a,b,r,c,q,m,h,e){if(!a){a=window.event}if(e==null){e=300}var d=/^.+\.([^.]+)$/.exec(b);if(!a){a=window.event}if(d!=null){d=d[1]}else{d=""}if(!g.id){g.id="ghdb_"+g.tagName+"_"+(++gh_db_obj_id_counter)}if(!h){h=-1}if(a!=null){var p=a.x||a.layerX;var n=a.y||a.layerY}var s=gh_db_ObjById(g.id+"_tooltip");if(s==null){s=gh_db_createlayer(g.parentNode,g.id+"_tooltip",p,n)}s.innerHTML='<img src="'+gh_db_loading.src+'" border="0">Loading...';if(d=="jpg"||d=="gif"||d=="png"){var f=new Image();f.onload=function(t){document.body.style.cursor="auto";g.style.cursor="pointer";return gh_db_skin(t,f,g.title?g.title:f.src,s,r,d,c,q,m,h,e)};f.src=b;g.style.cursor="wait";document.body.style.cursor="wait";return false}else{var p=gh_db_getAtrax(a,g,gh_db_pfunc_html,s,s,d,r,c,q,m,h,e);var o=b;o=o.replace("/db/","/ghdb/");p.xmlHttp.open("GET",o,true);p.xmlHttp.send(null);return false}return false}function gh_db_gettable(f,a,p,b,n,h,g,d){var o=gh_db_ObjById("outtable");var e=gh_db_ObjById("status");var c="xml";var m=gh_db_getAtrax(a,f,gh_db_pfunc_xml,e,o,c,p,b,n,h,g,d);m.xmlHttp.open("GET",f.href,true);m.xmlHttp.send(null);return false}function gh_db_createlayer(c,e,a,d){var b=document.createElement("div");b.id=e;b.style.zIndex=0;b.style.position="absolute";if(c.currentStyle){b.style.left="auto";b.style.top="auto"}else{b.style.top=d+"px";b.style.left=a+"px"}c.appendChild(b);if(c.offsetLeft==0||b.offsetLeft==c.offsetLeft){b.style.left=(a+5)+"px"}if(c.offsetTop==0||b.offsetTop==c.offsetTop){b.style.top=(d+5)+"px"}b.style.left=(b.offsetLeft+5)+"px";b.style.top=(b.offsetTop+5)+"px";return b}function gh_db_closetip(a){var b=gh_db_ObjById(a);if(b!=null&&b.style){b.style.display="none"}if(gh_db_timers[b.id]&&gh_db_timers[b.id]=="disabled"){gh_db_timers[b.id]="0"}return false}function gh_db_skin(b,g,o,r,q,e,c,p,n){var d=0;var h=1;if(!q){q=1}var a=c;var m=p;if(!c){if(g.width&&g.width>800){c=800}else{c=g.width}}else{h=g.width/c}if(!p){if(g.height&&g.height>600){p=800}else{p=g.height}}else{if(h==1){h=g.height/p}}if(g.height/h>p){h=g.height/p}if(g.width/h>c){h=g.width/c}if(c<g.width||p<g.height){p=Math.round(g.height/h);c=Math.round(g.width/h);d=1}var f="";if(g.style.display=="none"){g.parentNode.removeChild(g);return false}if(!c||!p){f='<table border="0"';if(c){f+=(' width="'+c+'px"')}if(p){f+=('height="'+p+'px"')}f+="><tr><td";if(c){f+=(' width="'+c+'px"')}if(p){f+=(' height="'+p+'px"')}f+=(">"+g.innerHTML+"</td></tr></table>");r.innerHTML=f;ghdb_htabs_init(r);if(r.offsetWidth!=undefined&&r.offsetWidth!=0){c=r.offsetWidth}else{if(a!=0){c=a}}if(r.offsetHeight!=undefined&&r.offsetHeight!=0){p=r.offsetHeight}else{if(m!=0){p=m}}}f="";r.innerHTML=f;if(e=="jpg"||e=="gif"||e=="png"){if(d==1){f+=('<a href="'+g.src+'" target="_blank">')}f+=('<img border="0" border="0" src="'+g.src+'" width="'+c+'px" height="'+p+'px"/>');if(d==1){f+=("</a>")}}else{f+=g.innerHTML}r.innerHTML=gh_db_skin_apply(q,c,p,o,f,r.id,n);r.style.zIndex=100;r.style.width=c+"px";ghdb_htabs_init(r);gh_db_position_obj(r,25,15);return false}function gh_db_skin_apply(f,e,a,g,b,d,c){switch(f){case 1:return'<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><img src="/ghdb/skins/'+f+'/top-left.jpg" border="0" width="9px" height="35px" /></td><td onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="/ghdb/skins/'+f+'/top1.jpg" border="0" width="'+(e-23)+'px" height="35px" /></td><td><img src="/ghdb/skins/'+f+'/top2.jpg" alt="Close" border="0" width="23px" height="35px"  style="cursor: pointer;" onclick="return gh_db_closetip(\''+d+'\');" /></td><td><img src="/ghdb/skins/'+f+'/top-right.jpg" border="0" width="9px" height="35px" /></td></tr><tr><td><img src="/ghdb/skins/'+f+'/left.jpg" border="0" width="9px" height="'+a+'px" /></td><td colspan="2" width="'+e+'px" height="'+a+'px" bgcolor="#cec8bc">'+b+'</td><td><img src="/ghdb/skins/'+f+'/right.jpg" border="0" width="9px" height="'+a+'px" /></td></tr><tr><td><img src="/ghdb/skins/'+f+'/bottom-left.jpg" border="0" width="9px" height="18px" /></td><td colspan="2"><img src="/ghdb/skins/'+f+'/bottom.jpg" border="0" width="'+e+'px" height="18px" /></td><td><img src="/ghdb/skins/'+f+'/bottom-right.jpg" border="0" width="9px" height="18px" /></td></tr></tbody></table>';case 2:return"<style>#"+d+" .tooltip a{text-decoration:none;} #"+d+" .tooltip a:hover{text-decoration:underline;} #"+d+" .tooltip table{border-spacing:0;border-collapse:collapse;} #"+d+" .tooltip td, #"+d+" .tooltip th{background:url(/ghdb/skins/"+f+"/tooltip.png);font-family:Verdana,sans-serif;font-size:12px;line-height:17px;color:white;} #"+d+" .tooltip th{padding:3px;vertical-align:top;} #"+d+" .tooltip td{padding:8px 4px 1px 9px;vertical-align:top;} #"+d+" .tooltip b{font-size:14px;line-height:19px;font-weight:normal;} #"+d+" .tooltip div.indent{padding-left:.6em;} #"+d+" .tooltip td th, #"+d+" .tooltip td td{background:none;} #"+d+" .tooltip td th{padding:0 0 0 4em;text-align:right;font-weight:normal;} #"+d+" .tooltip td td{padding:0;} #"+d+" .tooltip p{position:absolute;left:-44px;top:-1px;width:44px;height:44px;background:4px 4px no-repeat;margin:0;padding:0;} #"+d+" .tooltip p div{width:44px;height:44px;background-image:url(/ghdb/skins/"+f+"/icon_border_medium.png);} #"+d+" .tooltip table.shrink b{font-size:12px;line-height:15px;} #"+d+" .tooltip table.shrink td, #"+d+" .tooltip table.shrink th{font-size:10px;line-height:14px;} #"+d+" .socket-1{padding-left:26px;background:url(/ghdb/skins/"+f+"/socket_meta.gif) no-repeat left center;} #"+d+" .socket-2{padding-left:26px;background:url(/ghdb/skins/"+f+"/socket_red.gif) no-repeat left center;} #"+d+" .socket-4{padding-left:26px;background:url(/ghdb/skins/"+f+"/socket_yellow.gif) no-repeat left center;} #"+d+" .socket-8{padding-left:26px;background:url(/ghdb/skins/"+f+"/socket_blue.gif) no-repeat left center;} #"+d+" .socket-16{padding-left:26px;background:url(/ghdb/skins/"+f+"/socket_prismatic.gif) no-repeat left center;} #"+d+" a.moneyitem, #"+d+" a.moneysocketmeta, #"+d+" a.moneysocketred, #"+d+" a.moneysocketyellow, #"+d+" a.moneysocketblue{text-decoration:none!important;border-bottom:1px solid transparent;} #"+d+" a.moneyitem:hover, #"+d+" a.moneysocketmeta:hover, #"+d+" a.moneysocketred:hover, #"+d+" a.moneysocketyellow:hover, #"+d+" a.moneysocketblue:hover{border-bottom:1px solid white;} #"+d+" .moneyitem, #"+d+" .moneygold, #"+d+" .moneysilver, #"+d+" .moneycopper, #"+d+" .moneyalliance, #"+d+" .moneyhorde, #"+d+" .moneyarena, #"+d+" .moneyachievement, #"+d+" .moneysocketmeta, #"+d+" .moneysocketred, #"+d+" .moneysocketyellow, #"+d+" .moneysocketblue{color:white;background:no-repeat right center;} #"+d+" .moneyitem{padding-right:18px;} #"+d+" .moneygold{padding-right:15px;background-image:url(/ghdb/skins/"+f+"/money_gold.gif);} #"+d+" .moneysilver{padding-right:15px;background-image:url(/ghdb/skins/"+f+"/money_silver.gif);} #"+d+" .moneycopper{padding-right:15px;background-image:url(/ghdb/skins/"+f+"/money_copper.gif);} #"+d+" .moneyalliance{padding-right:12px;background-image:url(/ghdb/skins/"+f+"/money_alliance.gif);} #"+d+" .moneyhorde{padding-right:17px;background-image:url(/ghdb/skins/"+f+"/money_horde.gif);} #"+d+" .moneyarena{padding-right:18px;background-image:url(/ghdb/skins/"+f+"/money_arena.gif);} #"+d+" .moneyachievement{padding-right:13px;background-image:url(/ghdb/skins/"+f+"/money_achievement.gif);} #"+d+" .moneysocketmeta{padding-right:18px;background-image:url(/ghdb/skins/"+f+"/socket_meta.gif);} #"+d+" .moneysocketred{padding-right:18px;background-image:url(/ghdb/skins/"+f+"/socket_red.gif);} #"+d+" .moneysocketyellow{padding-right:18px;background-image:url(/ghdb/skins/"+f+"/socket_yellow.gif);} #"+d+" .moneysocketblue{padding-right:18px;background-image:url(/ghdb/skins/"+f+"/socket_blue.gif);} #"+d+" .q{color:#ffd100!important;} #"+d+" .q0, #"+d+" .q0 a{color:#9d9d9d!important;} #"+d+" .q1, #"+d+" .q1 a{color:#fff!important;} #"+d+" .q2, #"+d+" .q2 a{color:#1eff00!important;} #"+d+" .q3, #"+d+" .q3 a{color:#0070dd!important;} #"+d+" .q4, #"+d+" .q4 a{color:#a335ee!important;} #"+d+" .q5, #"+d+" .q5 a{color:#ff8000!important;} #"+d+" .q6, #"+d+" .q6 a{color:#e5cc80!important;} #"+d+" .q7, #"+d+" .q7 a{color:#e5cc80!important;} #"+d+" .q8, #"+d+" .q8 a{color:#ffff98!important;} #"+d+" .q9, #"+d+" .q9 a{color:#71d5ff!important;} #"+d+" .q10, #"+d+" .q10 a{color:#f00!important;} #"+d+" .tooltip { max-width: "+e+'; }</style><div class="tooltip" style="float: left; padding-top: 1px; width: '+e+"px; height: "+a+'px"><table><tr><td>'+b+'</td><th style="background-position: right top;"/></tr><tr><th style="background-position: left bottom;"/><th style="background-position: right bottom;"/></tr></table></div>';default:case 3:return'<table border="0" width="'+(e+2)+'px" cellpadding="6" cellspacing="1" class="tborder"><tbody><tr><td align="left" valign="middle" class="thead" onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="/ghdb/skins/'+f+'/closebtn.gif" alt="Close" border="0" style="cursor: pointer; float:right; padding: 6px 11px 6px 11px; border:0;" onclick="return gh_db_closetip(\''+d+"');\" />"+(c?'<img src="'+c+'" alt="" width="32px" height="32px" hspace="5" vspace="1" border="0" align="middle" style="border: 1px solid #e0dcd4;"/>':"&nbsp;&nbsp;")+g+'</td></tr><tr><td class="alt1" align="left">'+b+"</td></tr></tbody></table>";case 4:return'<table border="0" width="'+(e+2)+'px" cellpadding="0" cellspacing="0" style="font-family: Tahoma, Arial, sans-serif; font-size: 11px;" summary="'+g+'"><caption style="display:none">'+g+'</caption><tbody><tr><td align="left" valign="middle" background="/ghdb/skins/'+f+'/header.gif" style="color:#00588f; font-size:16px; padding: 2px 2px 2px 2px;" onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="/ghdb/skins/'+f+'/btnclose.gif" alt="Close" border="0" align="right" hspace="5" vspace="5" style="cursor: pointer;" onclick="return gh_db_closetip(\''+d+"');\" />"+(c?'<img src="'+c+'" alt="" width="32px" height="32px" hspace="10" vspace="10" border="0" align="middle" />':"&nbsp;&nbsp;")+g+'</td></tr><tr><td style="margin: 0px; padding: 5px;" align="left" background="/ghdb/skins/'+f+'/ddline.gif" style="list-style-image: url(/ghdb/skins/'+f+'/li.gif);">'+b+'</td></tr><tr style="height: 3px;"><td background="/ghdb/skins/'+f+'/ddfooter.gif"><img src="/ghdb/skins/'+f+'/ddfooter.gif" hspace="0" vspace="0" border="0" /></td></tr></tbody></table>';case 5:return'<table border="0" width="'+(e+2)+'px" cellpadding="0" cellspacing="0" style="font-family: Tahoma, Arial, sans-serif; font-size: 11px;" summary="'+g+'"><caption style="display:none">'+g+'</caption><tbody><tr><td align="left" valign="middle" style="color: #00588f; font-size:16px; padding: 2px 2px 2px 2px; background-color: #e0dcd4; border: 1px solid #a29f77; -moz-border-radius: 5px; -webkit-border-radius: 5px;" onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="/ghdb/skins/'+f+'/btnclose.gif" alt="Close" border="0" align="right" hspace="5" vspace="5" style="cursor: pointer;" onclick="return gh_db_closetip(\''+d+"');\" />"+(c?'<img src="'+c+'" alt="" width="32px" height="32px" hspace="10" vspace="10" border="0" align="middle" />':"&nbsp;&nbsp;")+g+'</td></tr><tr><td style="margin: 0px; padding: 5px; background-color: #e0dcd4; border: 1px solid #a29f77;-moz-border-radius: 5px; -webkit-border-radius: 5px; list-style-image: url(/ghdb/skins/'+f+'/li.gif);" align="left">'+b+"</td></tr></tbody></table>";case 6:return"<style>#"+d+' .thead { background-color: #7f94a3; color: #efebdf;} </style><table border="0" width="'+(e+2)+'px" cellpadding="0" cellspacing="0" style="font-family: Arial, Tahoma, sans-serif; font-size: 13px;color: #050505; border: 1px solid #6a7287; -moz-border-radius: 5px; -webkit-border-radius: 5px;"><tbody><tr style="background-color: #7f94a3;"><td align="left" valign="middle"  style="color: #efebdf; font-size: 16px; background-color: #7f94a3; margin: 5px;" onmouseover="gh_db_mover(this,this.parentNode.parentNode.parentNode.parentNode);"><img src="/ghdb/skins/'+f+'/closebtn.gif" alt="Close" border="0" style="cursor: pointer; float:right; padding: 16px 11px 16px 11px; border:0;" onclick="return gh_db_closetip(\''+d+"');\" />"+(c?'<img src="'+c+'" alt="" width="32px" height="32px" hspace="10" vspace="10" border="0" align="middle" style="border: 1px solid #e0dcd4;"/>':"&nbsp;&nbsp;")+g+'</td></tr><tr><td style="margin: 5px; padding: 5px; background-color: #efebe2; list-style-image: url(/ghdb/skins/'+f+'/li.gif);" align="left">'+b+"</td></tr></tbody></table>"}return"woot"}function gh_db_close_seek(b,a){var d=b.parentNode;var c=0;while(c<30){c=c+1;if(d.style&&(d.style.position=="absolute"||d.style.position=="relative")){d.style.display="none";break}if(d.parentNode==document){break}d=d.parentNode}}function gh_db_getAtrax(a,h,n,g,t,d,s,c,r,p,m,f){var b=new Object;if(typeof(q)!="function"){var q=function(e){return e}}b.ajax=1;b.processing=0;b.holder_status=g;b.holder_result=t;b.xmlHttp=null;try{b.xmlHttp=new XMLHttpRequest()}catch(o){try{b.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){b.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}if(b.xmlHttp==null){b.holder_status.innerHTML=q("Your browser does not support AJAX!");b.ajax=0}b.xmlHttp.onreadystatechange=function(){if(b.xmlHttp.readyState==1){b.processing=1;b.holder_status.innerHTML=q("Loading data...");document.body.style.cursor="wait"}else{if(b.xmlHttp.readyState==2){b.processing=1;b.holder_status.innerHTML=q("Loaded")}else{if(b.xmlHttp.readyState==3){b.processing=1;b.holder_status.innerHTML=q("Prepearing data to show")}else{if(b.xmlHttp.readyState==4){document.body.style.cursor="auto";if(b.xmlHttp.status==200){b.holder_status.innerHTML="Done";n(a,b.xmlHttp,t,s,d,c,r,p,m,f)}else{b.holder_result.innerHTML="";b.holder_status.innerHTML=q("Error: ")+q(b.xmlHttp.statusText)}b.processing=0}else{document.body.style.cursor="auto";b.holder_status.innerHTML=q("Error: ")+q(b.xmlHttp.statusText);b.holder_result.innerHTML=b.xmlHttp.responseText}}}}};return b}function gh_db_pfunc_xml(t,b,y,s,d,o,n,w,A,f){if(b.responseXML==null){y.innerHTML="oops...";return}var v=10;var c=b.responseXML;var q=c.getElementsByTagName("table").item(0);var g=y.insertRow(-1);for(var r=0;r<q.childNodes.length&&r<v;r++){var h=y.insertRow(-1);var p=q.childNodes.item(r);for(var u=0;u<p.childNodes.length;u++){var e=p.childNodes.item(u);if(e.tagName!=undefined){if(r==1){var m=g.insertCell(-1);m.innerHTML="<b>"+e.tagName+"</b>"}var a=h.insertCell(-1);if(e.childNodes.item(0)&&e.childNodes.item(0).data!=undefined){a.innerHTML=e.childNodes.item(0).data+"|"+r+"|"+u}}}}}function gh_db_mover(b,a){b.style.cursor="move";b.onmousedown=function(f){var c=gh_db_getMouse(f);a.style.zIndex=parseInt(a.style.zIndex)+1;var d=c.X-parseInt(a.style.left);var g=c.Y-parseInt(a.style.top);document.onmouseup=function(){document.onmousemove=null;document.onmouseup=null;a.style.zIndex=parseInt(a.style.zIndex)-1};document.onmousemove=function(h){var e=gh_db_getMouse(h);a.style.left=e.X-d+"px";a.style.top=e.Y-g+"px";return false};return false}}function gh_db_getMouse(b){var a=new Object;if(b==null){b=window.event}a.X=0;a.Y=0;if(document.all&&!window.opera){a.X=b.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);a.Y=b.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}else{a.X=b.pageX;a.Y=b.pageY}return a}function gh_db_ObjById(a){if(document.getElementById){return document.getElementById(a)}if(document.all){return document.all[a]}if(document.layers){return document.layers[a]}return null}function gh_db_center_obj(c){var b=0,a=0;if(typeof(window.innerWidth)=="number"){b=window.innerWidth;a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b=document.body.clientWidth;a=document.body.clientHeight}}}c.style.left=((b-c.offsetWidth)/2+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft))+"px";c.style.top=((a-c.offsetHeight)/2+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop))+"px"}function gh_db_position_obj(c,m,h){var a=0,b=0;var f=0,g=0;var e=getBodyScrollLeft();var d=getBodyScrollTop();if(typeof(window.innerWidth)=="number"){a=window.innerWidth;b=window.innerHeight;f=parseInt(c.style.left);g=parseInt(c.style.top)}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight;f=parseInt(c.style.left);g=parseInt(c.style.top)}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth;b=document.body.clientHeight;f=parseInt(c.style.left);g=parseInt(c.style.top)}}}if(a+e-(f+c.offsetWidth)<m){c.style.left=(f-c.offsetWidth+m)+"px"}else{c.style.left=(f+m)+"px"}if(b+d-(g+c.offsetHeight)>h){c.style.top=(g+h)+"px"}else{if((g-c.offsetHeight)<d){c.style.top=d+"px"}else{c.style.top=(g-c.offsetHeight-h)+"px"}}}function gh_db_collent_form_data(c){var b=c.elements;var d="";var a=0;var e=0;for(a=0;a<b.length;a++){switch(b[a].type){case"select-one":d=d+(d?"&":"")+encodeURI(b[a].name)+"="+b[a].options[b[a].selectedIndex].value;break;case"select-multiple":for(e=0;e<b[a].length;e++){if(b[a].options[e].selected){d=d+(d?"&":"")+encodeURI(b[a].name)+"="+encodeURI(b[a].options[e].value)}}break;case"textarea":case"hidden":case"password":case"text":d=d+(d?"&":"")+encodeURI(b[a].name)+"="+encodeURI(b[a].value);break;case"submit":case"button":break;case"checkbox":case"radio":if(b[a].checked==true){d=d+(d?"&":"")+encodeURI(b[a].name)+"=true"}break}}return d}function gh_db_strip_tags(a){return a.replace(/&lt;\/?[^&gt;]+&gt;/gi,"")}ghdb_getElByClass=function(h,g,b){var e=h.getElementsByTagName(g);var f=null;var d=new Array();for(var c=0,a=e.length;c<a;c++){if(e[c].className==b){d.push(e[c])}}return d};function ghdb_htabs_init(obj){var panels=ghdb_getElByClass(obj,"tbody","tabHolder");for(var i=0,j=panels.length;i<j;i++){if(panels[i].childNodes.length<3){continue}var tabs=new Array();for(var ti=0,tj=panels[i].childNodes.length;ti<tj;ti++){if(panels[i].childNodes[ti].tagName!="TR"){continue}tabs.push(panels[i].childNodes[ti])}for(var ti=0,tj=tabs.length;ti<tj;ti++){if(ti%2){if(ti!=1){tabs[ti].style.display="none"}else{tabs[ti].style.display="block"}}else{tabs[ti].style.cursor="pointer";eval("tabs[ti].onclick=function(e) { return ghdb_htabs_select(this,"+ti+"); };")}}}}function ghdb_htabs_select(e,a){var c=new Array();for(var d=0,b=e.parentNode.childNodes.length;d<b;d++){if(e.parentNode.childNodes[d].tagName!="TR"){continue}c.push(e.parentNode.childNodes[d])}for(var d=0,b=c.length;d<b;d++){if(d%2){if(d!=(a+1)){c[d].style.display="none"}else{c[d].style.display="block"}}}}function gh_db_pfunc_html(a,o,n,m,c,b,h,g,f,d){if(m==undefined){m=1}var e=gh_db_parse_html(a,o,n,m,c,b,h,g,f,d);gh_db_skin(a,e.reply,e.title,n,m,c,b,h,e.icon);return false}function getBodyScrollTop(){return self.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop)}function getBodyScrollLeft(){return self.pageXOffset||(document.documentElement&&document.documentElement.scrollLeft)||(document.body&&document.body.scrollLeft)}function gh_db_parse_html(a,p,o,n,c,b,h,g,f,d){var e=new Object();e.icon="";var m=p.responseText.toString();e.title=m.substring(m.indexOf("<title>")+7,m.indexOf("</title>"));if(m.indexOf('<link rel="SHORTCUT ICON" href="')>-1){e.icon=m.substring(m.indexOf('<link rel="SHORTCUT ICON" href="')+32,m.indexOf("<body"));e.icon=e.icon.substring(0,e.icon.indexOf('"'))}if(m.indexOf("<!-- body -->")>-1&&m.indexOf("<!-- /body -->")>-1){m=m.substring(m.indexOf("<!-- body -->"),m.indexOf("<!-- /body -->"))}else{if(m.indexOf("<body")>-1&&m.indexOf("</body")>-1){m=m.substring(m.indexOf("<body"),m.indexOf("</body"))}}if(m.indexOf("<body onload=")>-1){e.sonload=m.replace(/<body onload="/,"");e.sonload=e.sonload.substring(0,e.sonload.indexOf('">'))}m=m.replace(/<body[^>]*>/,"");m=m.replace(/<a href=\"\/ghdb\//g,'<a onmouseover="gh_db_showtip(this,event,'+n+","+b+","+h+","+g+","+f+');" href="/ghdb/');e.reply=document.createElement("div");e.reply.innerHTML=m;return e}Gettext=function(c){this.domain="messages";this.locale_data=undefined;var b=["domain","locale_data"];if(this.isValidObject(c)){for(var d in c){for(var a=0;a<b.length;a++){if(d==b[a]){if(this.isValidObject(c[d])){this[d]=c[d]}}}}}this.try_load_lang();return this};Gettext.context_glue="\004";Gettext._locale_data={};Gettext.prototype.try_load_lang=function(){if(typeof(this.locale_data)!="undefined"){var d=this.locale_data;this.locale_data=undefined;this.parse_locale_data(d);if(typeof(Gettext._locale_data[this.domain])=="undefined"){throw new Error("Error: Gettext 'locale_data' does not contain the domain '"+this.domain+"'")}}var b=this.get_lang_refs();if(typeof(b)=="object"&&b.length>0){for(var a=0;a<b.length;a++){var c=b[a];if(c.type=="application/json"){if(!this.try_load_lang_json(c.href)){throw new Error("Error: Gettext 'try_load_lang_json' failed. Unable to exec xmlhttprequest for link ["+c.href+"]")}}else{if(c.type=="application/x-po"){if(!this.try_load_lang_po(c.href)){throw new Error("Error: Gettext 'try_load_lang_po' failed. Unable to exec xmlhttprequest for link ["+c.href+"]")}}else{throw new Error("TODO: link type ["+c.type+"] found, and support is planned, but not implemented at this time.")}}}}};Gettext.prototype.parse_locale_data=function(f){if(typeof(Gettext._locale_data)=="undefined"){Gettext._locale_data={}}for(var e in f){if((!f.hasOwnProperty(e))||(!this.isValidObject(f[e]))){continue}var b=false;for(var a in f[e]){b=true;break}if(!b){continue}var g=f[e];if(e==""){e="messages"}if(!this.isValidObject(Gettext._locale_data[e])){Gettext._locale_data[e]={}}if(!this.isValidObject(Gettext._locale_data[e].head)){Gettext._locale_data[e].head={}}if(!this.isValidObject(Gettext._locale_data[e].msgs)){Gettext._locale_data[e].msgs={}}for(var r in g){if(r==""){var n=g[r];for(var q in n){var m=q.toLowerCase();Gettext._locale_data[e].head[m]=n[q]}}else{Gettext._locale_data[e].msgs[r]=g[r]}}}for(var e in Gettext._locale_data){if(this.isValidObject(Gettext._locale_data[e].head["plural-forms"])&&typeof(Gettext._locale_data[e].head.plural_func)=="undefined"){var p=Gettext._locale_data[e].head["plural-forms"];var d=new RegExp("^(\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;a-zA-Z0-9_()])+)","m");if(d.test(p)){var o=Gettext._locale_data[e].head["plural-forms"];if(!/;\s*$/.test(o)){o=o.concat(";")}var c="var plural; var nplurals; "+o+' return { "nplural" : nplurals, "plural" : (plural === true ? 1 : plural ? plural : 0) };';Gettext._locale_data[e].head.plural_func=new Function("n",c)}else{throw new Error("Syntax error in language file. Plural-Forms header is invalid ["+p+"]")}}else{if(typeof(Gettext._locale_data[e].head.plural_func)=="undefined"){Gettext._locale_data[e].head.plural_func=function(s){var h=(s!=1)?1:0;return{nplural:2,plural:h}}}}}return};Gettext.prototype.try_load_lang_po=function(b){var d=this.sjax(b);if(!d){return}var c=this.uri_basename(b);var a=this.parse_po(d);var e={};if(a){if(!a[""]){a[""]={}}if(!a[""]["domain"]){a[""]["domain"]=c}c=a[""]["domain"];e[c]=a;this.parse_locale_data(e)}return 1};Gettext.prototype.uri_basename=function(b){var c;if(c=b.match(/^(.*\/)?(.*)/)){var a;if(a=c[2].match(/^(.*)\..+$/)){return a[1]}else{return c[2]}}else{return""}};Gettext.prototype.parse_po=function(t){var e={};var o={};var m="";var g=[];var a=t.split("\n");for(var q=0;q<a.length;q++){a[q]=a[q].replace(/(\n|\r)+$/,"");var f;if(/^$/.test(a[q])){if(typeof(o.msgid)!="undefined"){var s=(typeof(o.msgctxt)!="undefined"&&o.msgctxt.length)?o.msgctxt+Gettext.context_glue+o.msgid:o.msgid;var p=(typeof(o.msgid_plural)!="undefined"&&o.msgid_plural.length)?o.msgid_plural:null;var c=[];for(var n in o){var f;if(f=n.match(/^msgstr_(\d+)/)){c[parseInt(f[1])]=o[n]}}c.unshift(p);if(c.length>1){e[s]=c}o={};m=""}}else{if(/^#/.test(a[q])){continue}else{if(f=a[q].match(/^msgctxt\s+(.*)/)){m="msgctxt";o[m]=this.parse_po_dequote(f[1])}else{if(f=a[q].match(/^msgid\s+(.*)/)){m="msgid";o[m]=this.parse_po_dequote(f[1])}else{if(f=a[q].match(/^msgid_plural\s+(.*)/)){m="msgid_plural";o[m]=this.parse_po_dequote(f[1])}else{if(f=a[q].match(/^msgstr\s+(.*)/)){m="msgstr_0";o[m]=this.parse_po_dequote(f[1])}else{if(f=a[q].match(/^msgstr\[0\]\s+(.*)/)){m="msgstr_0";o[m]=this.parse_po_dequote(f[1])}else{if(f=a[q].match(/^msgstr\[(\d+)\]\s+(.*)/)){m="msgstr_"+f[1];o[m]=this.parse_po_dequote(f[2])}else{if(/^"/.test(a[q])){o[m]+=this.parse_po_dequote(a[q])}else{g.push("Strange line ["+q+"] : "+a[q])}}}}}}}}}}if(typeof(o.msgid)!="undefined"){var s=(typeof(o.msgctxt)!="undefined"&&o.msgctxt.length)?o.msgctxt+Gettext.context_glue+o.msgid:o.msgid;var p=(typeof(o.msgid_plural)!="undefined"&&o.msgid_plural.length)?o.msgid_plural:null;var c=[];for(var n in o){var f;if(f=n.match(/^msgstr_(\d+)/)){c[parseInt(f[1])]=o[n]}}c.unshift(p);if(c.length>1){e[s]=c}o={};m=""}if(e[""]&&e[""][1]){var b={};var r=e[""][1].split(/\\n/);for(var q=0;q<r.length;q++){if(!r.length){continue}var d=r[q].indexOf(":",0);if(d!=-1){var u=r[q].substring(0,d);var v=r[q].substring(d+1);var h=u.toLowerCase();if(b[h]&&b[h].length){g.push("SKIPPING DUPLICATE HEADER LINE: "+r[q])}else{if(/#-#-#-#-#/.test(h)){g.push("SKIPPING ERROR MARKER IN HEADER: "+r[q])}else{v=v.replace(/^\s+/,"");b[h]=v}}}else{g.push("PROBLEM LINE IN HEADER: "+r[q]);b[r[q]]=""}}e[""]=b}else{e[""]={}}return e};Gettext.prototype.parse_po_dequote=function(b){var a;if(a=b.match(/^"(.*)"/)){b=a[1]}b=b.replace(/\\"/,"");return b};Gettext.prototype.try_load_lang_json=function(a){var b=this.sjax(a);if(!b){return}var c=this.JSON(b);this.parse_locale_data(c);return 1};Gettext.prototype.get_lang_refs=function(){var c=new Array();var a=document.getElementsByTagName("link");for(var b=0;b<a.length;b++){if(a[b].rel=="gettext"&&a[b].href){if(typeof(a[b].type)=="undefined"||a[b].type==""){if(/\.json$/i.test(a[b].href)){a[b].type="application/json"}else{if(/\.js$/i.test(a[b].href)){a[b].type="application/json"}else{if(/\.po$/i.test(a[b].href)){a[b].type="application/x-po"}else{if(/\.mo$/i.test(a[b].href)){a[b].type="application/x-mo"}else{throw new Error("LINK tag with rel=gettext found, but the type and extension are unrecognized.")}}}}}a[b].type=a[b].type.toLowerCase();if(a[b].type=="application/json"){a[b].type="application/json"}else{if(a[b].type=="text/javascript"){a[b].type="application/json"}else{if(a[b].type=="application/x-po"){a[b].type="application/x-po"}else{if(a[b].type=="application/x-mo"){a[b].type="application/x-mo"}else{throw new Error("LINK tag with rel=gettext found, but the type attribute ["+a[b].type+"] is unrecognized.")}}}}c.push(a[b])}}return c};Gettext.prototype.textdomain=function(a){if(a&&a.length){this.domain=a}return this.domain};Gettext.prototype.gettext=function(c){var e;var a;var d;var b;return this.dcnpgettext(null,e,c,a,d,b)};Gettext.prototype.dgettext=function(d,c){var f;var a;var e;var b;return this.dcnpgettext(d,f,c,a,e,b)};Gettext.prototype.dcgettext=function(d,c,b){var f;var a;var e;return this.dcnpgettext(d,f,c,a,e,b)};Gettext.prototype.ngettext=function(c,a,e){var d;var b;return this.dcnpgettext(null,d,c,a,e,b)};Gettext.prototype.dngettext=function(d,c,a,f){var e;var b;return this.dcnpgettext(d,e,c,a,f,b)};Gettext.prototype.dcngettext=function(d,c,a,f,b){var e;return this.dcnpgettext(d,e,c,a,f,b,b)};Gettext.prototype.pgettext=function(e,c){var a;var d;var b;return this.dcnpgettext(null,e,c,a,d,b)};Gettext.prototype.dpgettext=function(d,f,c){var a;var e;var b;return this.dcnpgettext(d,f,c,a,e,b)};Gettext.prototype.dcpgettext=function(d,f,c,b){var a;var e;return this.dcnpgettext(d,f,c,a,e,b)};Gettext.prototype.npgettext=function(e,c,a,d){var b;return this.dcnpgettext(null,e,c,a,d,b)};Gettext.prototype.dnpgettext=function(d,f,c,a,e){var b;return this.dcnpgettext(d,f,c,a,e,b)};Gettext.prototype.dcnpgettext=function(C,e,B,u,o,r){if(!this.isValidObject(B)){return""}var g=this.isValidObject(u);var w=this.isValidObject(e)?e+Gettext.context_glue+B:B;var a=this.isValidObject(C)?C:this.isValidObject(this.domain)?this.domain:"messages";var A="LC_MESSAGES";var r=5;var q=new Array();if(typeof(Gettext._locale_data)!="undefined"&&this.isValidObject(Gettext._locale_data[a])){q.push(Gettext._locale_data[a])}else{if(typeof(Gettext._locale_data)!="undefined"){for(var y in Gettext._locale_data){q.push(Gettext._locale_data[y])}}}var b=[];var f=false;var m;if(q.length){for(var v=0;v<q.length;v++){var t=q[v];if(this.isValidObject(t.msgs[w])){for(var s=0;s<t.msgs[w].length;s++){b[s]=t.msgs[w][s]}b.shift();m=t;f=true;if(b.length>0&&b[0].length!=0){break}}}}if(b.length==0||b[0].length==0){b=[B,u]}var d=b[0];if(g){var h;if(f&&this.isValidObject(m.head.plural_func)){var c=m.head.plural_func(o);if(!c.plural){c.plural=0}if(!c.nplural){c.nplural=0}if(c.nplural<=c.plural){c.plural=0}h=c.plural}else{h=(o!=1)?1:0}if(this.isValidObject(b[h])){d=b[h]}}return d};Gettext.strargs=function(g,c){if(null==c||"undefined"==typeof(c)){c=[]}else{if(c.constructor!=Array){c=[c]}}var f="";while(true){var d=g.indexOf("%");var a;if(d==-1){f+=g;break}f+=g.substr(0,d);if(g.substr(d,2)=="%%"){f+="%";g=g.substr((d+2))}else{if(a=g.substr(d).match(/^%(\d+)/)){var e=parseInt(a[1]);var b=a[1].length;if(e>0&&c[e-1]!=null&&typeof(c[e-1])!="undefined"){f+=c[e-1]}g=g.substr((d+1+b))}else{f+="%";g=g.substr((d+1))}}}return f};Gettext.prototype.strargs=function(b,a){return Gettext.strargs(b,a)};Gettext.prototype.isArray=function(a){return this.isValidObject(a)&&a.constructor==Array};Gettext.prototype.isValidObject=function(a){if(null==a){return false}else{if("undefined"==typeof(a)){return false}else{return true}}};Gettext.prototype.sjax=function(d){var c;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1){c=new ActiveXObject("Microsoft.XMLHTTP")}else{c=new ActiveXObject("Msxml2.XMLHTTP")}}if(!c){throw new Error("Your browser doesn't do Ajax. Unable to support external language files.")}c.open("GET",d,false);try{c.send(null)}catch(f){return}var a=c.status;if(a==200||a==0){return c.responseText}else{var b=c.statusText+" (Error "+c.status+")";if(c.responseText.length){b+="\n"+c.responseText}alert(b);return}};Gettext.prototype.JSON=function(data){return eval("("+data+")")};function init_filter(action,filter_holder,table_holder,status_holder){if(!filter_holder){filter_holder=document.getElementById("ghdb_filter_div")}if(!status_holder){status_holder=document.getElementById("ghdb_table_div_status")}if(!table_holder){table_holder=document.getElementById("ghdb_table_div")}var x=gh_db_getAtrax(null,null,ghdb_GetData,status_holder,filter_holder);x.xmlHttp.open("GET",action+"/filter.js",true);x.xmlHttp.send(null);function ghdb_GetData(event,handler,filter_holder){var idata=eval(handler.responseText.toString());while(filter_holder.childNodes.length>0){filter_holder.removeChild(filter_holder.lastChild)}gh_filter=new ghdb_filter(filter_holder,idata,action,"post",table_holder,status_holder)}return false}var ghdb_filter=function(b,f,d,e,c,a){if(typeof(_)!="function"){this._=function(g){return g}}else{this._=_}this.idata=f;this.limits=new Array();this.filters=new Array();this.customs=new Array();this.filter_holder=b;this.action=d;this.method=e;this.table_holder=c;this.status_holder=a;this.table=new ghdb_table_init(this.action,null,this.method,this.table_holder,this.status_holder);this.objectum=new Array();f_h=this.filter_holder;this.inner_fh=document.createElement("table");f_h.appendChild(this.inner_fh);this.custom_parag=document.createElement("div");elem_n=document.createTextNode(this._("Additional filters: "));this.custom_parag.appendChild(elem_n);this.custom_select=document.createElement("select");this.custom_select.size=1;this.custom_parag.appendChild(this.custom_select);elem_b=document.createElement("button");elem_b.onclick=function(){gh_filter.custom_show()};butttext=document.createTextNode(this._("add"));elem_b.appendChild(butttext);this.custom_parag.appendChild(elem_b);f_h.appendChild(this.custom_parag);but_h=document.createElement("div");f_h.appendChild(but_h);elem=document.createElement("button");elem.onclick=function(){gh_filter.submit()};butttext=document.createTextNode(this._("Use filter"));elem.appendChild(butttext);but_h.appendChild(elem);elem=document.createElement("button");elem.onclick=function(){gh_filter.reset()};butttext=document.createTextNode(this._("Reset filter"));elem.appendChild(butttext);but_h.appendChild(elem);this.add(f)};ghdb_filter.prototype.add=function(b,a){a=a||false;if("custom" in b){this.add_custom(b.custom)}else{if("id" in b){if((typeof(b.id)!=="undefined")&&(typeof(b.type)!=="undefined")&&(typeof(b.label)!=="undefined")){x=this.filters.length;this.filters[x]=b;this.f_show(this.filters[x],x,a)}}else{for(i in b){if("custom" in b[i]){this.add_custom(b[i].custom)}else{if((typeof(b[i].id)!=="undefined")&&(typeof(b[i].type)!=="undefined")&&(typeof(b[i].label)!=="undefined")){x=this.filters.length;this.filters[x]=b[i];this.f_show(this.filters[x],x,a)}}}}}if(this.custom_select.options.length==0){this.custom_parag.style.visibility="hidden"}};ghdb_filter.prototype.add_custom=function(a){if("id" in a){if((typeof(a.id)!=="undefined")&&(typeof(a.type)!=="undefined")&&(typeof(a.label)!=="undefined")){z=this.customs.length;if(typeof(a.limit)=="undefined"){if(a.type=="select"){a.limit=a.data.length}else{a.limit=1}}this.limits[z]=a.limit;this.customs[z]=a;arr_opt=this.custom_select.options;arr_opt[arr_opt.length]=new Option(this.customs[z].label,z)}}else{for(i in a){if((typeof(a[i].id)!=="undefined")&&(typeof(a[i].type)!=="undefined")&&(typeof(a[i].label)!=="undefined")){z=this.customs.length;if(typeof(a[i].limit)=="undefined"){if(a[i].type=="select"){a[i].limit=this.as_len(a[i].data)-2}else{a[i].limit=1}}this.limits[z]=a[i].limit;this.customs[z]=a[i];arr_opt=this.custom_select.options;arr_opt[arr_opt.length]=new Option(this.customs[z].label,z)}}}if(this.custom_select.options.length==0){this.custom_parag.style.visibility="hidden"}};ghdb_filter.prototype.f_show=function(b,a,c){c=c||false;newTR=document.createElement("tr");this.inner_fh.appendChild(newTR);newPtext=document.createElement("td");newTR.appendChild(newPtext);newP=document.createElement("td");newTR.appendChild(newP);switch(b.type){case"input":newF=document.createElement("input");newF.type="text";newF.name=b.id;if(typeof(b.size)!=="undefined"){newF.size=b.size}this.objectum[a]=newF;if(typeof(b.data)!=="undefined"){newF.value=b.data}newL=document.createTextNode(b.label+": ");newPtext.appendChild(newL);newP.appendChild(newF);break;case"select":newF=document.createElement("select");newF.size=1;newF.name=b.id;this.objectum[a]=newF;newL=document.createTextNode(b.label+": ");newPtext.appendChild(newL);newP.appendChild(newF);arr_opt=newF.options;for(i in b.data){arr_opt[arr_opt.length]=new Option(b.data[i],i);if((typeof(b.def)!=="undefined")&&(b.def==i)){arr_opt[arr_opt.length-1].selected=true}}break;case"combo":newF=document.createElement("select");newF.multiple=true;newF.name=b.id;if(typeof(b.size)!=="undefined"){newF.size=b.size}this.objectum[a]=newF;newL=document.createTextNode(b.label+": ");newPtext.appendChild(newL);newP.appendChild(newF);arr_opt=newF.options;for(i in b.data){arr_opt[arr_opt.length]=new Option(b.data[i],i);if(typeof(b.def)!=="undefined"){for(l in b.def){if(b.def[l]==i){arr_opt[arr_opt.length-1].selected=true}}}}break;case"yesno":newF=document.createElement("select");newF.size=1;newF.name=b.id;this.objectum[a]=newF;newL=document.createTextNode(b.label+": ");newPtext.appendChild(newL);newP.appendChild(newF);arr_opt=newF.options;arr_opt[arr_opt.length]=new Option(this._("yes"),1);arr_opt[arr_opt.length]=new Option(this._("no"),0);break;case"cmp":this.objectum[a]=new Array();newF1=document.createElement("input");newF1.type="text";newF1.name=b.id+"_1";newF1.onchange=function(){this.style.border="2px inset gray"};if(typeof(b.size)!=="undefined"){newF1.size=b.size}this.objectum[a][0]=newF1;if((typeof(b.data)!=="undefined")&&(typeof(b.data[0])!=="undefined")){newF1.value=b.data[0]}newF2=document.createElement("input");newF2.type="text";newF2.name=b.id+"_2";newF2.onchange=function(){this.style.border="2px inset gray"};if(typeof(b.size)!=="undefined"){newF2.size=b.size}this.objectum[a][1]=newF2;if((typeof(b.data)!=="undefined")&&(typeof(b.data[1])!=="undefined")){newF2.value=b.data[1]}newL=document.createTextNode(b.label+": ");newL1=document.createTextNode(this._("from")+" ");newL2=document.createTextNode(" "+this._("to")+" ");newPtext.appendChild(newL);newP.appendChild(newL1);newP.appendChild(newF1);newP.appendChild(newL2);newP.appendChild(newF2);break;case"numeric":newF=document.createElement("input");newF.type="text";newF.name=b.id;newF.onchange=function(){this.style.border="2px inset gray"};if(typeof(b.size)!=="undefined"){newF.size=b.size}this.objectum[a]=newF;if(typeof(b.data)!=="undefined"){newF.value=b.data}newL=document.createTextNode(b.label+": ");newPtext.appendChild(newL);newP.appendChild(newF);break}if(typeof(b.hint)!=="undefined"){newP.title=b.hint}else{newP.title=b.label}if(c){newD=document.createElement("a");newD.href="javascript:void(0)";newD.onclick=function(){gh_filter.inner_fh.removeChild(this.parentNode.parentNode);for(j in gh_filter.objectum){if(gh_filter.filters[j].type=="cmp"){sh_found_pnode=gh_filter.objectum[j][1].parentNode}else{sh_found_pnode=gh_filter.objectum[j].parentNode}if(sh_found_pnode==this.parentNode){for(k in gh_filter.customs){if(gh_filter.customs[k].id==gh_filter.filters[j].id){gh_filter.customs[k].limit+=1;if(gh_filter.customs[k].limit==1){arr_opt=gh_filter.custom_select.options;arr_opt[arr_opt.length]=new Option(gh_filter.customs[k].label,k);gh_filter.custom_parag.style.visibility="visible"}}}gh_filter.filters.splice(j,1);gh_filter.objectum.splice(j,1)}}};newP.appendChild(newD);d_node=document.createTextNode(this._("delete"));newD.appendChild(d_node)}};ghdb_filter.prototype.custom_show=function(){sh_sel_val=this.custom_select.options[this.custom_select.selectedIndex].value;sh_sel_ind=this.custom_select.selectedIndex;if(this.customs[sh_sel_val].limit>0){this.customs[sh_sel_val].limit-=1;this.add(this.customs[sh_sel_val],true)}if(this.customs[sh_sel_val].limit==0){this.custom_select.remove(sh_sel_ind)}if(this.custom_select.options.length==0){this.custom_parag.style.visibility="hidden"}};ghdb_filter.prototype.submit=function(){param_line="";do_flag=1;for(i in this.filters){if(i!=0){param_line+="&"}switch(this.filters[i].type){case"input":param_line+=this.filters[i].id+"[]=";param_line+=this.objectum[i].value;break;case"select":param_line+=this.filters[i].id+"[]=";param_line+=this.objectum[i].value;break;case"combo":arr_options=this.objectum[i].options;flag=1;for(j=0;j<=arr_options.length-1;j++){if(arr_options[j].selected){if(flag==1){flag=0}else{param_line+="&"}param_line+=this.filters[i].id+"[]=";param_line+=arr_options[j].value}}break;case"yesno":param_line+=this.filters[i].id+"[]=";param_line+=this.objectum[i].value;break;case"cmp":if(/[^\d\$]/.test(this.objectum[i][0].value)){do_flag=0;this.objectum[i][0].style.border="2px solid red";alert(this._("This field must contain a number"))}if(/[^\d\$]/.test(this.objectum[i][1].value)){do_flag=0;this.objectum[i][1].style.border="2px solid red";alert(this._("This field must contain a number"))}param_line+=this.filters[i].id+"[]="+this.objectum[i][0].value+"|"+this.objectum[i][1].value;break;case"numeric":if(/[^\d\$]/.test(this.objectum[i].value)){do_flag=0;this.objectum[i].style.border="2px solid red";alert("This field must contain a number")}param_line+=this.filters[i].id+"[]=";param_line+=this.objectum[i].value;break}}if(do_flag){this.table=new ghdb_table_init(this.action,param_line,this.method,this.table_holder,this.status_holder)}};ghdb_filter.prototype.reset=function(){for(i in this.customs){this.customs[i].limit=this.limits[i]}while(this.filter_holder.childNodes.length>0){this.filter_holder.removeChild(this.filter_holder.lastChild)}this.filters=new Array();this.customs=new Array();this.objectum=new Array();f_h=this.filter_holder;this.inner_fh=document.createElement("table");f_h.appendChild(this.inner_fh);this.custom_parag=document.createElement("div");elem_n=document.createTextNode(this._("Additional filters: "));this.custom_parag.appendChild(elem_n);this.custom_select=document.createElement("select");this.custom_select.size=1;this.custom_parag.appendChild(this.custom_select);elem_b=document.createElement("button");elem_b.onclick=function(){gh_filter.custom_show()};butttext=document.createTextNode(this._("add"));elem_b.appendChild(butttext);this.custom_parag.appendChild(elem_b);f_h.appendChild(this.custom_parag);elem=document.createElement("button");elem.onclick=function(){gh_filter.submit()};butttext=document.createTextNode(this._("Use filter"));elem.appendChild(butttext);f_h.appendChild(elem);elem=document.createElement("button");elem.onclick=function(){gh_filter.reset()};butttext=document.createTextNode(this._("Reset filter"));elem.appendChild(butttext);f_h.appendChild(elem);this.add(this.idata)};ghdb_filter.prototype.as_len=function(a){len=0;for(j in a){len+=1}return len};var shtable=null;function ghdb_table_init(url,fdata,method,holder,holder_status){var data=null;var x=gh_db_getAtrax(null,null,ghdb_GetData,holder_status,holder);if(method=="GET"){x.xmlHttp.open("GET",url+"/index.js?"+fdata,true);x.xmlHttp.send(null)}else{x.xmlHttp.open("POST",url+"/index.js",true);x.xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.xmlHttp.send(fdata)}function ghdb_GetData(event,handler,holder){var idata=eval(handler.responseText.toString());shtable=new ghdb_Table(holder,idata,url)}return false}var ghdb_Table=function(b,c,a){this.cursor=0;this.url=a;this.fields=new Array();this.holder=b;this.holder.innerHTML="";this.table=document.createElement("table");this.table.border=1;this.table.width="100%";this.data=c;this.cols_order=new Array();this.col_names=new Array();this.pageRows=30;this.pageCols=0;this.currow=null;this.holder.appendChild(this.table);this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.parseHeader();this.makeHeader();this.printRows()};ghdb_Table.prototype.showNext=function(c,a){for(var b=this.tbody.childNodes.length;b>1;b--){this.tbody.removeChild(this.tbody.lastChild)}if(a!=0){this.cursor+=a*this.pageRows}this.printRows();return false};ghdb_Table.prototype.buildNav=function(){var b=this;var f=document.createElement("tr");var d=document.createElement("td");d.colSpan=this.pageCols;var e=document.createElement("div");e.style.styleFloat="left";e.style.cssFloat="left";e.style.width="33%";e.style.textAlign="left";d.appendChild(e);if(this.cursor>1){e.style.cursor="pointer";e.innerHTML=" &lt; Prev ";e.onclick=function(g){return b.showNext(g,-1)}}else{e.innerHTML="&nbsp;"}var a=document.createElement("div");a.innerHTML=" &nbsp; ( Page "+String(Math.ceil((this.cursor+1)/this.pageRows))+" of "+String(Math.ceil((this.data.length)/this.pageRows))+" ) &nbsp; ";a.style.width="33%";a.style.styleFloat="left";a.style.cssFloat="left";a.style.textAlign="center";d.appendChild(a);var c=document.createElement("div");c.style.styleFloat="left";c.style.cssFloat="left";c.style.width="33%";c.style.textAlign="right";d.appendChild(c);if(this.data.length>this.pageRows+this.cursor){c.innerHTML=" Next &gt; ";c.onclick=function(g){return b.showNext(g,1)};c.style.cursor="pointer"}else{c.innerHTML="&nbsp;"}f.appendChild(d);return f};ghdb_Table.prototype.parseHeader=function(){var b=this;for(var d=0,a=this.data[0].length;a>d;d++){if(this.data[0][d].fname!=undefined){var c=this.data[0][d].fname;this.fields[d]=this.data[0][d];this.col_names[d]=this.data[0][d].label!=undefined?this.data[0][d].label:c}else{this.fields[d]=new Object();this.fields[d].fname=this.data[0][d];this.col_names[d]=this.data[0][d]}}};ghdb_Table.prototype.makeHeader=function(){var self=this;this.header=document.createElement("tr");this.pageCols=0;for(var i=0,l=this.data[0].length;l>i;i++){if(this.fields[i].format!=undefined&&this.fields[i].format==0){continue}var col=document.createElement("th");col.innerHTML=this.col_names[i];this.cols_order[i]=0;if((this.fields[i].sort==undefined||this.fields[i].sort!=0)&&this.data.length>2){col.style.cursor="n-resize";eval('col.onclick = function(e) { return self.doSort(e,"'+i+'"); };')}this.header.appendChild(col);this.pageCols++}this.tbody.appendChild(this.header);this.data.splice(0,1)};ghdb_Table.prototype.doSort=function(e,ikey){var self=this;if(this.fields[ikey].sort!=undefined){eval("var sfunc=self.sort"+this.fields[ikey].sort)}else{var sfunc=self.sortString}if(!e){var e=window.event}if(e.target){var targ=e.target}else{if(e.srcElement){var targ=e.srcElement}}var key=this.col_names[ikey];if(this.cols_order[ikey]==-1){this.data.sort(function(a,b){return sfunc(a[ikey],b[ikey],1)});this.cols_order[ikey]=1;targ.innerHTML=key+"&nbsp;v";targ.style.cursor="n-resize"}else{this.data.sort(function(a,b){return sfunc(a[ikey],b[ikey],-1)});this.cols_order[ikey]=-1;targ.innerHTML=key+"&nbsp;^";targ.style.cursor="s-resize"}this.showNext(e,0);return false};ghdb_Table.prototype.sortString=function(e,d,c){if(e==d){return 0}if(e>d){return -1*c}return c};ghdb_Table.prototype.sortHString=function(e,d,c){var g=e.replace(/(<([^>]+)>)/ig,"");var f=d.replace(/(<([^>]+)>)/ig,"");if(g==f){return 0}if(g>f){return -1*c}return c};ghdb_Table.prototype.sortInt=function(e,d,c){if(parseInt(e,10)==parseInt(d,10)){return 0}if(parseInt(e,10)>parseInt(d,10)){return -1*c}return c};ghdb_Table.prototype.sortFloat=function(e,d,c){if(parseFloat(e)==parseFloat(d)){return 0}if(parseFloat(e)>parseFloat(d)){return -1*c}return c};ghdb_Table.prototype.printRows=function(){if(this.pageRows<this.data.length){this.tbody.appendChild(this.buildNav())}for(var d=this.cursor;this.data.length>d&&this.pageRows+this.cursor>d;d++){var e=document.createElement("tr");for(var c=0,a=this.data[d].length;a>c;c++){if(this.fields[c].format!=undefined&&this.fields[c].format==0){continue}var b=document.createElement("td");b.innerHTML=this.formatCell(c,this.data[d][c],d);e.appendChild(b)}this.tbody.appendChild(e)}if(this.pageRows<this.data.length){this.tbody.appendChild(this.buildNav())}};ghdb_Table.prototype.formatCell=function(key,val,row){var self=this;if(this.fields[key].format!=undefined){eval("var pfunc=self.format"+this.fields[key].format)}else{var pfunc=self.formatAsIs}if(this.fields[key].fname=="name"||this.fields[key].fname=="main_name"||this.fields[key].fname=="game_title"){return'<a class="trow" href="'+this.url.replace("/ghdb/","/db/")+"/"+this.data[row][0]+'.html" onmouseover="gh_db_showtip(this,event,6,500,0,-1,30);" target="_blank">'+val+"</a>"}if(this.fields[key].fname=="icon"){return this.formatIcon(val)}if(val==null){return"&nbsp;"}return pfunc(val)};ghdb_Table.prototype.formatAsIs=function(a){return a};ghdb_Table.prototype.formatNope=function(a){return"&nbsp;"};ghdb_Table.prototype.formatIcon=function(a){return'<img src="'+a+'" style="border:0;width:32px;height:32px;">'};ghdb_Table.prototype.formatImg=function(a){return'<img src="'+a+'" style="border:0;">'};var my_locale_data={filter:{msgid:[null,"msgstr"],"Adiitional filters: ":[null,"Дополнительные фильтры: "],"Use filter":[null,"Применить фильтр"],"Reset filter":[null,"Сбросить фильтр"]}};var gt=new Gettext({domain:"filter",locale_data:my_locale_data});function _(a){return gt.gettext(a)};
