/*
Script:       JSLibrary lite (DOM)
Version:      0.21
Date:         24.03.2005

Autor:        Boris Belenski
Email:        b_belenski{@ t}yahoo{d o t}com
*/

// Object
function setStatus(t) { self.status = t; return true }
function formError (m,f,e) { alert(m); document.forms[f].elements[e].focus(); return false }

// Check
function browserCheck()
{
var ual = navigator.userAgent.toLowerCase();
this.op = (window.opera)?1:0;
this.op5 = ual.indexOf('opera 5')!=-1 || ual.indexOf('opera/5')!=-1;
this.op6 = ual.indexOf('opera 6')!=-1 || ual.indexOf('opera/6')!=-1;
this.op7 = this.op && document.readyState;
this.dom = (document.getElementById)?1:0;
this.ie4 = (document.all && !this.op && !this.dom)?1:0;
this.ie5u = (this.ie && this.dom)?1:0;
this.ie = this.ie4 && this.ie5u && ual.indexOf('msie');
this.ns4 = document.layers && !this.dom;
this.com = ( this.dom || this.ie4 ) && !this.opo;
this.opo = this.op5 || this.op6;
this.dio5 = this.dom || this.ie4 || this.op5 || this.op6;
return this;
}

function checkEmail(e) { var reg = /[_a-z0-9\-]+(\.[_a-z0-9\-]+)*@[a-z0-9\-]+(\.[a-z0-9\-]+)*(\.[a-z]{2,4})/ig; return reg.test(e) }
function isEmpty (_v,_r) { var _tv= (_v==null || typeof(_v)=="undefined" || _v==''); return ( _r==null || typeof(_r)=="undefined" )?_tv:(_tv?_r:_v) } // Проверка за празна _v. Ако е празна връща _r
function isNoValue (_v,_r) { var _tv=( _v==null || typeof(_v)=="undefined" ); return ( _r==null || typeof(_r)=="undefined" )?_tv:(_tv?_r:_v) } // Проверка за празна _v. Ако е празна връща _r
function isNaNP (v) { return ( v==null || typeof(v)=="undefined" || isNaN(val) ) }
function isLow (v,c) { c = (isNaNP(c)?0:c); return ( isNaNP(val) && v<c ) }
function isHigh (v,c) { c = (isNaNP(c)?0:c); return ( isNaNP(val) && v>c ) }
function isInRange (v,c1,c2) { c1=(isNaNP(c1)?0:c1); c2=(isNaNP(c2)?1:c2); if (c1>c2) return ( !isNaNP(v) && v >= c2 && val <= c1 ); return ( !isNaNP(val) && val >= c1 && val <= c2 ) }
function isDefined (vn) { return !eval( 'typeof( '+vn+' ) == "undefined"' ); }

// Other
function antiSpamAll()
{
  if( document.getElementsByTagName )
  {
    _tobjl=document.getElementsByTagName('a');
    for( var i=0; i < _tobjl.length; i++ )
    {
      _tobjl[i].href=_tobjl[i].href.replace('[at]','@').replace('[dot]','.');
      _tobjl[i].innerHTML=_tobjl[i].innerHTML.replace('[at]','@').replace('[dot]','.');
    }
  }
}

function appendCounters()
{
  var n=navigator.appName, a=document, b=screen, c="0", r="0";
  r=b.width;
  n!="Netscape"?c=b.colorDepth : c=b.pixelDepth;
  if( document.createElement )
  {
    var tobj=document.getElementById("webCounter"),cimg = document.createElement( "img" );
    cimg.src="http://counter.search.bg/cgi-bin/c?_id=decotex&amp;_r="+r+"&amp;_c="+c+"&amp;_l="+escape(parent.document.referrer);
    tobj.appendChild(cimg);
    var cimg2 = document.createElement( "img" );
    cimg2.src="http://counter.search.bg/cgi-bin/c?_id=snet&amp;_r="+r+"&amp;_c="+c+"&amp;_l="+escape(parent.document.referrer);
    tobj.appendChild(cimg2);
  }
}

// initialization
if (top!=self) top.location.href = self.location.href; // Disable InFrame View
var isBr = new browserCheck(), e_date = /^(\d{1,2})[-\.\/\b](\d{1,2})[-\.\/\b](\d{2,4})$/, pwin = 0, wLoc = new String(window.location);

