function ponerfoco(idstr) { 
	var obj;
	if (document.all) {
		obj = document.all(idstr)
	} else if (document.getElementById) {
		obj = document.getElementById(idstr)
	} else if (document.layers) {
		obj = document.layers[idstr]
	}
	if (obj) 
		obj.focus(); 
} 


function detect(elemID) {
	var obj;
	if (document.all) {
		obj = document.all(elemID)
	} else if (document.getElementById) {
		obj = document.getElementById(elemID)
	} else if (document.layers) {
		obj = document.layers[elemID]
	}
	if (obj) {
	 return obj;
	}
	else {
	 return null;
	}
}

function SetSel(obj){
   obj.className = "formcompsel"; 
  }
  
function SetDes(obj){
   obj.className = "formcomp";  
  }

function convertdate(datein){
	var dateout = '';
	if (datein != '')
		dateout = datein.substring(6,10) + '-' + datein.substring(3,5) + '-' + datein.substring(0,2);
	return dateout;
}