function index_startMenu_Click()
{
var obj=event.srcElement;
var p_obj=obj.parentNode;
if(obj.z||p_obj.z||obj.id=="imsp")return;
if(obj.id!="start" && obj.id!="top_menu_start")
{
index_menuStart_hiddenAll();
}
}
function index_menuStart_firstPosition(obj_but,top_or_bottom)
{
var bt_x=get_left(obj_but); 
var bt_y=get_top(obj_but);
var div_height=_gId("sc_0").offsetHeight;
var but_height=obj_but.offsetHeight;
_gId("sc_0").style.left=bt_x;
var y=(top_or_bottom=="top")?(bt_y+but_height-1):(bt_y-div_height-1)
_gId("sc_0").style.top=y;
}
function index_menuStart_show_mk(obj)
{
var obj_text=obj.innerText;
var fileName=obj.f;
var f5=0;
show_module(fileName,obj_text,f5,obj.k,obj.d);
index_menuStart_hiddenAll();
}
function index_menuStart_over(div_obj)
{
var a_obj=event.srcElement;
if(!a_obj){return;}
var a=false;
if(a_obj.tagName=="SPAN"){a=true;}
while((a_obj.tagName!="A"))
{
a_obj=a_obj.parentNode;
if(!a_obj)return;
}
var p=a_obj.parentNode;
while(p.tagName!="DIV"){p=p.parentNode}
if(!a_obj.f&&_gId("sc_"+a_obj.id))
{
if(_gId("sc_"+a_obj.id).style.display=="none"||_gId("sc_"+a_obj.id).style.display=="")
{
var y=a_obj.offsetTop+p.offsetTop;
index_menuStart_showNext(_gId("sc_"+a_obj.id),p,event.offsetX,event.x,y,a)
}
index_menuStart_hidSub(p,a_obj);
_gId("showed").value=_gId("showed").value+"sc_"+a_obj.id+",";
_gId("sc_"+a_obj.id).style.display="block";
index_menuStart_position(_gId("sc_"+a_obj.id),_gId("sc_0"))
}
else
{
index_menuStart_hidSub(p,a_obj);
}
}
function index_menuStart_position(obj,objParent)
{
var obj_h=obj.scrollHeight;
var obj_t=obj.offsetTop;
var diff=(obj_h+obj_t)-(objParent.scrollHeight+objParent.offsetTop);
if(diff>0)
{
obj.style.top=obj_t-diff;
}
}
function index_menuStart_showNext(obj,objParent,x1,x2,y,a) 
{
if(!obj||!objParent)return;
obj.style.display="block";
var x=0;
if(a) 
{
x=objParent.scrollWidth-x1+x2-35;
}
else
{
x=objParent.scrollWidth-x1+x2-7;
}
var menu_width=obj.offsetWidth+objParent.offsetWidth+objParent.offsetLeft;
var x_diff=menu_width-document.body.scrollWidth;
if(x_diff>0)
{
x=objParent.offsetLeft-objParent.offsetWidth+4;
}
obj.style.left=x;
obj.style.top=y;
obj.style.zIndex=objParent.style.zIndex+1;
}
function index_menuStart_findParent(pid)
{
var showed=_gId("showed").value;
if(showed.indexOf(pid)>-1)
{
return false;	
}
return true;
}
function index_menuStart_hidSub(p,obj)
{
var showed=_gId("showed").value;
var arr=showed.split(",");
var pid="";
if(p.id!="sc_0")
{
pid=_gId(p.id.split("_")[1]).parentNode.id;
}
for(var i=0;i<arr.length-1;i++)
{
if(arr[i]&&p.id!=arr[i])
{
if(index_menuStart_findParent(pid)||p.id=="sc_0")
{
_gId(arr[i]).style.display="none";
_gId("showed").value=showed.replace(arr[i]+",","")
}
}
}
if(pid==""&&p.id=="sc_0")
{
_gId("showed").value="";
}
}
function index_menuStart_sh(obj_but,top_or_bottom)
{
var o=_gId('index_menuStart_showTD');
if(o.innerHTML.replace(/ /g,"")=="")
{
var url="../"+asp_php+"/index_menuStart_str_to_js."+asp_php+"?exe=menu_show_purview_only";
var s=ajax(url);
s=s.replace(/_e_/g,"onmouseover='index_menuStart_over(this)'")
s=s.replace(/_h_/g,"href='#ytd;'")
s=s.replace(/_t_/g,"onclick='index_menuStart_show_mk(this)'")
s=s.replace(/_p_/g,"span")
s=s.replace(/_s_/g,"id='imsp'")
s=s.replace(/_s1_/g,"id='imsp0'")
s=s.replace(/_n_/g,"class='star_menu_leftImg'")
o.innerHTML=s;
}
if(_gId("sc_0").style.display=="none"||_gId("sc_0").style.display=="")
{
_gId("sc_0").style.display="block";
_gId("sc_0").style.zIndex=1;
index_menuStart_firstPosition(obj_but,top_or_bottom);
}
else
{
index_menuStart_hiddenAll();
}
}
function index_menuStart_hiddenAll(w)
{
var showed="sc_0,"+_gId("showed",w).value;
var arr=showed.split(",");	
for(var i=0;i<arr.length-1;i++)
{
if(_gId(arr[i],w))
{
_gId(arr[i],w).style.display="none";	
}
}
_gId("showed",w).value="";	
}