/*
* Script:       JSLibrary
* Version:      0.11
* Date:         12.04.2005
*
* Autor:        Boris Belenski
* Email:        b_belenski [ @ t ] yahoo [ d 0 t ] com
*/

function browserCheck()
{
this.op = (window.opera)?1:0;
this.op5 = (_ual.indexOf('opera 5')!=-1 || _ual.indexOf('opera/5')!=-1)?1:0;
this.op6 = (_ual.indexOf('opera 6')!=-1 || _ual.indexOf('opera/6')!=-1)?1:0;
this.opo = (this.op && !(this.op5 || this.op6))?1:0;
this.op56 = (this.op5 || this.op6)?1:0;
this.op7 = (this.op && document.readyState)?1:0;
this.dom = (document.getElementById)?1:0;
this.ie = (document.all && !this.op)?1:0;
this.ie4 = (this.ie && !this.dom)?1:0;
this.ie5u = (this.ie && this.dom)?1:0;
this.ns4 = (document.layers && !this.dom)?1:0;
this.com = (( this.dom || this.ie4 ) && !this.op56)?1:0;
this.dio = (this.dom || this.ie4)?1:0; //return this;
}
function getImage(_id) { return isBr.dom?document.getElementById(_id):isBr.ns4?document.images[_id]:isBr.ie4?document.all[_id]:0; }
function getLink(_id) { return isBr.dom?document.getElementById(_id):isBr.ns4?document.links[_id]:isBr.ie4?document.all[_id]:0; }
function getLayer(_id,_d) { if(isBr.dom) return document.getElementById(_id); if(isBr.ie) return document.all[_id]; if(isBr.ns4) { _d=(!_d)?(document.layers):(_d.layers); _o = 0; for(_i = 0;_i < _d.length;_i++) { if(_d[_id]) return _d[_id]; if(_d.length > 0) { _o = getLayer(_id,_d[_i]); if(_o) return _o; }}} return 0; }
function checkEmail(_e) { return e_email.test(_e) }
function setStatus(txt) { self.status=txt; return true; }
function writeToLayer(_id,_t) { var _o = getLayer(_id); if (isBr.dom||isBr.ie4) { _o.innerHTML = ''; _o.innerHTML = _t; } else if (isBr.ns4) { _o.document.open(); _o.document.write(_t); _o.document.close(); }}

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 isNaNP (v) { return ( v==null || typeof(v)=="undefined" || isNaN(val) ) }

function antiSpam(_d,_e,_u1,_t,_ex,_u2,_ls) { var _tv=_u1+isEmpty(_u2,'')+'@'+_d+'.'+_e; _t=isEmpty(_t)?_tv:_t; document.write('<a href="mai'+'lto:'+_tv+(isEmpty(_ex)?'':('?'+_ex))+'" '+(isEmpty(_ls)?'':(_ls.indexOf(':')!=-1?('style="'+_ls+'"'):('class="'+_ls+'"')))+'>'+_t+'</a>'); }

function preloadImeges(_il)
{
  var _tv=_il.split(',');
  for (var i=0;i<_tv.length;i++)
  {
    _pil[_pil.length]=new Image();
    _pil[_pil.length-1].src=_tv[i];
  }
}

var e_date = /^(\d{1,2})[-\.\/\b](\d{1,2})[-\.\/\b](\d{2,4})$/, pwin = 0, wLoc = new String(window.location), _ual = navigator.userAgent.toLowerCase(), isBr = new browserCheck(), _pil=new Array();
var e_email = /[_a-z0-9\-]+(\.[_a-z0-9\-]+)*@[a-z0-9\-]+(\.[a-z0-9\-]+)*(\.[a-z]{2,4})/ig;












