var _num=25
var _bgColor=['','#eeeef0','#eeeef0','#ddddf0','#ff0000']
this.ObjMenu_1=["про компанію","","20px", _bgColor[1]]
this.ObjMenu_101=["історія компанії","./menudata_ua/history.html","20px",_bgColor[2]]
this.ObjMenu_102=["вакансії","./menudata_ua/vacancy.html","20px",_bgColor[2]]
this.ObjMenu_2=["продукція","","20px",_bgColor[1]]
this.ObjMenu_201=["двері","","20px",_bgColor[2]]
this.ObjMenu_20101=["лінія дерева","./menudata_ua/menu_wood_line.html","20px",_bgColor[3]]
this.ObjMenu_2010101=["стандарт","./menudata_ua/_standart.html","20px",_bgColor[3]]
this.ObjMenu_2010102=["класика стиль","./menudata_ua/_style.html","20px",_bgColor[3]]
this.ObjMenu_2010103=["гармонія","./menudata_ua/_harmony.html","20px",_bgColor[3]]
this.ObjMenu_2010104=["класика","./menudata_ua/_classic.html","20px",_bgColor[3]]
this.ObjMenu_2010105=["горизонт","./menudata_ua/_gorizont.html","20px", _bgColor[3]]
this.ObjMenu_2010106=["грація","./menudata_ua/_gracia.html","20px", _bgColor[3]]
this.ObjMenu_2010107=["лінія","./menudata_ua/_linia.html","20px", _bgColor[3]]
this.ObjMenu_20102=["відкрите дерево","./menudata_ua/menu_open_wood.html","20px",_bgColor[3]]
this.ObjMenu_2010201=["симетрія","./menudata_ua/_symetria.html","20px", _bgColor[3]]
this.ObjMenu_2010202=["акцент","./menudata_ua/_akcent.html","20px", _bgColor[3]]
this.ObjMenu_2010203=["ритм","./menudata_ua/_rytm.html","20px", _bgColor[3]]
this.ObjMenu_2010204=["емоція","./menudata_ua/_emocia.html","20px", _bgColor[3]]
this.ObjMenu_20103=["фарбовані HDF","./menudata_ua/menu_hdf.html","20px",_bgColor[3]]
this.ObjMenu_2010301=["лондон","./menudata_ua/_london.html","20px",_bgColor[3]]
this.ObjMenu_20104=["ПВХ плівка","./menudata_ua/menu_pvh.html","20px",_bgColor[3]]
this.ObjMenu_2010401=["фасад","./menudata_ua/_fasad.html","20px",_bgColor[3]]
this.ObjMenu_20105=["шпоноцел","./menudata_ua/menu_shponocel.html","20px",_bgColor[3]]
this.ObjMenu_2010501=["ідея","./menudata_ua/_idea.html","20px",_bgColor[3]]
this.ObjMenu_2010502=["статус","./menudata_ua/_status.html","20px",_bgColor[3]]
this.ObjMenu_20106=["екоцел","./menudata_ua/menu_ekocel.html","20px",_bgColor[3]]
this.ObjMenu_2010601=["елегант","./menudata_ua/_elegant.html","20px",_bgColor[3]]
this.ObjMenu_2010602=["муза","./menudata_ua/_muza.html","20px", _bgColor[3]]
this.ObjMenu_20107=["CPL","./menudata_ua/menu_cpl.html","20px",_bgColor[3]]
this.ObjMenu_2010701=["проект","./menudata_ua/_proekt.html","20px",_bgColor[3]]
this.ObjMenu_202=["коробки","","20px",_bgColor[2]]
this.ObjMenu_20201=["коробка регульована","./menudata_ua/korobka_reg.html","20px",_bgColor[3]]
this.ObjMenu_20202=["коробка звичайна","./menudata_ua/korobka.html","20px",_bgColor[3]]
this.ObjMenu_203=["лиштва","./menudata_ua/lyshtva.html","20px",_bgColor[2]]
this.ObjMenu_204=["фрамуги","./menudata_ua/framuga.html","20px",_bgColor[2]]
this.ObjMenu_205=["аксесуари","./menudata_ua/acces.html","20px",_bgColor[2]]
this.ObjMenu_206=["монтаж","","20px",_bgColor[2]]
this.ObjMenu_20601=["монтаж регульованої коробки","./menudata_ua/montage_reg.html","20px",_bgColor[3]]
this.ObjMenu_20602=["монтаж звичайної коробки","./menudata_ua/montage.html","20px",_bgColor[3]]
this.ObjMenu_207=["сертифікати","./menudata_ua/sert.html","20px",_bgColor[2]]
this.ObjMenu_3=["виробництво","","20px",_bgColor[1]]
this.ObjMenu_301=["завод","./under_construction1.html","20px",_bgColor[2]]
this.ObjMenu_302=["технології","./under_construction1.html","20px",_bgColor[2]]
this.ObjMenu_4=["партнерам","","20px",_bgColor[1]]
this.ObjMenu_401=["АПП","./menudata_ua/auth.html","20px",_bgColor[2]]
this.ObjMenu_402=["представникам","./menudata_ua/auth.html","20px",_bgColor[2]]
this.ObjMenu_403=["будівельним організаціям","./menudata_ua/auth.html","20px",_bgColor[2]]
this.ObjMenu_404=["архітекторам та дизайнерам","./menudata_ua/auth.html","20px",_bgColor[2]]
this.ObjMenu_5=["стати партнером","./menudata_ua/partner.html","20px",_bgColor[1]]
this.ObjMenu_6=["контакти","","20px",_bgColor[1]]
this.ObjMenu_601=["компанія \"БРАМА\" ","./menudata_ua/contacts.html","20px",_bgColor[2]]
this.ObjMenu_602=["представництва та ділери","./menudata_ua/dealers.html","20px",_bgColor[2]]
this.ObjMenu_7=["підтримка","./menudata_ua/help.html","20px",_bgColor[1]]
this.ObjMenu_8=["офіс","./menudata_ua/mail.html","20px",_bgColor[1]]
this.ObjMenu_9=["новини","","20px",_bgColor[1]]
this.ObjMenu_901=["новини компанії","./menudata_ua/news.html","20px",_bgColor[2]]
this.ObjMenu_902=["публікації про двері","./menudata_ua/publications.html","20px",_bgColor[2]]
var _color='#1c4d89'

function AuthPath(LogIn, Passw)
{
	switch(LogIn)
	{
		case 'Svidrak': {if(Passw=='svidrak') return '../QwErTyAsDf/photoes.html'}; break;
	};
	return '../menudata_ua/wrong.html';
}

function checked(Obj, state, _col){
//	alert(_col);
	switch (state){
	case 0:{Obj.style.background=_col; Obj.style.color=_color;}; break;
	case 1:{Obj.style.background='#97baff'; Obj.style.color='white';}; break;
	}}

function getHeight(Obj)
{
	var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

//	alert(BrowserDetect.browser+" --- "+BrowserDetect.version);
//	alert(Obj);
//	alert(Obj.document.body.scrollHeight);
	switch (BrowserDetect.browser){
	case 'Explorer': return Obj.document.body.scrollHeight+'px'; break;
	case 'Opera': return 500+'px'; break;
	case 'Firefox': return Obj.document.height+'px'; break;
	case 'Netscape': return Obj.document.body.scrollHeight+'px'; break;
	}
	return '100px';
//		   Obj.document.body.style.pixelWidth
//	return Obj.document.body.scrollHeight;
//	alert(Data_Frame.filledTable.offsetHeight);
}

function createTable(Obj, level){
	_mf="Data_Frame";
	if (level==0) Obj=menuFrame;
	else{
		Obj=document.getElementById("Sep"+level);
		if(Obj.innerHTML!="") {Obj.innerHTML=""; return}}
	count=level*100+1;
	x=Obj.innerHTML;
	Obj.innerHTML="";
	HTMLStr="<table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#eeeef0'>";
	while (MObj=eval('this.ObjMenu_'+count))
	{
		HTMLStr+="<tr><td class='one' height="+eval("ObjMenu_"+count+"[2]")+" style='padding-left:20px; background:"+eval("ObjMenu_"+count+"[3]")+"'";
		HTMLStr+="onclick='createTable(this, "+count+"); if(ObjMenu_"+count+"[1]) document.getElementById(_mf).src=ObjMenu_"+count+"[1];'";
		HTMLStr+="onmouseover=\"checked(this, 1, '"+eval("ObjMenu_"+count+"[3]")+"')\" ";
		HTMLStr+="onmouseout=\"checked(this,0, '"+eval("ObjMenu_"+count+"[3]")+"') \" id='ObjMenu"+count+"'";
		HTMLStr+=">"+MObj[0]+"</td></tr><tr><td id='Sep"+count+"'  style='padding-left:20px' ></td></tr>";
		count++;
	};
    HTMLStr+="</table>";


	HTMLStr+=x;
	Obj.innerHTML=HTMLStr;
	};

function ShowPattern(color){
	document.getElementById('PattImg').src="../pics/matirials/"+color+"_big.jpg"
	document.getElementById('BigPattern').style.visibility='visible';
	document.getElementById('BigPattern').style.left=20;
};
function HidePattern(color, obj){
	document.getElementById('BigPattern').style.visibility='hidden';
}




