function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}	
		return xmlhttp;
    }
	
	function getfrmEnquiry() {
		name=document.frmEnquiry.name.value;
		email=document.frmEnquiry.email.value;
		mobile=document.frmEnquiry.mobile.value;		
		country=document.frmEnquiry.country.value;
		state=document.frmEnquiry.state.value;
		comments=document.frmEnquiry.comments.value;
		project=document.frmEnquiry.project.value;
		action=document.frmEnquiry.action.value;
		var strURL="enquiry-next.php?name="+name+"&email="+email+"&mobile="+mobile+"&country="+country+"&state="+state+"&comments="+comments+"&project="+project+"&action="+action;		
		//alert(strURL);
		var req = getXMLHTTP();		
		if (req) {			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('divEnquiry').innerHTML=req.responseText;
					} else {
						alert("There was a problem while using selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
	
	function getfrmSendtofriend() {
		subject=document.frmsendtofrnd.subject.value;
		rname=document.frmsendtofrnd.rname.value;
		remail=document.frmsendtofrnd.remail.value;		
		yname=document.frmsendtofrnd.yname.value;
		yemail=document.frmsendtofrnd.yemail.value;
		filename=document.frmsendtofrnd.filename.value;
		linkid=document.frmsendtofrnd.linkid.value;
		paction=document.frmsendtofrnd.paction.value;
		
		var strURL="sendto-friend-next.php?subject="+subject+"&rname="+rname+"&remail="+remail+"&yname="+yname+"&yemail="+yemail+"&filename="+filename+"&linkid="+linkid+"&action="+paction;		
		// alert(strURL);
		var req = getXMLHTTP();		
		if (req) {			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('div_SEND_FRIEND_OUTER').innerHTML=req.responseText;
					} else {
						alert("There was a problem while using selection");
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}		
	}
