/****************************************
* Script:       JSLibrary               *
* Version:      custom                  *
* Date:         28.03.2004              *
* License:      Freeware                *
*                                       *
* Autor:        Boris Belenski          *
* Email:        b_belenski@hotmail.com  *
****************************************/

function bw() { ual=navigator.userAgent.toLowerCase(); this.op=navigator.opera; this.opo=(ual.indexOf('opera 5')!=-1 || ual.indexOf('opera/5')!=-1 || ual.indexOf('opera 6')!=-1 || ual.indexOf('opera/6')!=-1); 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.cm=(this.dom||this.ie4)&&!this.opo?1:0; return this; }
function getImage(oId) { return is.dom?document.getElementById(oId):is.ns4?document.images[oId]:is.ie4?document.all[oId]:null; }
function getLink(oId) { return is.dom?document.getElementById(oId):is.ns4?document.links[oId]:is.ie4?document.all[oId]:null; }
function getLayer(oId) { return is.dom?document.getElementById(oId):is.ns4?document.layers[oId]:is.ie4?document.all[oId]:null; }
function checkEmail(em) { var reg = new RegExp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$","i"); if (reg.test(em)) return ""; else return "Моля, въведете валиден e-mail !\n";}
function setStatus(txt) { self.status=txt; return true; }
function writeToLayer(id,tx) { var obj=getLayer(id); if (is.dom||is.ie4) { obj.innerHTML = ''; obj.innerHTML = tx; } else if (is.ns4) { obj.document.open(); obj.document.write(tx); obj.document.close(); }}
function showWin(url,w,h) { if(pwin==0) pwin=window.open('', "pwin", 'width=25, height=25, top=15, left=15'); pwin.close(); pwin=window.open(url, "pwin", 'width='+w+', height='+h+', menubar=no, personalbar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, top=15, left=15');}
function showWinI(iurl,tit,w,h) { if(pwin==0) pwin=window.open('', "pwin", 'width=25, height=25, top=15, left=15'); pwin.close(); pwin=window.open('', "pwin", 'width='+w+', height='+h+', menubar=no, personalbar=no, resizable=no, scrollbars=no, status=no, toolbar=no, top=15, left=15');
pwin.document.write("<html><head><title>"+tit+"</title></head><body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><a href=\"javascript: self.close();\"><img src=\""+iurl+"\" width=\""+w+"\" height=\""+h+"\" border=\"0\"></a></body></html>");}
function showLayer(oId) {objL=getLayer(oId); if (is.ns4) objL.visibility="show"; else if (is.cm) { objL.style.display="block"; objL.style.visibility="visible";} }
function hideLayer(oId) {objL=getLayer(oId); if (is.ns4) objL.visibility="hidden"; else if (is.cm) { objL.style.display="none"; objL.style.visibility="hidden";} }
function isEmpty (v) { return ( v==null || v==undefined || v.length<1 ) }
function antiSpam(_d,_e,_u1,_t,_ex,_u2) { _tv=_u1+(isEmpty(_u2)?'':_u2)+'@'+_d+'.'+_e; _t=isEmpty(_t)?_tv:_t; document.write('<a href="mai'+'lto:'+_tv+(isEmpty(_ex)?'':('?'+_ex))+'">'+_t+'</a>'); }

var is=new bw(), pwin=0;




