/*
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
/*
antiSpam(_d,_e,_u1,_t,_ex,_u2)
_d    Домейн
_e    Разширение (com,net...)
_u1   Потребителско име
_t    Текст на показване (ако липсва, се изписва email адреса)
_ex   Екстра/допълнение без ? отпред (body=...&subject=...)
_u2   Потребителско име (допълнение)
_ls   Style string (т.е. да има :) или class name
*/
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>'); }

// 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);

