var http_request = false;
   function makePOSTRequestrr_other(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } 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_other;
      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_other() {
	 
      if (http_request.readyState == 4) {
		 //alert(http_request.status);
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
			//alert(result);
			alert("Email sent successfully...");
			return hs.close('highslide-html2');
			
			//document.getElementById('calendaroupput').style.display ='inline';
			//document.getElementById("calendaroupput").innerHTML=result;
 // document.getElementById('calendaroupput').style.display ='inline';  
			
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   
   
   function sendmail_other()
   {	
 
 var b=true;

  var contactname='';
  var contactnumber='';
  var contactemail='';
  var organisationname='';
  var  postcode='';
  var exist='';
  var furtherinfo='';
  var subject='';
  
  	if(trim(document.getElementById('contactname2').value)=='')
	{
		alert("Please enter Contact Name... ");
		document.getElementById('contactname2').focus();
		b=false;
		return;
	}
	else
	{
   	contactname=document.getElementById('contactname2').value;
	
	}
	
	if(trim(document.getElementById('contactnumber2').value)=='')
	{
		alert("Please enter Contact Number... ");
		document.getElementById('contactnumber2').focus();
		b=false;
		return;
	}
	else
	{
    contactnumber=document.getElementById('contactnumber2').value;
	}
	
	if(checkEmailAddress(document.getElementById('contactemail2')))
	{
		contactemail=trim(document.getElementById('contactemail2').value);
	}
	else
	{
		b=false;
		return;
   
	}
	
	
	
	if(document.getElementById('existY2').checked==true)
	{
		exist="Y";
	}
	else if(document.getElementById('existN2').checked==true)
	{
		exist="N";
	}
	
    organisationname=trim(document.getElementById('organisationname2').value);
	
    postcode=trim(document.getElementById('postcode2').value);
	
	furtherinfo=trim(document.getElementById('furtherinfo2').value);
	
	if(document.getElementById('subject2'))
	{
		subject=document.getElementById('subject2').value;
	}
	
	if(b==true)
	{
	poststr='contactname='+encodeURIComponent(contactname)+'&contactnumber='+encodeURIComponent(contactnumber)+'&organisationname='+encodeURIComponent(organisationname)+'&postcode='+encodeURIComponent(postcode)+'&exist='+exist+'&furtherinfo='+encodeURIComponent(furtherinfo)+'&contactemail='+encodeURIComponent(contactemail)+'&subject='+encodeURIComponent(subject);
	//alert(poststr);
	//makePOSTRequestrr_other('http://localhost/mailcom/sendusermail.php', poststr);
	makePOSTRequestrr_other('http://www.mailcoms.co.uk/sendusermail.php', poststr);
	}
	/*makePOSTRequest(urlpath+'/manageclases_c/addScpeccodeLinks', poststr);
	//makePOSTRequest('http://randhir/hes2/admin/managemodule/addScpeccodeLinks', fullpoststr);*/
	
	
   }
   /*function getLinks(speccode)
   {
	  
	   	poststr='speccode='+speccode;
		//alert(poststr);
	   	if(speccode!='')
		{ //alert("tttttt");
				makePOSTRequest('http://zelaza.pair.com/sanjay/admin/managemodule/getSpecLinksData', poststr);
		}
   }*/

