function open() {var obj=document.getElementById('list');
if (obj.style.display=='none') obj.style.display='block';
else obj.style.display='none';} // открытие блоков

function getBrowserInfo() {// определение браузера
var t,v = undefined;if (window.opera) t='Opera';
else if (document.all) {t='IE'; var nv=navigator.appVersion; var s=nv.indexOf('MSIE')+5; v=nv.substring(s,s+1);}
else if (navigator.appName) t='Netscape'; return {type:t,version:v};}

function bookmark(a){// сохранить в закладки
var url = window.document.location; var title = window.document.title; var b = getBrowserInfo();
if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
else if (b.type == 'Opera') {a.href = url; a.rel = "sidebar"; a.title = title; return true;}
else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
else if (document.all) {window.external.AddFavorite(url,title);}
else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки."); return false;}

function bmpic (z) {// скрыть-открыть запоминалки
if (z==1) document.getElementById('bl').style.display='none';
if (z==2) document.getElementById('bm').style.display='none';
if (z==3) document.getElementById('bl').style.display='block';
if (z==4) document.getElementById('bm').style.display='block';
if (z==5) bookmark(this);}

function menul(id) {// скрипт открытия основного меню
if (id==10) document.getElementById('menu').style.display='block';
else document.getElementById('menu').style.display='none';
if (id==1) document.getElementById('obrsvaz').style.display='block';
else document.getElementById('obrsvaz').style.display='none';
if (id==2) document.getElementById('pacientam').style.display='block';
else document.getElementById('pacientam').style.display='none';
if (id==3) document.getElementById('stat').style.display='block';
else document.getElementById('stat').style.display='none';
if (id==4) document.getElementById('services').style.display='block';
else document.getElementById('services').style.display='none';
if (id==5) document.getElementById('svedenia').style.display='block';
else document.getElementById('svedenia').style.display='none';
if (id==6) document.getElementById('inform').style.display='block';
else document.getElementById('inform').style.display='none';
if (id==7) document.getElementById('links').style.display='block';
else document.getElementById('links').style.display='none';}

function mnenia(link,r,n,nn) {// раскрытие доп. мнений
document.getElementById(link).style.display='none';
for (m=n;m<nn;m++) document.getElementById(m).style.display='block';
if (r>0) document.getElementById(r).style.display='block';
if (nn==50) document.getElementById(200).style.display='block';}

function fotogo(idfo,h) {for (e=0;e<h;e++) // фотографии
if (e==idfo) document.getElementById(e).style.display='block';
else document.getElementById(e).style.display='none';}

function openon() {var obj=document.getElementById('liston');
if (obj.style.display=='none') obj.style.display='block';
else obj.style.display='none';} // открытие блоков еще

function privet() {var h=(new Date()).getHours(); // привет
if (h > 23 || h < 6) document.write('Доброй ночи!');
if (h >= 6 && h < 9) document.write('Доброе утро!');
if (h >= 10 && h < 18) document.write('Добрый день!');
if (h >= 18 && h < 24) document. write('Добрый вечер!');}

function check() {var len=document.getElementById("my_area").value.length;
if (len>2) document.getElementById('list').style.visibility="visible";
else document.getElementById('list').style.visibility="hidden";}
function let(obj){f=document.getElementById('dr').style; // проверка длины
if(obj.value!='6') f.display='none'; else f.display='block';} // текста

function mail() {mail_str = "mailto:?subject= dgp10chel.ru: "; // письмо
mail_str += "&body= " + location.href; location.href = mail_str;} // друзьям

var speed = 100; var pause = 1000; // текст в строке состояния
var timerID = null; var bannerRunning = false; var ar = new Array()
ar[0] = "МБУЗ Детская городская поликлиника №10, город Челябинск."
ar[1] = "Оказание амбулаторно-поликлинической помощи детям до 18 лет по полису ОМС."
ar[2] = "Официальный сайт МБУЗ ДГП №10, город Челябинск."
ar[3] = "Расписание, информация стола справок, запись на прием и много полезного."
var currentMessage = 0; var offset = 0; function stopBanner() {
if (bannerRunning) clearTimeout(timerID); bannerRunning = false }
function start() {stopBanner(); showBanner()}
function showBanner() {var text = ar[currentMessage];
if (offset < text.length) {if (text.charAt(offset) == " ") offset++ 
var partialMessage = text.substring(0, offset + 1) 
window.status = partialMessage
offset++ 
timerID = setTimeout("showBanner()", speed)
bannerRunning = true } else { offset = 0
currentMessage++
if (currentMessage == ar.length) currentMessage = 0
timerID = setTimeout("showBanner()", pause)
bannerRunning = true }}
 
function bmark(u,t){if(!u)u=location.href;if(!t)t=document.title;u=encodeURIComponent(u);t=encodeURIComponent(t);
var s=new Array('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+u+'&title='+t+'" title="Сохранить закладку в Google"','http://memori.ru/link/?sm=1&u_data[url]='+u+'&u_data[name]='+t+'" title="Сохранить закладку в Memori.ru"','http://www.mister-wong.ru/index.php?action=addurl&bm_url='+u+'&bm_description='+t+'" title="Сохранить закладку в Мистер Вонг"','http://www.designfloat.com/submit.php?url='+u+'" title="Float it!"','http://delicious.com/save?url='+u+'&title='+t+'" title="Сохранить закладку в Delicious"','http://technorati.com/faves?add='+u+'&title='+t+'" title="Добавить в Technorati"','http://bobrdobr.ru/add.html?url='+u+'&title='+t+'" title="Забобрить"','http://digg.com/submit?url='+u+'" title="Добавить в Digg"','http://www.stumbleupon.com/submit?url='+u+'&title='+t+'" title="Добавить в StumbleUpon"','http://www.evernote.com/clip.action?url='+u+'&title='+t+'" title="Добавить в Evernote"','http://reddit.com/submit?url='+u+'&title='+t+'" title="Добавить в Reddit"','http://www.linkedin.com/shareArticle?mini=true&url='+u+'&title='+t+'" title="Добавить в Linkedin"','http://zakladki.yandex.ru/newlink.xml?url='+u+'&name='+t+'" title="Добавить в Яндекс.Закладки"');for(i=0;i<s.length;i++)document.write('<a style="display:inline-block;width:32px;height:32px;margin:0 7px 0 0;background:url(http://'+window.location.hostname+'/pictures/icons1.png) -'+32*i+'px 0" href="'+s[i]+'" target="_blank"></a>')}
function givelink(u,t){if(!u)u=location.href;if(!t)t=document.title;u=encodeURIComponent(u);t=encodeURIComponent(t);var s=new Array('http://vkontakte.ru/share.php?url='+u+'" title="Поделиться ВКонтакте"','http://twitter.com/home?status='+t+' - '+u+'" title="Добавить в Twitter"','http://www.facebook.com/sharer.php?u='+u+'&t='+t+'" title="Поделиться в Facebook"','http://www.google.com/buzz/post?message='+t+'&url='+u+'" title="Добавить в Google Buzz"','http://www.friendfeed.com/share?title='+t+' - '+u+'" title="Добавить в FriendFeed"','http://connect.mail.ru/share?share_url='+u+'" title="Поделиться в Моем Мире"','http://www.livejournal.com/update.bml?event='+u+'&subject='+t+'" title="Опубликовать в LiveJournal"','http://designbump.com/node/add/drigg/?url='+u+'&title='+t+'" title="Bump it!"','http://www.odnoklassniki.ru/dk?st.cmd=addShare&st._surl='+u+'&title='+t+'" title="Добавить в Одноклассники"');for(i=0;i<s.length;i++)document.write('<a style="display:inline-block;width:32px;height:32px;margin:0 7px 0 0;background:url(http://'+window.location.hostname+'/pictures/icons2.png) -'+32*i+'px 0" href="'+s[i]+'" target="_blank"></a>')}

