    var buttonl =new Array();
    var buttons =new Array();
    var buttonp =new Array();
    var textl   =new Array();
    var texts   =new Array(); 
    var textp   =new Array();
    
    
    buttonl[0] = new Image();
    buttonl[0].src = "theme/gfx/buttonln.gif";
    buttonl[0].height="20";
    buttonl[1] = new Image();
    buttonl[1].src = "theme/gfx/buttonlo.gif";
    buttonl[1].height="20";
    
    buttons[0] = new Image();
    buttons[0].src = "theme/gfx/buttonsn.gif";
    buttons[0].height="20";
    buttons[1] = new Image();
    buttons[1].src = "theme/gfx/buttonso.gif";
    buttons[1].height="20";
  
    buttonp[0] = new Image();
    buttonp[0].src = "theme/gfx/buttonpn.gif";
    buttonp[0].height="20";
    buttonp[1] = new Image();
    buttonp[1].src = "theme/gfx/buttonpo.gif";
    buttonp[1].height="20";
    
    textl[0] = new Image();
    textl[0].src = "theme/gfx/textln.gif";
    textl[0].height="20";
    textl[1] = new Image();
    textl[1].src = "theme/gfx/textlf.gif";
    textl[1].height="20";
    
	
    texts[0] = new Image();
    texts[0].src = "theme/gfx/textsn.gif";
    texts[0].height="20";
    texts[1] = new Image();
    texts[1].src = "theme/gfx/textsf.gif";
    texts[1].height="20";
    
    textp[0] = new Image();
    textp[0].src = "theme/gfx/textpn.gif";
    textp[0].height="20";
    textp[1] = new Image();
    textp[1].src = "theme/gfx/textpf.gif";
    textp[1].height="20";
    
    
    

function roundBoxes() {
   var przyciski=document.getElementsByTagName('input');
   for (var i=0;i<przyciski.length;i++)
   {
      var l = document.createElement("img");
      l.id=przyciski[i].id+"l";
      l.name=przyciski[i].name+"l";
      l.src=buttonl[0].src;
      var p = document.createElement("img");
      p.src=buttonp[0].src;
      p.id=przyciski[i].id+"p";
      p.name=przyciski[i].name+"p";
      if (przyciski[i].type=='button' || przyciski[i].type=='submit' || przyciski[i].type=='reset' ){

	  przyciski[i].className="butto";
      
      przyciski[i].parentNode.insertBefore(l, przyciski[i]);
      insertAfter(p,przyciski[i]);
	  
	  przyciski[i].onmouseover=function (){ 

	  this.className='bove';

	  this.previousSibling.src=buttonl[1].src;
	  this.nextSibling.src=buttonp[1].src;}
	  
      przyciski[i].onmouseout=function (){ 

	  this.className='butto';

	  this.previousSibling.src=buttonl[0].src;
	  this.nextSibling.src=buttonp[0].src;}
      }
   }
  return przyciski;  
}

function roundBoxesId(id) {
  

   var przyciski=document.getElementsByTagName('input');
   
   for (var i=0;i<przyciski.length;i++)
   {
      //alert(przyciski[i].value);
      var l = document.createElement("img");
      l.id=przyciski[i].id+"l";
      l.name=przyciski[i].name+"l";
      l.src=buttonl[0].src;
      var p = document.createElement("img");
      p.src=buttonp[0].src;
      p.id=przyciski[i].id+"p";
      p.name=przyciski[i].name+"p";
      if (przyciski[i].id==id && (przyciski[i].type=='button' || przyciski[i].type=='submit' || przyciski[i].type=='reset' )){
      przyciski[i].className="butto";
      
	  
	  przyciski[i].parentNode.insertBefore(l, przyciski[i]);
      insertAfter(p,przyciski[i]);
	  
	  przyciski[i].onmouseover=function (){ 
	  this.className='bove';
	  this.previousSibling.src=buttonl[1].src;
	  this.nextSibling.src=buttonp[1].src;}
	  
      przyciski[i].onmouseout=function (){ 
	  this.className='butto';
	  this.previousSibling.src=buttonl[0].src;
	  this.nextSibling.src=buttonp[0].src;}
      }
   }
  return przyciski;  
}
function roundText() {
    
    var InputTexts=document.getElementsByTagName('input');
    
    for (var i=0;i<InputTexts.length;i++)
    {
      if (InputTexts[i].type=='text' || InputTexts[i].type=='password')
      {
	  if(InputTexts[i].className!='keyboardInput polaText'&&InputTexts[i].className!='keyboardNumInput polaText') {
      var l = document.createElement("img");
      l.id=InputTexts[i].id+"l";
      l.name=InputTexts[i].name+"l";
      l.src=textl[0].src;
      var p = document.createElement("img");
      p.src=textp[0].src;
      p.id=InputTexts[i].id+"p";
      p.name=InputTexts[i].name+"p";
	  
      InputTexts[i].className="tex";

        InputTexts[i].parentNode.insertBefore(l, InputTexts[i]);
        insertAfter(p,InputTexts[i]);
		
		InputTexts[i].onfocus=function(){
			this.className='focu';
				try{
					this.previousSibling.src=textl[1].src;
				}catch(e){}
				try{
					this.nextSibling.src=textp[1].src;
				}catch(e){}
			}
			
		InputTexts[i].onblur=onblur=function(){
		    this.className='tex';
			try{
				this.previousSibling.src=textl[0].src;
			}catch(e){}
			try{
				this.nextSibling.src=textp[0].src;
			}catch(e){}
		}
		}
	  }
    }
    return InputTexts;
}

function roundTextId(id) {
    
    var InputTexts=document.getElementsByTagName('input');
    
    for (var i=0;i<InputTexts.length;i++)
    {
      if (InputTexts[i].type=='text' || InputTexts[i].type=='password')
      {
	  if(InputTexts[i].id==id && InputTexts[i].className!='keyboardInput polaText' && InputTexts[i].className!='keyboardNumInput polaText') {

	  var l = document.createElement("img");
      l.id=InputTexts[i].id+"l";
      l.name=InputTexts[i].name+"l";
      l.src=textl[0].src;
      var p = document.createElement("img");
      p.src=textp[0].src;
      p.id=InputTexts[i].id+"p";
      p.name=InputTexts[i].name+"p";
      InputTexts[i].className="tex";

		InputTexts[i].parentNode.insertBefore(l, InputTexts[i]);
        insertAfter(p,InputTexts[i]);
	  
		InputTexts[i].onfocus=function(){
			this.className='focu';
			//this.previousSibling.src=textl[1].src;
			//this.nextSibling.src=textp[1].src;
			}
			
		InputTexts[i].onblur=onblur=function(){
		    this.className='tex';
			//this.previousSibling.src=textl[0].src;
			//this.nextSibling.src=textp[0].src;
		}
      }
	  }
    }
    
    return InputTexts;
}



function setVal(objID, selIndex) {
      var obj = document.getElementById(objID);
      obj.selectedIndex = selIndex;
    }

function insertAfter(newElement, targetElement) 
{

   var parent = targetElement.parentNode;
   if (parent.lastChild == targetElement) {
   parent.appendChild(newElement);
   } else {
   parent.insertBefore(newElement, targetElement.nextSibling);
   }
}

//window.onload = roundBoxes;
//roundSelect();

roundBoxes();
roundText();
