var NS = document.layers;

function MenuChange(object,status,levels)
{
	if(status==1)
	{
		if(document.images[object])
			if(document.images[object].className=='menuitem')
				document.images[object].className='menuitemOver';
		ary = levels.split(",");
		if(ary[0]!='')
			for(lp=0;lp<ary.length;lp++)
				if(NS) document.layers['menu'+ary[lp]].visibility='show';
				else   document.all['menu'+ary[lp]].style.visibility='';
	}
	else
	{
		if(document.images[object])
			if(document.images[object].className=='menuitemOver')
				document.images[object].className='menuitem';
		ary = levels.split(",");
		if(ary[0]!='')
			for(lp=0;lp<ary.length;lp++)
				if(NS) document.layers['menu'+ary[lp]].visibility='hide';
				else   document.all['menu'+ary[lp]].style.visibility='hidden';
	}
}

function fastmenuImgProduct(object,status)
{
	if(status==1) object.className='fastmenu_productOver';
	         else object.className='fastmenu_product';
}

function showPhoto(id,lang)
{
	window.open('details.php?id='+id+'&lang='+lang,'detail_'+id,'width=500,height=700');
	return false;
}

function showDetail(id,lang)
{
	window.open('detailsinprice.php?id='+id+'&lang='+lang,'detailinprice_'+id,'width=540,height=320');
	return false;
}

function showCalc(id,lang)
{
	window.open('calc.php?id='+id+'&lang='+lang,'calc_'+id,'width=520,height=550');
	return false;
}

function showScheme(id,index,lang)
{
	window.open('scheme.php?id='+id+'&index='+index+'&lang='+lang,'_blank','width=790,height=560,scrollbars=1');
	return false;
}

function setHint(hint)
{
	window.defaultStatus = hint;
	return true;
}

function blurHint()
{
	window.defaultStatus = '';
	return true;
}

function open_popup_window(url, width, height)
{
	window.open(url,'action_window','width='+width+',height='+height);
}