function verificaCifre(care){
 	care = (care) ? care : window.event;
    var charCode = (care.which) ? care.which : care.keyCode;
    if(charCode>31 && (charCode<48 || charCode>57)){ 
    	return false; 
    }else 
    	return true;
}

var http_request = false;
function makePOSTRequest(url, parameters) {
  http_request = false;
  if (window.XMLHttpRequest) { // Mozilla, Safari,...
     http_request = new XMLHttpRequest();
     if (http_request.overrideMimeType) {
        http_request.overrideMimeType('text/xml');
     }
  } else if (window.ActiveXObject) { // IE
     try {
        http_request = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (e) {
        try {
           http_request = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
     }
  }
  if (!http_request) {
     alert('Cannot create XMLHTTP instance');
     return false;
  }
  
  http_request.onreadystatechange = alertContents;
  http_request.open('POST', url, true);
  http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http_request.setRequestHeader("Content-length", parameters.length);
  http_request.setRequestHeader("Connection", "close");
  http_request.send(parameters);
}

function alertContents() {
  if (http_request.readyState == 4) {
     if (http_request.status == 200) {
        //alert(http_request.responseText);
        result = http_request.responseText;
        document.getElementById('quick-response').innerHTML = result;            
     } else {
        alert('There was a problem with the request.');
     }
  }
}

function get(obj) {
  var poststr = "nume=" + encodeURI( document.getElementById("nume").value ) +
                "&email=" + encodeURI( document.getElementById("email").value ) +
                "&mobil=" + encodeURI( document.getElementById("mobil").value ) +
                "&number=" + encodeURI( document.getElementById("number").value ) +
                "&interes=" + encodeURI( document.getElementById("interes").value );
  makePOSTRequest('http://www.smsgateway.ro/quick-info-request.php', poststr);
}


function qDeschideImagine(imagine){
	win = window.open( "", "_blank", "resizable=0,HEIGHT=200,WIDTH=200"); 
	win.document.write("<html><head style=\"margin: 0; padding: 0;\"><title>SMSgateway</title></head><body style=\"background: #ffffff url(http://www.smsgateway.ro/images/preloader.gif) center no-repeat; margin: 0; padding: 0;\">");
	obiect = new Image();
	obiect.src = imagine;
	obiect.onload = function(){
			win.document.write("<img src=\""+imagine+"\" alt=\"\" /></body></html>");
			latime = document.all?win.document.body.clientWidth:win.window.innerWidth; 
			inaltime = document.all?win.document.body.clientHeight:win.window.innerHeight;
			win.resizeBy((obiect.width - latime), (obiect.height - inaltime));
			win.focus();
	}
}

function refreshImage(){
	
	
	
}