function MyInit(){
	for(myii=0;myii<mymm.length;myii++){
		if (mymm[myii]){
			tmp=document.getElementById('menutd'+myii);
			tmp1=getCoords(tmp)
			//alert(tmp1.x)
			mymm[myii].fromtop=tmp1.y
			mymm[myii].makeTop();
		}
	}
}

 function open_window(link,w,h) //opens new window
    {
        var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=no,scrollbars=no";
        newWin = window.open(link,'newWin',win);
        newWin.focus();
    }

function HideAll(){
	var i;
	for(i=0;i<mymm.length;i++){
		if (mymm[i])
		mymm[i].hideSubs(1,1,0,0,1);
	}
}

function getCoords(element) {
    var el = element
    var res = { x: 0, y: 0 }
    do {
        res.x += el.offsetLeft
        res.y += el.offsetTop
        el = el.offsetParent
    } while(el && el != document.body)
    return res
}

function menu_anim(id){
//	var el=document.getElementById('sharik'+id)
//	el.src='images/kn_04.gif'
	HideAll();
	if (mymm[id]){
		//if (mymm[id].fromleft==0) MyInit();
		mymm[id].mover("m1")
	}
}
function menu_anim_off(id){
//	var el=document.getElementById('sharik'+id)
//	el.src='images/kn_04_.gif'
	if (mymm[id])
	mymm[id].mmout("m1")
}

function MakeLbl(){
	var el=document.getElementById('imglbl')
	if (el) {
	tmp1=getCoords(el)
	el=document.getElementById('z1id')
	el.style.top=tmp1.y-170;
	el.style.display="block";
	}
	el=false

	el=document.getElementById('bodylbl')
	if (el) {
	tmp1=getCoords(el)
	el=document.getElementById('z2id')
	el.style.top=tmp1.y-200;
	el.style.display="block";
	}
	el=false

	el=document.getElementById('drlbl')
	if (el) {
	tmp1=getCoords(el)
	el=document.getElementById('z3id')
	el.style.top=tmp1.y-200;
	el.style.display="block";
	}
}

