//utf8 ő

var imagesPath='/images/';
var icCustomButtonsInitialized=false;

function ic_custom_buttons(buttonClass,classPretag){
    var buttons=getElementsByClassName(document,'input',buttonClass);
    for(i=0;i<buttons.length;i++){
		buttons[i].className=classPretag+'Submit';
		var buttonLeft=document.createElement('img');
		buttonLeft.src=imagesPath+classPretag+'_left.gif';
		buttonLeft.className=classPretag+'Img';
		buttons[i].parentNode.insertBefore(buttonLeft,buttons[i]);
		var buttonRight=document.createElement('img');
		buttonRight.src=imagesPath+classPretag+'_right.gif';
		buttonRight.className=classPretag+'Img';
		if(buttons[i].nextSibling) {buttons[i].parentNode.insertBefore(buttonRight,buttons[i].nextSibling);}
		else {buttons[i].parentNode.appendChild(buttonRight);}
		buttons[i].onmouseover=function() {
			this.className+="Hovered";
			this.previousSibling.src=imagesPath+classPretag+'_left_xon.gif';
			this.nextSibling.src=imagesPath+classPretag+'_right_xon.gif';
		}
		buttons[i].onmouseout=function() {
			this.className=this.className.replace(/Hovered/g, '');
			this.previousSibling.src=imagesPath+classPretag+'_left.gif';
			this.nextSibling.src=imagesPath+classPretag+'_right.gif';
		}
	}
}

function ic_custom_buttons_init(){
    if(icCustomButtonsInitialized)return true;
    ic_custom_buttons('buttonSubmit','button');
    ic_custom_buttons('button2Submit','button2');
    ic_custom_buttons('button3Submit','button3');
	icCustomButtonsInitialized=true;
}

addEvent(window,'load', ic_custom_buttons_init);
//window.onload=ic_custom_buttons_init;
