var content="";
function get_conn()
{
    var xhr=false;
    if (window.XMLHttpRequest)
    {
        xhr = new XMLHttpRequest();
    }
    else
    {
        if (window.ActiveXObject)
        {
            try
            {
                xhr = new ActiveXObject ("Microsoft.XMLHTTP");
            }
            catch (e) { }
        }
    }
    return (xhr);
}
function setCon()
{
    if (xhr.readyState == 4)
    {
        document.getElementById(content). innerHTML = xhr.responseText;
    }
}


function ajax8(page,con,d1,d2,d3,d4,d5,d6)
{
    content=con;
    xhr=get_conn();
    if (document.getElementById(content))
        document.getElementById(content).innerHTML="";
    document.getElementById(content).innerHTML="<center><img src='images/loading.gif' height='30px' widht='30px'><br><span style='font-size:15px; color:#666666;'>Loading...</span></center>";

    if (xhr)
    {
        xhr.onreadystatechange = setCon;
        xhr.open("GET", page+"?u1="+d1+"&u2="+d2+"&u3="+d3+"&u4="+d4+"&u5="+d5+"&u6="+d6, true);
        xhr.send(null);
    }
    else {
        alert("Sorry, but I couldn't create an XMLHttpRequest");
    }
    return false;
}

function sendmailRW(name,mobile,company,designation,email,query){ 
            if (!name || !mobile || !company || !designation || !email || !query)
                 alert("All the fields are compulsory...Please fill up all the required fields");
            else
                 ajax8('roboticwarecontactus.php','contactus',name,mobile,company,designation,email,query);
        }
