/*
//////// проба
var temp=100; 
temp=document.getElementById( "menu" ).style.left;
temp=document.body.clientWidth

var flag_menu = false ;
function Test() {
flag_menu=!flag_menu;
document.getElementById('kusia').innerHTML=flag_menu;
document.getElementById('kusia').style["color"]='orange';
var ttt=Math.round(parseInt(document.getElementById("kusia").style.left)/2);

//////////

// find browser inner dimensions - определение разрешения экрана
var width = 0, height = 0; 
function findDimensions(){ 
//   var width = 0, height = 0; 
  if(window.innerWidth){ 
    width = window.innerWidth; 
    height = window.innerHeight; 
  } 
  else if(document.documentElement && document.documentElement.clientWidth){ 
    width = document.documentElement.clientWidth; 
    height = document.documentElement.clientHeight; 
  } 
  else if(document.body && document.body.clientWidth){ 
    width = document.body.clientWidth; 
    height = document.body.clientHeight; 
  } 
} 
findDimensions(); 
// find browser inner dimensions End


///////


// В простом случае пойдет вот так - получение коордитаты объекта - левый верхний в абсолютных координатах
function findPos(obj) {
    var curleft = curtop = 0;
    if (obj.offsetParent) {
        curleft = obj.offsetLeft
        curtop = obj.offsetTop
        while (obj = obj.offsetParent) {
            curleft += obj.offsetLeft
            curtop += obj.offsetTop
        }
    }
    return [curleft,curtop];
}

}
///////// проба конец

// В простом случае пойдет вот так - получение коордитаты объекта - левый верхний в абсолютных координатах
function kusia(obj) {
temp=document.body.clientWidth/2
document.getElementById( obj ).style.left=temp+"px"
document.getElementById( obj ).style.top=obj.offsetLeft
}

*/


//////// основные функции /////////

function mouseOver( id ) {
	var submenu = document.getElementById( id ).getElementsByTagName( 'UL' )[0] ;
	submenu.style.display = 'block' ;
}

function mouseOut( id ) {
	var submenu = document.getElementById( id ).getElementsByTagName( 'UL' )[0] ;
	submenu.style.display = 'none' ;
}

/*
function posScreen() {
var pos
var scr_width=document.body.clientWidth
if (scr_width>1200 && scr_width<1400) pos=440; 
if (scr_width<1200)  pos=300 ;
if (scr_width>1400)  pos=500 ;
document.getElementById( "menu" ).style.left=pos+"px"
}
*/

function posScreen() {
var pos
var scr_width=document.body.clientWidth
if (scr_width>1200 && scr_width<1400) pos=300; 
if (scr_width<1200)  pos=300 ;
if (scr_width>1550)  pos=500 ;
document.getElementById( "menu" ).style.left=pos+"px"
}

