function hide(item){item.style.visibility='hidden';}
function show(item){item.style.visibility='visible';}
function pos_rel(item){item.style.position='relative';}
function pos_abs(item){item.style.position='absolute';}
function showhide(id,pos){if(id){var item=$(id);if(item)
if(item.style.visibility=="visible"){hide(item);if(pos!=null)
pos_abs(item);}else{show(item);if(pos!=null)
pos_rel(item);}}}
$(document).onclick=null;var k;var k1;function showhide2(id){if(id){if($(id).style.display!='block'&&$(id).style.display!='visible'){show2(id);}else{hide2(id);}}}
function display(id){showhide(id);$(document).onclick=monitorClick2;}
function hide2(id){if($(id)){$(id).style.display='none';$(id).style.visibility='hidden';$(document).onclick=null;}}
function show2(id){if($(id)){$(id).style.display='block';$(id).style.visibility='visible';$(document).onclick=monitorClick;}}
function monitorClick2(e){var target=(e&&e.target)||(event&&event.srcElement);var matchstring=/sort/;while(target!=null){if(target.id!=""&&(target.id.search(matchstring)!=-1)){return true;}
target=target.offsetParent;}
if(k!=null)
hide2(k);$(document).onclick=null;}
function monitorClick(e){var evt=(e)?e:event;var theElem=(evt.srcElement)?evt.srcElement:evt.target;var special_id=["sortupimg","sortdnimg","WzBoDyI"];while(theElem!=null){if(theElem.getAttribute('mc')==1||special_id.indexOf(theElem.id)>=0){return true;}
theElem=theElem.offsetParent;}
if(k){hide2(k);k=null;}
if(k1){hide2(k1);k1=null;}
return true;}
function showhide_mc(id){if(id){if(k&&k!=id){hide2(k);}
k=id;showhide2(id);$(id).onmouseout=timeout_hide;}}
var showid;function showhide3(id){if(id){if(showid!=null)
hide($(showid));showid=id;show($(id));}}
function timeout_hide(e){evt=(e)?e:window.event;var tg=this;var reltg=(evt.toElement)?evt.toElement:evt.relatedTarget;if(reltg==tg)
return true;while(reltg!=tg&&reltg.tagName!='BODY'){reltg=reltg.parentNode;if(reltg==tg){return true;}}
tg.onmouseout="";setTimeout("hide2('"+tg.id+"')",1000);}