  var cot_tl_theLogo = "";
  var Ovr2='';
  var baseURL="http://www.capitaller.ru/"
//  var baseURL="http://localhost/corp/"
  function SetupPos(LabelPOS, small, id, col)
  {
    if (typeof(LabelPOS)==null)
      LabelPOS = 'rb';
	  cot_tl_theLogo = baseURL+"logo/logo.gif?cfid="+id+"&it=100&lp="+LabelPOS+"&lc="+col;
	  switch(LabelPOS)
	  {
	    case 'rb':
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
	      }
	      else
	      {
		      cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
	      }
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop-60+document.documentElement.clientHeight-this.clientHeight);}";
	      }
	      else
	      {
		      cot_t1_DOCtp2="_top:expression(document.body.scrollTop-60+document.body.clientHeight-this.clientHeight);}";
	      }
	    break;
	    case 'lb':
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_right:expression(document.documentElement.scrollRight + document.documentElement.clientWidth - offsetWidth);}";
	      }
	      else
	      {
		      cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_right:expression(document.body.scrollRight + document.body.clientWidth - offsetWidth);}";
	      }
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop-60+document.documentElement.clientHeight-this.clientHeight);}";
	      }
	      else
	      {
		      cot_t1_DOCtp2="_top:expression(document.body.scrollTop-60+document.body.clientHeight-this.clientHeight);}";
	      }
	    break;
	    case 'rt':
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+(this.clientHeight-this.clientHeight));_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
	      }
	      else
	      {
		      cot_t1_DOCtp="_top:expression(document.body.scrollTop+(this.clientHeight-this.clientHeight));_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
	      }
	      if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
	      {
		      cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop+60+(this.clientHeight-this.clientHeight));}";
	      }
	      else
	      {
		      cot_t1_DOCtp2="_top:expression(document.body.scrollTop+60+(this.clientHeight-this.clientHeight));}";
	      }
	    break;
	  }
	  if (small)
			cot_tl_theLogo += "&ls=s";
	  var cot_bgf0=(window.location.protocol.toLowerCase()=="https:")? "" : "";
	  var cot_tl_bodyCSS='* html {background-repeat: repeat;background-position: right bottom;}';
	  var	cot_tl_fixedCSS='#cot_tl_fixed{position:fixed;';
	  var cot_tl_fixedCSS=cot_tl_fixedCSS+'_position:absolute;';
	  var cot_tl_fixedCSS=cot_tl_fixedCSS+'bottom:0px;';
	  var cot_tl_fixedCSS=cot_tl_fixedCSS+ (LabelPOS != 'lb'?'right:0px;':'left:0px;');
	  var cot_tl_fixedCSS=cot_tl_fixedCSS+'clip:rect(0 100 100 0);';
	  var cot_tl_fixedCSS=cot_tl_fixedCSS+cot_t1_DOCtp;
	  var cot_tl_popCSS='#cot_tl_pop {background-color: transparent;';
	  var cot_tl_popCSS=cot_tl_popCSS+'position:fixed;';
	  var cot_tl_popCSS=cot_tl_popCSS+'_position:absolute;';
	  var cot_tl_popCSS=cot_tl_popCSS+'height: 355px;';
	  var cot_tl_popCSS=cot_tl_popCSS+'width: 258px;';
	  var cot_tl_popCSS=cot_tl_popCSS+ (LabelPOS != 'lb'?'right:60px;':'left:60px;');
	  var cot_tl_popCSS=cot_tl_popCSS+'bottom: 60px;';
	  var cot_tl_popCSS=cot_tl_popCSS+'overflow: hidden;';
	  var cot_tl_popCSS=cot_tl_popCSS+'visibility: hidden;';
	  var cot_tl_popCSS=cot_tl_popCSS+'z-index: 100;';
	  var cot_tl_popCSS=cot_tl_popCSS+cot_t1_DOCtp2;

	  document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixedCSS+cot_tl_popCSS+'</style>');
  }	

	var div_over = false;
	
	function cot_tl_bigPopup(url)
	{
		newwindow=window.open(url,'name','width=100%,height=360,frameborder=0,marginwidth=0,marginheight=0,scrolling=no,allowtransparency=true');
		if(window.focus)
		{
			newwindow.focus()
		}
		return false;
	}
	function cot_tl_toggleMiniPOPUP_hide()
	{
	  if (div_over)
			return;
		var cred_id='cot_tl_pop';
		var NNtype='hidden';
		var IEtype='hidden';
		var WC3type='hidden';
		if(document.getElementById)
		{
			eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");
		}
		else
		{
			if(document.layers)
			{
				document.layers[cred_id].visibility=NNtype;
			}
			else
			{
				if(document.all)
				{
					eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");
				}
			}
		}
	}
	function cot_tl_toggleMiniPOPUP_show()
	{
		cred_id='cot_tl_pop';
		var NNtype='show';
		var IEtype='visible';
		var WC3type='visible';
		if(document.getElementById)
		{
			eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");
		}
		else
		{
			if(document.layers)
			{
				document.layers[cred_id].visibility=NNtype;
			}
			else
			{
				if(document.all)
				{
					eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");
				}
			}
		}
	}
	function COT(fid)
	{
		var cot_tl_myLocation=location.host;
		var cot_tl_miniBaseURL= baseURL+'BannerPublic.aspx?fid='+fid;
//		alert(cot_tl_miniBaseURL)
		document.write('<div id="cot_tl_pop" onMouseOver="div_over=true;" onMouseOut="div_over=false;Ovr3=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',1000);clearTimeout(Ovr)">');
		document.write('<iframe src="'+cot_tl_miniBaseURL+'" width=100% height=355 frameborder=0 marginwidth=0 marginheight=0 scrolling=no allowtransparency=true id=iFrameClass></iframe>');
		document.write('</div>');
		document.write('<div id="cot_tl_fixed">');
		document.write('<a href="https://www.capitaller.ru" target="_blank"><img src='+cot_tl_theLogo+' alt="managed by capitaller" border="0" onMouseOver="Ovr=setTimeout(\'cot_tl_toggleMiniPOPUP_show()\',1000);clearTimeout(Ovr2)" onMouseOut="Ovr2=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',3000);clearTimeout(Ovr)"</a>');
		document.write('</div>');
	}
	function COT2(fid)
	{
		var cot_tl_myLocation=location.host;
		var cot_tl_miniBaseURL=baseURL+'BannerPublic.aspx?fid='+fid;
		document.write('<div id="cot_tl_pop" onMouseOver="div_over=true;" onMouseOut="div_over=false;Ovr3=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',1000);clearTimeout(Ovr)">');
		document.write('<iframe src="'+cot_tl_miniBaseURL+'" width=100% height=355 frameborder=0 maeginwidth=0 marginheight=0 scrolling=no allowtransparency=true id=iFrameClass></iframe>');
		document.write('</div>');
	}
	function COTSetup(fid, Pos)
	{
		SetupPos(Pos, false, fid, "gray");
		var cot_tl_myLocation=location.host;
		var cot_tl_miniBaseURL= baseURL+'BannerPublic.aspx?fid='+fid;
//		alert(cot_tl_miniBaseURL)
		document.write('<div id="cot_tl_pop" onMouseOver="div_over=true;" onMouseOut="div_over=false;Ovr3=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',1000);clearTimeout(Ovr)">');
		document.write('<iframe src="'+cot_tl_miniBaseURL+'" width=100% height=355 frameborder=0 marginwidth=0 marginheight=0 scrolling=no allowtransparency=true id=iFrameClass></iframe>');
		document.write('</div>');
		document.write('<div id="cot_tl_fixed">');
		document.write('<a href="https://www.capitaller.ru" target="_blank"><img src='+cot_tl_theLogo+' alt="managed by capitaller" border="0" onMouseOver="Ovr=setTimeout(\'cot_tl_toggleMiniPOPUP_show()\',1000);clearTimeout(Ovr2)" onMouseOut="Ovr2=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',3000);clearTimeout(Ovr)"</a>');
		document.write('</div>');
	}
	function COTSetup(fid, Pos, small, color)
	{
		SetupPos(Pos, small, fid, color);
		var cot_tl_myLocation=location.host;
		var cot_tl_miniBaseURL= baseURL+'BannerPublic.aspx?fid='+fid;
//		alert(cot_tl_miniBaseURL)
		document.write('<div id="cot_tl_pop" onMouseOver="div_over=true;" onMouseOut="div_over=false;Ovr3=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',1000);clearTimeout(Ovr)">');
		document.write('<iframe src="'+cot_tl_miniBaseURL+'" width=100% height=355 frameborder=0 marginwidth=0 marginheight=0 scrolling=no allowtransparency=true id=iFrameClass></iframe>');
		document.write('</div>');
		document.write('<div id="cot_tl_fixed">');
		document.write('<a href="https://www.capitaller.ru" target="_blank"><img src='+cot_tl_theLogo+' alt="managed by capitaller" border="0" onMouseOver="Ovr=setTimeout(\'cot_tl_toggleMiniPOPUP_show()\',1000);clearTimeout(Ovr2)" onMouseOut="Ovr2=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',3000);clearTimeout(Ovr)"</a>');
		document.write('</div>');
	}
