function showtelefon ()
	{
		var echo,i;
        var div_top = (document.body.clientHeight - 300)/2;
        // Internet explorer 6 hack
        if ( window.navigator != null )
        {
            if ( window.navigator.appName == 'Microsoft Internet Explorer' )
            {
              var sBrowser = window.navigator.userAgent.substr( window.navigator.userAgent.indexOf('MSIE ')+5, 3 );
              if ( sBrowser == '6.0' ) // holy shit!
                div_top = 200;
            }
        }
        // END OF Internet explorer 6 hack
        if ( div_top < 0 )
            div_top = 0;
		var h=document.getElementById('innbox').offsetHeight;
		echo='<div id="overlay" style="height: '+h+'px; opacity: 0.5; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);" onclick="closetelefon();"></div>';0;

		echo+='<div id="lightbox" style="top:'+div_top+'px;"><div id="ImageContainer"><div id="bottomNav"><img src="/images/x.gif" alt="Закрыть" onclick="closetelefon();"></div><table class="pophonetab"><tr><td width="40%"><h2>Отдел продаж</h2></td><td width="20%">&nbsp;</td><td width="40%"><h2>Разработка сайтов</h2></td></tr>';
        //echo+="<tr><td><p>(495) <span>771-53-97</span><br>(495) <span>361-69-90</span><br>(495) <span>957-78-54</span> - факс</p></td><td><p>(495) <span>361-69-90</span><br>(926) <span>524-33-23</span><br>(926) <span>519-62-30</span></p></td><td><p>(495) <span>748-83-27</span><br>(495) <span>361-69-90</span></p></td></tr></table></div></div>';

        echo+='<tr><td><p>';
        for ( i = 0; i < phonez26.length; i+=3 )
        {
            echo += '('+phonez26[i]+') ' + '<span>' + phonez26[i+1] + '</span> ' + phonez26[i+2] + '<br/>';
        }
        echo+='</p></td>';
        echo+='<td width="20%">&nbsp;</td>';
        echo+='<td><p>';
        for ( i = 0; i < phonez27.length; i+=3 )
        {
            echo += '('+phonez27[i]+') ' + '<span>' + phonez27[i+1] + '</span> ' + phonez27[i+2] + '<br/>';
        }
        echo+='</p></td>';
        echo+='</tr>';

        echo+='<tr><td colspan="3" width="100%">&nbsp;</td></tr>';
        echo+='<tr><td colspan="3" width="100%">&nbsp;</td></tr>';
        echo+='<tr><td width="40%"><h2>Техническая поддержка</h2></td><td width="20%">&nbsp;</td><td width="40%"><h2>Продвижение сайтов</h2></td></tr>';
        echo+='<tr><td><p>';
        for ( i = 0; i < phonez28.length; i+=3 )
        {
            echo += '('+phonez28[i]+') ' + '<span>' + phonez28[i+1] + '</span> ' + phonez28[i+2] + '<br/>';
        }
        echo+='</p></td>';
        echo+='<td width="20%">&nbsp;</td>';
        echo+='<td><p>';
        for ( i = 0; i < phonez29.length; i+=3 )
        {
            echo += '('+phonez29[i]+') ' + '<span>' + phonez29[i+1] + '</span> ' + phonez29[i+2] + '<br/>';
        }
        echo+='</p></td>';
        echo+='</tr>';

		document.getElementById('telefon').innerHTML=echo;
	}

function closetelefon ()
	{
		document.getElementById('telefon').innerHTML='';
	}


 function imgView(href,w,h)
{	
	var mat = 60;
   	var maxwidth = screen.width;
	var maxheight = screen.height;
	var top = Math.max(Math.floor((screen.height - (h + mat)) / 2), 10);	
	var left = Math.max(Math.floor((screen.width - (w + mat)) / 2), 10);
	var param = 'top=' + top + ',left=' + left + ',Toolbar=0, ocation=0, Directories=0, Status=0, Menubar=0, Resizable=0';
	if (w <= maxwidth && h <= maxheight) param += ',scrollbars=0';
	else { param += ',scrollbars=1'; w += 20; h += 20; }
	if(w > maxwidth) w = maxwidth; else w += mat;
	param  = param + ',width=' + w;
	if(h > maxheight) h = maxheight; else h += mat;
	param = param + ',height=' + h;

	imgWin = window.open('', '_blank', param);
	imgWin.opener = window;
	imgWin.resizeTo(w,h);
    imgWin.document.open("text/html");
	
	imgWin.document.writeln("<html>");
    imgWin.document.writeln("<head><title>LuxSite.ru</title></head>");
    imgWin.document.writeln("<body style='margin:0; width:100%; height:100%; padding:0; background-color:#fff;'>");
	imgWin.document.writeln("<table style='border-collapse:collapse; margin:0; padding:0; width:100%; height:100%;'>");
	imgWin.document.writeln("<tr>");
	imgWin.document.writeln("<td style='margin:0; padding:0; width:100%; height:100%; text-align:center; vertical-align:middle;'>");
    imgWin.document.writeln('<img src='+href+' onclick="parent.close()" style=cursor:hand;>');
	imgWin.document.writeln("</td></tr></table>");
	imgWin.document.write("</body>");
    imgWin.document.write("</html>");	
	imgWin.focus();
}
