
function changeButtonColor(classStyle){
var divEvent = window.event.type;
var est = document.styleSheets[2];
for ( i = 0; i < est.rules.length; i++ )	
{
	y = est.rules[i]
	if(y.selectorText == ("."+classStyle+" INPUT")){
		var	bkClr = y.style.backgroundColor;
			x = y.selectorText.substring(0,y.selectorText.length-5);
			if(divEvent == "mouseover"){
				x = x+".bgcolorOnMouseOver";
			} else {
				x = x+".bgcolorOnMouseOut";
			}
			for ( j = 0; j < est.rules.length; j++ )	
			{
				z = est.rules[j]
				if(z.selectorText == x){
					bkClr = z.style.backgroundColor;
				}
			}
		est.rules[i].style.backgroundColor = bkClr;
	} 
}
}

function inputValidate(nptNm, nptDscptn,ok) {
	var sp = eval('document.forms[0].'+nptNm+'');
	if(ok == 0){
		if(sp.value == ''){
			alert(nptDscptn);
			sp.focus();
			return ok = 1;
		} else {
			return ok = 0;
		}
	}
}

function validate(nptRry) {
	var ok = 0;
	for(i=0;i<nptRry.length;i++){
		ok = inputValidate(nptRry[i][0],nptRry[i][1],ok);
	}
	if(ok == 0){
		document.forms[0].submit();
	}
}

function findFono(){
	var ForeColor = document.styleSheets[2].rules[14].style.backgroundColor;
	var range = document.body.createTextRange();
	var found = range.findText('902 88 88 55');
	if(found){
		range.execCommand('Bold');
		range.execCommand('ForeColor','false',ForeColor);
	}

}

function findFono2(){
	var ForeColor = document.styleSheets[2].rules[14].style.backgroundColor;
	var range = document.body.createTextRange();
	var found = range.findText('902 88 88 66');
	if(found){
		range.execCommand('Bold');
		range.execCommand('ForeColor','false',ForeColor);
	}

}
