function id1_onmouseout(row, colorfondo) {
	var el = window.event.srcElement;
	var vid = "id" + row;
	for ( ; el.id != vid; el = el.parentElement);
	el.style.backgroundColor = colorfondo;
}

function id1_onmouseover(row) {
	var el = window.event.srcElement;
	var vid = "id" + row;
	for ( ; el.id != vid; el = el.parentElement);
	el.style.backgroundColor = "#ffff00";
}

function mOvr(src) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	}
}

function mOut(src) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	}
}
function CheckYear(which, name){
	var i;
	var isB;
	var varStr;
	
	varStr = new String(" ");
	
	isB = true
	if (which.length != 4) {
		isB = false;
	}
	else {
		if (which < '1900') {
			isB = false;
		} else {
			for (i=0; i < which.length; i++) {
				varStr = which.substr(i,1);
				if (varStr != "0" &&
					varStr != "1" &&
					varStr != "2" &&
					varStr != "3" &&
					varStr != "4" &&
					varStr != "5" &&
					varStr != "6" &&
					varStr != "7" &&
					varStr != "8" &&
					varStr != "9") {
						isB = false;
				}
			}
		}
	}

	if (isB == false) {
		alert("Please, you have problem with " + name);
	}
	return isB;
}
function CheckNumeric(which, name){
	var i;
	var isB;
	var varStr;
	var cont_punto;
	cont_punto=0;
	
	varStr = new String(" ");
	
	isB = true
	for (i=0; i < which.length; i++) {
		varStr = which.substr(i,1);
		if (varStr != "0" &&
			varStr != "1" &&
			varStr != "2" &&
			varStr != "3" &&
			varStr != "4" &&
			varStr != "5" &&
			varStr != "6" &&
			varStr != "7" &&
			varStr != "8" &&
			varStr != "9" &&
			varStr != ".") {
				isB = false;
		}
		if (varStr == ".") { cont_punto++; }
	}
	if (isB == false || cont_punto > 1) {
		alert("Please, you have problem with " + name + ". Use only digits <0123456789> or <.>");
	}
	return isB;
}

function CheckNumericObligatorio(which, name){
	var i;
	var isB;
	var varStr;
	var cont_punto;
	cont_punto=0;
	
	varStr = new String(" ");
	
	isB = true
	for (i=0; i < which.length; i++) {
		varStr = which.substr(i,1);
		if (varStr != "0" &&
			varStr != "1" &&
			varStr != "2" &&
			varStr != "3" &&
			varStr != "4" &&
			varStr != "5" &&
			varStr != "6" &&
			varStr != "7" &&
			varStr != "8" &&
			varStr != "9" &&
			varStr != ".") {
				isB = false;
		}
		if (varStr == ".") { cont_punto++; }
	}
	if (isB == true) {
		if (which == "0") {
			isB = false;
		}
	}
	if (cont_punto > 1) { isB = false; }
	if (isB == false ) {
		alert("Please, you have problem with " + name + ". Use only digits <0123456789> or <.>");
	}
	return isB;
}
function CheckTextValue(elem,name) {
	if (eval("document.myform." + elem + ".value.length")==0) 	{
		alert("Please, enter a value for " + name);
		return false;
	} else {	
		return true;	
	}
}
function checkemail(which){
	if (which.indexOf("@")!=-1&&which.indexOf(".")!=-1)
		return true;
	else
		alert("Please, you have problem with e-mail");
		return false;
}

