var timer_id; var direction=0; var curr = 0; function scroll_iframe(frm,inc,dir) { if (timer_id) clearTimeout(timer_id); if (window.frames[frm]) { if (direction == 0) { curr += inc; window.frames[frm].scrollBy(0, inc); if(curr >= window.frames[frm].document.body.offsetHeight) { direction = 1; curr = window.frames[frm].document.body.offsetHeight; } } else if (direction == 1) { curr -= inc; window.frames[frm].scrollBy(0, -inc); if(curr <= 0) { direction = 0; curr = 0; } } //else window.frames[frm].scrollBy(inc, 0); timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20); } } function stopScroll() { if (timer_id) clearTimeout(timer_id); } function addBookmark(title,url) { if (window.sidebar) { window.sidebar.addPanel(title, url,""); } else if( document.all ) { window.external.AddFavorite( url, title); } else if( window.opera && window.print ) { return true; } } var popup=null; function popWin(theURL,dx,dy) { var ScreenWidth=dx; var ScreenHeight=dy; var movefromedge=0; placementx=movefromedge; placementy=movefromedge; WinPop=window.open(theURL,"","width="+ScreenWidth+",height="+ScreenHeight+",toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+","); } function popUp(theURL,dx,dy) { var movefromedge=50; placementx=movefromedge; placementy=movefromedge; window.open(theURL,"","width="+dx+",height="+dy+",toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+","); } function popUp2(theURL,dx,dy) { var movefromedge=50; placementx=movefromedge; placementy=movefromedge; window.open(theURL,"","width="+dx+",height="+dy+",toolbar=1,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+","); } function popUpMax(theURL) { window.open(theURL,"_blank","fullscreen=yes,toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1"); } function x() { return; } function openURL(url) { window.opener.location=url; setTimeout("window.close()",2500) } function C21onLoad() { scroll_iframe('scr1', 1, 'v'); } BLANK_IMAGE = 'img/menublank.gif'; var STYLE = { border:0, // item's border width, pixels; zero means "none" shadow:0, // item's shadow size, pixels; zero means "none" color:{ border:"#000000", // color of the item border, if any shadow:"#DBD8D1", // color of the item shadow, if any bgON:"#efb333", // background color for the items bgOVER:"#ffc242" // background color for the item which is under mouse right now }, css:{ ON:"clsCMOn", // CSS class for items OVER:"clsCMOver" // CSS class for item which is under mouse } }; var STYLE2 = { border:0, // item's border width, pixels; zero means "none" shadow:0, // item's shadow size, pixels; zero means "none" color:{ border:"#666666", // color of the item border, if any shadow:"#DBD8D1", // color of the item shadow, if any bgON:"#efb333", // background color for the items bgOVER:"#ffc242" // background color for the item which is under mouse right now }, css:{ ON:"clsCMOn2", // CSS class for items OVER:"clsCMOver2" // CSS class for item which is under mouse } }; function findLeft(obj) { var curleft = 0; if (obj.offsetParent) { do { curleft += obj.offsetLeft; } while (obj = obj.offsetParent); } alert(curleft); return curleft; } var MENU_ITEMS = [ {pos:[window.innerWidth/2-114-202,101], leveloff:[22,0], style:STYLE}, {code:"ПОКУПКА", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Жилой Объект", url:"/?menu=1&submenu=1"},{code:"Коммерческий Объект", url:"/?menu=1&submenu=2"},{code:"Новые Проекты", url:"/?menu=1&submenu=3"},{code:"Элитная Недвижимость", url:"/?menu=1&submenu=4"},{code:"Послать Запрос", url:"/?menu=1&submenu=5"} ] }, {code:"ПРОДАТЬ", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Горящие Запросы", url:"/?menu=2&submenu=1"},{code:"Заявить Собственность", url:"/?menu=2&submenu=2"} ] }, {code:"АРЕНДА", url:"/?menu=3&lang=5", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Искать", url:"/?menu=3&submenu=1"},{code:"Сдать В Аренду", url:"/?menu=3&submenu=2"},{code:"Краткосрочное Пребывание", url:"/?menu=3&submenu=1&seasonal=1&SGO=1"} ] }, {code:"ПОМОЩЬ", url:"/?menu=4&lang=5", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Страны Балтии", url:"/?menu=4&SUBJECT=BALTICS"},{code:"Европа/россия", url:"/?menu=4&SUBJECT=LEGAL"},{code:"Покупка", url:"/?menu=4&SUBJECT=BUYING"},{code:"Продажа", url:"/?menu=4&SUBJECT=SELLING"},{code:"Финансирование", url:"/?menu=4&SUBJECT=FINANCING"},{code:"Переезд", url:"/?menu=4&SUBJECT=MOVING"} ] }, {code:"О НАС", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Система Century 21", url:"/?menu=5&submenu=1"},{code:"Наше Обещание Покупателю", url:"/?menu=5&LID=23"},{code:"Наше Обещание Продавцу", url:"/?menu=5&LID=28"},{code:"Партнеры", url:"/?menu=5&submenu=4"},{code:"Контроль Качества", url:"/?menu=5&submenu=5"},{code:"Постоянный Опрос Клиентов", url:"/?menu=5&submenu=6"} ] }, {code:"КОНТАКТ", url:"/?menu=6&lang=5", format:{size:[22,135],itemoff:[0,135]}, sub:[ { pos:[0,0], style:STYLE2, size:[22,185], itemoff:[22,0]},{code:"Страны Балтии", url:"/?menu=6&submenu=1"},{code:"Карьера", url:"/?menu=6&submenu=2"},{code:"Франчайзинг", url:"/?menu=6&submenu=3"},{code:"Century 21 В Мире", url:"/?menu=6&submenu=4"} ] }];