function pay_now() 
{
var val=document.getElementById('amount').value;
var itname=document.getElementById('itname').value;
  var xmlHttp;
  // document.getElementById('submenu').innerHTML = 'loading...';
    try{
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      xmlHttp.overrideMimeType("text/html; charset=utf-8"); /*TO DISPLAY HEBREW CHARACTERS*/   
   }
   catch (e){
       // Internet Explorer
        try{
          xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");         
       }
      catch (e){
          try{
               xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            xmlHttp.setRequestHeader('Content-Type','text/html; charset=utf-8')
           }
         catch (e){
           alert("Your browser does not support AJAX!");
           return false;
         }
       }
   }
   
   xmlHttp.onreadystatechange=function(){ //Used to set the callback function that handles request state changes.
      //alert(xmlHttp.status+' - '+xmlHttp.readyState);
      if(xmlHttp.readyState==4){   // 0 = uninitialized 1 = loading 2 = loaded 3 = interactive 4 = complete
        document.getElementById('submenu').innerHTML=xmlHttp.responseText; //Returns the server response as a string.
		document.pay.submit();
		//FSdocument.a1.submit();
	    //Returns the server response as a string.
        //alert(xmlHttp.responseText);
        //document.myform.message.value = '';
      }
   }

   //url=url+"&message="+str;
   var url="pay_now.php?val="+val; 
   url=url+"&itname="+itname;
   //url=url+"&val="+val;
   xmlHttp.open("POST",url,true); //Initializes the request parameters.   / or POST data larger than 512 bytes   
   xmlHttp.send(null);   //Performs the HTTP request.
//   window.setTimeout("FadeOpacity('submenu',100,0,100,80)", 14100);
 }

