function zamien(t) {
  regexp = eval("/,/g");
  t.value = t.value.replace(regexp,".");
}

var form,f;
function showRegister() {
  form = document.F_REGISTER;
       form.action='http://www.netbrokers.pl/netbrokers/servlet/netbrokers';
       form.PAGE.value='COMPANY_SELECTION';
       form.STATE.value='NEW_COMPANY';
       form.USERNAME.value='';
       form.NEW_COMPANY.value='zatwierdz';

        f = window.open("http://www.netbrokers.pl/netbrokers/servlet/netbrokers", "f", "toolbar=0,location=0,resizable=0,directories=0,status=0,menubar=0,scrollbars=0,height=1,width=1");
  f.blur();
       id=setTimeout('r()',100);
       showMore();
}
function r()
{
 f.close();
 form.submit();
}
function showMore()
{
       window.open("http://www.netbrokers.pl/nbadmin/info.html", "NetBrokers_inforamcje", "toolbar=0,location=0,resizable=0,directories=0,status=0,menubar=0,scrollbars=0,height=300,width=400");
}
function showRegisterForm() {
  var form = document.F_LOGIN;
  form.method = 'POST';
  form.PAGE.value = 'COMPANY_SELECTION';
  form.COMPANY_CODE.value = '';
  form.USERNAME.value = '';
  form.PASSWORD.value = '';
  form.submit();
}
function Login() {
  var form = document.F_LOGIN;
  form.method = 'POST';
  form.PAGE.value = 'LOGIN';
  form.LOGIN.value = 'Akceptuj';
  form.submit();
}

function handler(e) {
    var key;
    if (document.all) {
       e = window.event;
       key = e.keyCode;
    }
    if (key == 13){     
       Login();
    }
}

function displayWindow(url, width, height) {var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,left=10,top=10' );}

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
       newWindow = window.open("","newWindow","width="+imageWidth+", height="+imageHeight+", scrollbars=no, left="+posLeft+", top="+posTop);
       newWindow.document.open();
       newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF"  topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()"><A HREF="javascript:void(0);" onClick="window.close()">');
       newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\" border="0">');
       newWindow.document.write('</A></body></html>');
       newWindow.document.close();
       newWindow.focus();}
function findObj(n, d) { var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } 
function showLay() { var i,p,v,obj,args=showLay.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } obj.visibility=v; } }
function popOn(name) { hidePops(); showLay(name,'','show'); }
function popOff(name) { showLay(name,'','hide'); }
function hidePops() { popOff('pop1');popOff('pop2');popOff('pop3');popOff('pop4');popOff('pop5');popOff('pop6'); }
function imgOn() { var i,j=0,x,a=imgOn.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} }
function imgOff() { var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; }
function okno(theURL,winName,features) { window.open(theURL,winName,features); }
function wojOff(name) { showLay(name,'','hide'); }
function wojOn(name) { showLay(name,'','show'); }
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;}




var b_timer = null; // blink timer 
var b_on = true; // blink state 
var blnkrs = null; // array of spans 

function blink() { 
var tmp = document.getElementsByTagName("span"); 
if (tmp) { 
blnkrs = new Array(); 
var b_count = 0; 
for (var i = 0; i < tmp.length; ++i) { 
if (tmp[i].className == "blink") { 
blnkrs[b_count] = tmp[i]; 
++b_count; 
} 
} 
// time in m.secs between blinks 
// 500 = 1/2 second 
blinkTimer(750); 
} 
} 

function blinkTimer(ival) { 
if (b_timer) { 
window.clearTimeout(b_timer); 
b_timer = null; 
} 
blinkIt(); 
b_timer = window.setTimeout('blinkTimer(' + ival + ')', ival); 
} 

function blinkIt() { 
for (var i = 0; i < blnkrs.length; ++i) { 
if (b_on == true) { 
blnkrs[i].style.visibility = "hidden"; 
} 
else { 
blnkrs[i].style.visibility = "visible"; 
} 
} 
b_on =!b_on; 
}
