function browseIt()
{
	this.ver = navigator.appVersion.toLowerCase();
	this.verNum = parseInt(this.ver);
	this.agent = navigator.userAgent.toLowerCase();
	this.dom = (document.getElementById ? 1 : 0);
	this.opera = (this.agent.indexOf("opera") > -1 && this.dom ? 1 : 0);
	this.opera7 = (this.opera && this.verNum >= 7);
	this.opera9 = (this.opera && this.verNum >= 9);
	this.ie = (this.ver.indexOf("msie") > -1 && this.dom && !this.opera ? 1 : 0);
	this.ieVer = 0;
	if (this.ie) {
		var pos = this.ver.indexOf("msie");
		if (pos != -1)
			this.ieVer = parseFloat(this.ver.substr(pos + 5));
	}
	this.ie6 = (this.ie && (this.ieVer >= 6));
	this.ie6only = (this.ie && (this.ieVer >= 6) && (this.ieVer < 7));
	this.ie7 = (this.ie && (this.ieVer >= 7));
	this.macOS = (this.agent.indexOf("mac") > -1);
	this.mac = (this.macOS && this.verNum >= 7 ? 1 : 0);
	this.moz = (this.agent.indexOf("gecko") > -1);
	this.ns6 = (this.dom && this.agent.indexOf("netscape") > -1 && this.verNum >= 5 ? 1 : 0);
	this.ff = (this.agent.indexOf("firefox") > -1);
	this.b = (this.ie || this.ns6 || this.opera7 || this.mac || this.moz || this.dom);

	return this;
}

var b = new browseIt();

var speed_k = 800; //pixels per second for 1000 pixels height
var steps = 20; //number of steps for jump

var c = 0; var height = 1000;  var step_height;  var step_time;  function MoveUp()  {  c = 0;  height = document.documentElement.clientHeight; if(height < document.body.scrollHeight)  height = document.body.scrollHeight; speed = speed_k*(height/1000);     step_height = height/steps;     step_time = (height/speed)/steps;     _MoveUp();   }   function _MoveUp(){ c++; if(c<steps) { window.scrollBy(0,-step_height); setTimeout(function () { _MoveUp()}, step_time);  }   }

window.onload = function () { 
  $('#cphone2').text('+'+'3'+' '+'8'+' '+'0'+'6'+'7'+' '+'6'+'6'+'5'+' '+'1'+'1'+' '+'5'+'0');
  $('#cmail2').html('i'+'n'+'f'+'o'+'<span class="small_dog">@</span>'+'e'+'l'+'i'+'t'+'e'+'-'+'s'+'t'+'y'+'l'+'e'+'.'+'c'+'o'+'m'+'.'+'u'+'a');
  if(typeof makeTableRowsHiglightableInMSIE == 'function')
    makeTableRowsHiglightableInMSIE();
}

function ShowMail()
{
  if(document.getElementById("cmail"))
    $('#cmail').html('i'+'n'+'f'+'o'+'<span class="small_dog">@</span>'+'e'+'l'+'i'+'t'+'e'+'-'+'s'+'t'+'y'+'l'+'e'+'.'+'c'+'o'+'m'+'.'+'u'+'a');
  else
    setTimeout(function(){ShowMail()},50);
}

function ShowPhone()
{
  if(document.getElementById("cphone"))
    $('#cphone').text('+'+'3'+' '+'8'+' '+'0'+'6'+'7'+' '+'6'+'6'+'5'+' '+'1'+'1'+' '+'5'+'0');
  else
    setTimeout(function(){ShowPhone()},50);
}


ShowPhone();

ShowMail();

function AddToFavorit() { if(b.ie){window.external.AddFavorite('http://www.best-site.com.ua','Best Site - помощь тем, кому нужен успешный сайт');return false}else if(b.moz||b.ns6){alert('Нажмите Ctrl-D');return false;}else if(b.opera)return true;else return false;};

function ShowDescription(el)
{
   var parent;
   parent = $(el).parent();

   if(!parent.children('.whiteline').length) parent.append('<div class="whiteline"><img src="/img/0.gif" height="1" width="1"></div><div class="greyline"><img src="/img/0.gif" height="1" width="1"></div>');

   child = null;
   if(b.ie)
   {
     child = parent.children('.appear_description').children();
     if(child.length>0) child.css("visibility","hidden")
   }
   parent.children('.whiteline').hide();
   parent.children('.greyline').show(500,function()
	{ 
          parent.children('.appear_description').slideToggle('slow',function()
		{ 
                  if(b.ie && child && child.length>0) child.css("visibility","visible");
        	  parent.children('.greyline').hide(500,function()
			{
			   parent.children('.whiteline').show('',function(){
				});
			});
		});
	});
}

var myimages=new Array()

function PreloadImages()
{
  for(i=0;i<PreloadImages.arguments.length;i++)
  {
    myimages[i]=new Image();
    myimages[i].src=PreloadImages.arguments[i];
  }
}

PreloadImages("/img/up_over.gif");