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( inc,0); if(curr >= window.frames[frm].document.body.offsetWidth) { direction = 1; curr = window.frames[frm].document.body.offsetWidth; } } else if (direction == 1) { curr -= inc; window.frames[frm].scrollBy(-inc,0); if(curr <= 0) { direction = 0; curr = 0; } } //else window.frames[frm].scrollBy(inc, 0); timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20); } } function getPosition(element) { var left = 0; var top = 0; /*On récupère l'élément*/ var e = document.getElementById(element); /*Tant que l'on a un élément parent*/ while (e.offsetParent != undefined && e.offsetParent != null) { /*On ajoute la position de l'élément parent*/ left += e.offsetLeft + (e.clientLeft != null ? e.clientLeft : 0); top += e.offsetTop + (e.clientTop != null ? e.clientTop : 0); e = e.offsetParent; } return new Array(left,top); } function C21start() { tt_Prepare('main2ft',"Найдите интересующий вас объект недвижимости…","Введите город, адрес или название жилого комплекса…","Напишите здесь метро или id объекта…","Введите имя, фамилию или ID номер агента CENTURY 21, чтобы найти его …","ЖК Измайловский","ул. Тверская-Ямская","Маяковская","Панин"); if(document.getElementById('hotprop')) { scroll_iframe('hotprop',1); } if(document.getElementById('vhotprop')) { vscroll_iframe('vhotprop',1); } } var hl; function hot_left() { hl=0; setTimeout("hot_left_tm()",20); } function hot_left_tm() { window.frames['hotprop'].scrollBy( -9,0); hl=hl-5; if(hl>-160) setTimeout("hot_left_tm()",20); } var hr; function hot_right() { hr=0; setTimeout("hot_right_tm()",20); } function hot_right_tm() { window.frames['hotprop'].scrollBy( 9,0); hr=hr+5; if(hr<160) setTimeout("hot_right_tm()",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'); } // var tt_parent; function tt_Prepare(idel,t1,t2,t3,t4,b1,b2,b3,b4) { var el=document.getElementById(idel); if(el) { var btc=document.createElement("span"); btc.id=idel+"_btc"; btc.setAttribute("id",idel+"_btc"); btc.style.position="absolute"; document.getElementsByTagName("body")[0].appendChild(btc); // var tooltip=tt_CreateEl("span","tooltip"); var tooltip=tt_CreateEl("span","tooltipOneLine"); t="
"; tooltip.innerHTML=t; tt_setOpacity(tooltip); el.tooltip=tooltip; // el.onmouseover=tt_showTooltip; // el.onmouseout=tt_hideTooltip; // el.onmousemove=tt_Locate; var btc=document.getElementById(el.id+"_btc"); btc.appendChild(el.tooltip); tt_Update(idel,0,t1,t2,t3,t4,b1,b2,b3,b4); } } function tt_Update(idel,n,t1,t2,t3,t4,b1,b2,b3,b4) { var s='',t=''; if(n>3) { n=0; } if(n==0) { s=t1; t=b1; } else if(n==1) { s=t2; t=b2; } else if(n==2) { s=t3; t=b3; } else { s=t4; t=b4; } if(s.length==0) { tt_Update(idel,n+1,t1,t2,t3,t4,b1,b2,b3,b4); } else { while(s.search(" ")>=0) { s=s.replace(" "," "); } document.getElementById('tooltip_text_'+idel).innerHTML=s; var f = document.getElementById('MAIN2F'); if(f) { if(f.value>0) { document.getElementById('main2ft').value=t; } } tt_Locate(idel); setTimeout("tt_Update('"+idel+"',"+(n+1)+",'"+t1+"','"+t2+"','"+t3+"','"+t4+"','"+b1+"','"+b2+"','"+b3+"','"+b4+"')",5000); } } function tt_Remove(idel) { var el=document.getElementById(idel); if(el) { var btc=document.getElementById(el.id+"_btc"); btc.style.visibility = 'hidden'; } } function tt_Locate(idel) { var btc=document.getElementById(idel+"_btc"); var w=document.getElementById('tooltip_text_'+idel).offsetWidth; document.getElementById('tooltip_center_'+idel).style.width=(w-22)+"px"; document.getElementById('tooltip_right_'+idel).style.left=(w+20)+"px"; btc.style.width=(w+57)+"px"; var pos=getPosition(idel); btc.style.top=(pos[1]-35)+"px"; // btc.style.left=(pos[0]+document.getElementById(idel).offsetWidth-200)+"px"; btc.style.left=(pos[0])+"px"; } function tt_setOpacity(el) { el.style.filter="alpha(opacity:95)"; el.style.KHTMLOpacity="0.95"; el.style.MozOpacity="0.95"; el.style.opacity="0.95"; } function tt_CreateEl(t,c) { var x=document.createElement(t); x.className=c; x.style.display="block"; return(x); }