<!-- menu items[ru] & functions :::
// written or changed by Vady.
// vady@i.com.ua

// extra code to find position:
function findPos(){
	if(bw.ns4){	//Netscape 4
	x = document.layers.layerMenu.pageX;
	y = document.layers.layerMenu.pageY;
	}else{	//other browsers
		x=0; y=0; var el,temp;
		el = bw.ie4?document.all["divMenu"]:document.getElementById("divMenu");
		if(el.offsetParent){
			temp = el;
		while(temp.offsetParent){	//Looping parent elements to get the offset of them as well
			temp=temp.offsetParent; 
			x+=temp.offsetLeft;
			y+=temp.offsetTop;
		}
	}
	x+=el.offsetLeft;
	y+=el.offsetTop;
	}
	//Returning the x and y as an array
	return [x,y];
}

pos = findPos();

//Menu object creation
myMenu=new makeCM('myMenu'); //Making the menu object. Argument: menuname

//Menu properties
myMenu.pxBetween=0;
//Using the cm_page object to place the menu ----
myMenu.fromLeft=pos[0];
myMenu.fromTop=pos[1];
//We also need to "re place" the menu on resize. So:
myMenu.onresize=eval("pos = findPos(); myMenu.fromLeft=pos[0]; myMenu.fromTop=pos[1]");

myMenu.rows=1;
myMenu.menuPlacement=0;

myMenu.offlineRoot='';
//myMenu.onlineRoot=document.location.href.substring(0,document.location.href.lastIndexOf("/") +1);	//'js/';

var _currentpath;
var _currentlocation = document.location.href;

if(_currentlocation.indexOf('com.ua/') !=-1) {
	_currentpath = _currentlocation.substring(0,_currentlocation.lastIndexOf("com.ua/")+7);
} else if (_currentlocation.indexOf('com/') !=-1) {
	_currentpath = _currentlocation.substring(0,_currentlocation.lastIndexOf("com/")+4);
} else {
	_currentpath = _currentlocation;
}
_currentpath = "";
var _cp = "http://www.deborah.com.ua/ru/";
//myMenu.onlineRoot=_currentpath;
myMenu.onlineRoot="http://www.deborah.com.ua/";
myMenu.offlineRoot=_currentpath + "js/";
myMenu.resizeCheck=1;
myMenu.wait=500;
myMenu.fillImg='menuha.gif';
myMenu.zIndex=0;
//var img=myMenu.onlineRoot+"images/menu/";
var img=_currentpath+"images/menu/";

//Background bar properties
myMenu.useBar=1;
myMenu.barWidth="menu";
myMenu.barHeight="menu"; 
myMenu.barClass="clBar";
myMenu.barX="menu";
myMenu.barY="menu";
myMenu.barBorderX=0;
myMenu.barBorderY=0;
myMenu.barBorderClass='';

//Level properties - ALL properties have to be spesified in level 0
myMenu.level[0]=new cm_makeLevel() //Add this for each new level
myMenu.level[0].width=100;
myMenu.level[0].height=18;
myMenu.level[0].regClass="clLevel0";
myMenu.level[0].overClass="clLevel0over";
myMenu.level[0].borderX=0;
myMenu.level[0].borderY=0;
myMenu.level[0].borderClass="clLevel0border";
myMenu.level[0].offsetX=0;
myMenu.level[0].offsetY=0;
myMenu.level[0].rows=0;
myMenu.level[0].arrow=0;
myMenu.level[0].arrowWidth=0;
myMenu.level[0].arrowHeight=0;
myMenu.level[0].align="bottom";


//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
myMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
myMenu.level[1].width=myMenu.level[0].width+45;
myMenu.level[1].height=15;
myMenu.level[1].regClass="clLevel1";
myMenu.level[1].overClass="clLevel1over";
myMenu.level[1].borderClass="clLevel1border";
myMenu.level[1].borderX=1;
myMenu.level[1].borderY=1;
myMenu.level[1].align="right";
myMenu.level[1].offsetX=-10; //-(myMenu.level[0].width-2)/2+20;
myMenu.level[1].offsetY=3;
myMenu.level[1].arrow=img+'arrow.gif';
myMenu.level[1].arrowWidth=15;
myMenu.level[1].arrowHeight=15;

//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
myMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
myMenu.level[2].width=145;
myMenu.level[2].height=15;
myMenu.level[2].offsetX=0;
myMenu.level[2].offsetY=0;
myMenu.level[2].regClass="clLevel1";
myMenu.level[2].overClass="clLevel1over";
myMenu.level[2].borderClass="clLevel1border";

/******************************************
Menu item creation:
myMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
myMenu.makeMenu('top1','','About Us',_cp+'about/info/','',75,'',img+'ru-about.gif',img+'ru-about-over.gif');
	myMenu.makeMenu('sub01','top1','Общая информация',_cp+'about/info/');
	myMenu.makeMenu('sub02','top1','Экология и дома',_cp+'about/ecology/');
	myMenu.makeMenu('sub03','top1','Натуральная теплоизоляция',_cp+'about/natural-insulation/','',null,30);
	myMenu.makeMenu('sub04','top1','Долговечность',_cp+'about/longlife/');

myMenu.makeMenu('top2','','Models',_cp+'models/','',74,null,img+'ru-models.gif',img+'ru-models-over.gif');
	
var _olmodels = new Array();
_olmodels = ['all','edelweiss','grand','slalom','lincoln','beskid','hunter','karelia','panonia','inkerman','scandinavia','nova','baltika','elbrus','estonia','svityaz'];
var _olmodelsnames = new Array();
_olmodelsnames = ['Все Модели','Эдельвейс','Гранд','Слалом','Линкольн','Бескид','Хантер','Карелия','Панония','Инкерман','Cкандинавия','Нова','Балтика','Эльбрус','Эстония','Свитязь'];

myMenu.makeMenu('mod0','top2',_olmodelsnames[0],_cp+'models/'+_olmodels[0]+'/');

var _mtotal = _olmodels.length;
for (var loop=1; loop < _mtotal; loop++) {
	myMenu.makeMenu('mod'+loop,'top2',_olmodelsnames[loop],_cp+'models/'+_olmodels[loop]+'/info.html');
		myMenu.makeMenu(loop+'submod1','mod'+loop,'Общая информация',_cp+'models/'+_olmodels[loop]+'/info.html');
		myMenu.makeMenu(loop+'submod2','mod'+loop,'Планировка',_cp+'models/'+_olmodels[loop]+'/layout.html');
		myMenu.makeMenu(loop+'submod3','mod'+loop,'Стройматериалы',_cp+'models/'+_olmodels[loop]+'/materials.html');
		myMenu.makeMenu(loop+'submod4','mod'+loop,'Цена',_cp+'models/'+_olmodels[loop]+'/price.html');
		// myMenu.makeMenu(loop+'submod5','mod'+loop,'Найти в галерее',_cp+'gallery/all/?find='+_olmodelsnames[loop]);
}

myMenu.makeMenu('top3','','Gallery',_cp+'gallery/','',78,null,img+'ru-gallery.gif',img+'ru-gallery-over.gif');
	myMenu.makeMenu('sub30','top3','Жилые дома',_cp+'gallery/houses/1/','',126);
	myMenu.makeMenu('sub31','top3','Бани',_cp+'gallery/bath-houses/1/','',126);
	myMenu.makeMenu('sub32','top3','Интерьер',_cp+'gallery/interior/1/','',126);
	//myMenu.makeMenu('sub33','top3','Каркасные дома',_cp+'gallery/skeleton-buildings/','',126);

myMenu.makeMenu('top4','','Building Process',_cp+'process/','',114,null,img+'ru-process.gif',img+'ru-process-over.gif');
	myMenu.makeMenu('sub40','top4','Шаг за шагом',_cp+'p/process-steps/','_blank');
	myMenu.makeMenu('sub41','top4','Текущие новости',_cp+'process-news/'); // Новости ресурса, Гарячие новинки, Новостная лента, Новости с-фронта, etc.

myMenu.makeMenu('top5','','Publications',_cp+'publications/','',95,null,img+'ru-publications.gif',img+'ru-publications-over.gif');
	myMenu.makeMenu('sub50','top5','Статьи',_cp+'publications/articles/','',110);
	myMenu.makeMenu('sub51','top5','ЧаВО',_cp+'faq/','',110);
	//myMenu.makeMenu('sub52','top5','Технические характеристики',_cp+'publications/spec/');

myMenu.makeMenu('top6','','Testimonials',_cp+'testimonials/','',76,null,img+'ru-testimonials.gif',img+'ru-testimonials-over.gif');
	myMenu.makeMenu('sub60','top6','Мнения клиентов',_cp+'testimonials/clients/');
	myMenu.makeMenu('sub61','top6','Форма для отзывов',_cp+'contacts/feedback/');

myMenu.makeMenu('top7','','Contacts',_cp+'contacts/','',87,null,img+'ru-contacts.gif',img+'ru-contacts-over.gif','','','bottomleft');
	myMenu.makeMenu('sub70','top7','Наши координаты',_cp+'contacts/info/','',135);
	myMenu.makeMenu('sub71','top7','Форма - заявка',_cp+'contacts/request-form/','',135);
	myMenu.makeMenu('sub72','top7','Обратная связь',_cp+'contacts/feedback/','',135);
	//myMenu.makeMenu('sub73','top7','Написать письмо','mailto:sales@deborah.com.ua','',135);

// constructs the menu
myMenu.construct();

//-->