<!--

function validare(cnp) {
    var txt = new Array()
    for (i=0;i<cnp.length;i++){
	txt[i]=cnp.substr(i,1);
    }
    if (txt.length==13){
	s = txt[0]*2+txt[1]*7+txt[2]*9+txt[3]*1+txt[4]*4+txt[5]*6+txt[6]*3+txt[7]*5+txt[8]*8+txt[9]*2+txt[10]*7+txt[11]*9;   
	rest = s%11;
        if ((rest < 10 && rest == txt[12]) || (rest == 10 && txt[12] == 1)){
            //alert('CNP-ul '+ cnp +' este corect');
            return true;
        } else{
            alert('CNP-ul '+ cnp +' este INCORECT');
        }
    } else {
	alert('CNP-ul '+ cnp +' INCORECT < 13');
    }
    return false;
}

function is_empty(str) {
    return str.search('^[ \t\r\n]*$')>-1 ? true : false;
}

function is_uint(str) {
    if (is_empty(str)) {
	return false;
    }
    return str.search('^[.0-9]*$')>-1 ? true : false;
}
    
function validTextField(field, msg) {
    if (field == undefined)
	return true;
    if (is_empty(field.value)) {
        alert(msg);
        return false;
    }
    return true;
}

function showInfo(url, div_id) {
    
    var xmlhttpRequestObj;
	
    if (xmlhttpRequestObj = create_xmlhttpRequestObj()) {
	xmlhttpRequestObj.onreadystatechange = processRequestChange;
	xmlhttpRequestObj.open("GET", url, true);
	//xmlhttpRequestObj.setRequestHeader("Content-Type", 'text/xml; charset="ISO-8859-2"');
	//xmlhttpRequestObj.setRequestHeader("Accept-Charset", "iso-8859-2");
	xmlhttpRequestObj.send(null);
    } else {
	


 
