function getprofile()
{
    firstname=document.getElementById('firstname').value;
	lastname=document.getElementById('lastname').value;
    email=document.getElementById('email').value;
	url="service.php?firstname="+firstname+"&lastname="+lastname+"&email="+email;
	//alert(url);
	var xmlhttp;
    if (window.XMLHttpRequest)
    {
         // code for IE7+, Firefox, Chrome, Opera, Safari
         xmlhttp=new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
       // code for IE6, IE5
       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
    alert("Your browser does not support XMLHTTP!");
    }
    xmlhttp.onreadystatechange=function()
    {
    if(xmlhttp.readyState==4)
    {
	    myString=xmlhttp.responseText;
	    mySplitResult = myString.split("#");
		id=mySplitResult[1];
		//alert(id);
		document.getElementById('picture').innerHTML='<table ><tr><td>'+mySplitResult[2]+'</td><td style=";padding-top:170px; vertical-align:middle;width:200pxfont-family: Arial, Helvetica, sans-serif; font-size: 11px;color:#999999;padding-left:20px;" width="200px">Profile Upload Successfully </td></tr></table>';
    }
    }
    xmlhttp.open("POST",url,true);
    xmlhttp.send(null);
}
function addComm()
{
if(typeof id != "undefined") {
    data=document.getElementById('data').value;
	datelocation=document.getElementById('location').value;
    oneword=document.getElementById('oneword').value;
	comentariu=document.getElementById('comentariu').value;
	medium=document.getElementById('medium').value;
	remark="Business Feedback, submitted: "+data+"*What was the transaction: "+datelocation+"*How Much: "+oneword+"*"+"*Over What medium did this transaction occur: "+medium+"*"+comentariu;
	//alert(id);
	query = "feedbackadd1.php?id="+id+"&rb=unsigned&remarks1="+remark;
	//alert(query);
   /*	var xmlhttp;
    if (window.XMLHttpRequest)
    {
         // code for IE7+, Firefox, Chrome, Opera, Safari
         xmlhttp=new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
       // code for IE6, IE5
       xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
    alert("Your browser does not support XMLHTTP!");
    }
    xmlhttp.onreadystatechange=function()
    {
    if(xmlhttp.readyState==4)
    {
	   location="profile.php?id="+id;
    }
    }
    xmlhttp.open("GET",query,true);
    xmlhttp.send(null);*/
    $.ajax({
   type: "POST",
   url: "feedbackadd1.php",
   data: "id="+id+"&rb=unsigned&remarks1="+remark,
       success: function(msg){
           location="profile.php?id="+id;
       }
 });
}
}
 $(function() {
    
      
        // put your JS here
        
        
        $("#jerk_slider").slider({
          value:50,
          min: 0,
          max: 100,
          step: 1,
          change: function(event, ui) {
		    if(typeof id != "undefined")
			{
                updateRate(ui.value);
            }
          }
        }); 
    }); 

     function updateRate(val) {
      //alert("updateRate") ;
      var _url = "http://www.jerk.com/forscrool/AJAX4Slider.php";

     $.ajax({
        type: "POST",
        url: _url,
        data: "sliderval=" + val + "&id="+id+"&idd=0",
        success: function(html){
          updateInfo(val);
        }

      });

      
    } // end function updateRate
    
    
    
    
   function updateInfo(val) {
       //  alert("updateInfo") ;
			_rate = val;
			//alert("rate");
            var _what = "Jerk";
            var _css_class = "rate_box_jerk";
            if (_rate < 50) {
              _rate = 100 - _rate;
              _what = "Saint";
              var _css_class = "rate_box_saint";
            } 
            
            // update displayed info
            
            $("#rate_value").html(_rate + "%<br/>" + _what);
            $("#rate_box").removeClass().addClass(_css_class);
            
            
          } 
