var ie4, nn4, nn6;
var rX, lX, tY, bY;
var zi=100;
ie4 = nn4 = nn6 = 0;
if(document.all)
	{ie4=1; document.body.onmousemove=updateIt;}
if(document.layers)
	{nn4=1; window.captureEvents(Event.MOUSEMOVE); window.onmousemove=updateIt;}
if(document.getElementById&&!ie4)
	{nn6=1; document.body.onmousemove=updateIt;}
	
function dropit(e,oIEorNN6s,sOneNN,xMenu){
	if(ie4){
		oneIE = oIEorNN6s;
		if (window.themenu&&themenu.id!=oneIE.id)
			themenu.style.visibility="hidden";
		themenu=oneIE;
		themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX;
		themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+15;
		lX=themenu.style.posLeft-document.body.scrollLeft;
		rX=lX+themenu.offsetWidth;
		tY=themenu.style.posTop-document.body.scrollTop-25;
		bY=themenu.offsetHeight+tY+75;
		//updateIt(oneIE);
		if (themenu.style.visibility=="hidden"){
			themenu.style.visibility="visible";
			//themenu.style.zIndex=zi++;???
		}
		//alert("ssss");
	}
	if(nn4){
		if (window.themenu&&themenu.id!=eval(sOneNN).id)
			themenu.visibility="hide";
		themenu=eval(sOneNN);
		if (themenu.visibility=="hide")
			themenu.visibility="show";
		//themenu.zIndex++;???
		themenu.left=e.pageX-e.layerX;
		themenu.top=e.pageY-e.layerY+14;
		lX=themenu.left;
		rX=lX+themenu.clip.width;
		tY=themenu.top-25;
		bY=themenu.top+themenu.clip.height;
		return false;
	}
	if(nn6){
		oneNN = document.getElementById(oIEorNN6s); //eval(sOneNN);
		if (window.themenu&&themenu.id!=oneNN.id)
			themenu.style.visibility="hidden";
		themenu=oneNN;
		themenu.style.left=xMenu;
		themenu.style.top=146;
		lX=parseInt(themenu.style.left);
		rX=lX+themenu.offsetWidth;
		tY=parseInt(themenu.style.top);
		bY=themenu.offsetHeight+tY+25;
		//updateIt(oneNN);
		if (themenu.style.visibility=="hidden"){
			themenu.style.visibility="visible";
			//themenu.style.zIndex=zi++;???
		}
	}
}

function hidemenu (whichone){
	if(ie4) hidemenu1 (whichone);
	if(nn6) hidemenu3();
	if(nn4) hidemenu2();
}

function hidemenu1(whichone){
	if(window.themenu)
		themenu.style.visibility="hidden";
	hidemenu2();
}

function hidemenu2(){
	if(typeof(themenu)!="undefined")
		themenu.visibility="hide";
}

function hidemenu3(){
	if (themenu.style.visibility=="visible")
		themenu.style.visibility="hidden";
}

function updateIt(oneIE){
	var x,y

	if(ie4){
		x=window.event.clientX;
		y=window.event.clientY;
		if(x>rX || x<lX) hidemenu(oneIE);
		else if(y>bY+1 || y<tY) hidemenu1(oneIE);
	}
	if(nn6){
		x=oneIE.clientX;
		y=oneIE.clientY;
		if(x>rX || x<lX) hidemenu3();
		else if(y>bY+1 || y<tY-30) hidemenu3();
	}
	if(nn4){
		x=oneIE.pageX;
		y=oneIE.pageY;
		if(x>rX || x<=lX-1) hidemenu2();
		else if(y>bY || y<tY) hidemenu2();
	}
}


function setStatus(statusText)
{
  window.status=statusText;
  return true;
}

function delStatus()
{
  window.status="";
  return true;
}

opinion = null;

function openWindow(url, width, height, articul) {
	var feat = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height+', top=100, left=150';
 //  opinion = window.open(url,"Handheld", feat);
 	if( opinion != null ) {
		opinion.close();
	}
 	opinion = window.open('', articul, feat);
	
	var pg = '<html><title>'+articul+'</title><body leftmargin="0" topmargin="0"> <img src="'+url+'"></body></html>';
	opinion.document.write( pg );
}

function openWindow_about(url, width, height, articul, content) {
	var feat = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height+', top=100, left=150';
  
    if( opinion != null ) {
		opinion.close();
	}
	opinion = window.open(url,"Handheld", feat);
	
	var pg = '<html><title>'+articul+'</title><body leftmargin="0" topmargin="0" bgcolor="#D2E9FF" ><TABLE align="center" cellSpacing=0 cellPadding=0 width=90% border=0> <tr> <td align="center"> <font color="#333300" size="3"><b>'+ articul +'</b></font></td></tr> <tr><td>  <hr color="#484848"  align="center" size="2" width="200"  </td></tr><tr> <td align="justify">  <font color="#333300" size="2">'+ content +'</font> </td>  </tr>  </TABLE></body></html>';
	opinion.document.write( pg );
}

function openWindow_del(url, width, height, articul) {
	var feat = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, alwaysRaised=1,width='+width+',height='+height+', top=350, left=450';
 //  opinion = window.open(url,"Handheld", feat);
 	opinion = window.open(url, articul, feat);
	
}
function makeRemote(url){
	remote = window.open(url,"remotewin","width=500,height=250,scrollbars=1");
	remote.location.href = url;
	if (remote.opener == null) remote.opener = window;
}
//var id_old=0;//текущий номер видимого столбца
function closeall()
{
techno0070.style.display='none';
techno0071.style.display='none';
techno0072.style.display='none';
techno0073.style.display='none';
techno0074.style.display='none';
techno0075.style.display='none';
techno0076.style.display='none';
}
function cv(id) 
{
closeall();
if(id.style.display == 'none')
	{id.style.display='block'; } 
else { id.style.display='none'; } 
}
function gv(id) 
{
if(id.style.display == 'none')
	{id.style.display='block'; } 
else { id.style.display='none'; } 
}


