function clientSideInclude(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + 
   "passed to clientSideInclude." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}
function Submit_Feedback()
{
		var check = check_feedback();
		if (check!=false)
		{
			document.contact.action = "contact-us.php";
			document.contact.submit();
		}
}
function check_feedback()
{
	if(document.contact.name.value == "")
	{
		alert("Enter Name.");
		document.contact.name.focus();
		return false;
	}
	if(document.contact.email.value=="")
	{
		 alert("Enter Email_Id.");
		 document.contact.email.focus();
		 return false;
	}
	var str=document.contact.email.value;
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.indexOf(at,(lat+1))!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.indexOf(dot,(lat+2))==-1)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	}
	if (str.indexOf(" ")!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.contact.email.focus();
		 return false
	} 
}
function Reset_Form()
{
	document.contact.action = "contact-us.php";
	document.contact.submit();
}
function Reset_Order_Form()
{
	document.order_form.action = "order-form.php";
	document.order_form.submit();
}
function Submit_Request()
{
		var check = check_request();
		if (check!=false)
		{
			document.order_form.action = "order-form.php";
			document.order_form.submit();
		}
}
function check_request()
{
	/*if(document.order_form.select1.value == "0")
	{
		alert("Select Category:.");
		document.order_form.select1.focus();
		return false;
	}
	if(document.order_form.textfield.value == "")
	{
		alert("Enter Comments/Additional Information.");
		document.order_form.textfield.focus();
		return false;
	}
	
	if(document.order_form.p_address.value == "")
	{
		alert("Enter Property Address.");
		document.order_form.p_address.focus();
		return false;
	}
	if(document.order_form.city.value == "")
	{
		alert("Enter City.");
		document.order_form.city.focus();
		return false;
	}
	if(document.order_form.state.value == "")
	{
		alert("Enter State.");
		document.order_form.state.focus();
		return false;
	}
	if(document.order_form.country.value == "")
	{
		alert("Enter Country.");
		document.order_form.country.focus();
		return false;
	}
	if(document.order_form.p_email.value == "")
	{
		alert("Enter Email_Id.");
		document.order_form.p_email.focus();
		return false;
	}
	var str=document.order_form.p_email.value;
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.indexOf(at,(lat+1))!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.indexOf(dot,(lat+2))==-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	}
	if (str.indexOf(" ")!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.p_email.focus();
		 return false
	} */
	
	if(document.order_form.name.value == "")
	{
		alert("Enter Name.");
		document.order_form.name.focus();
		return false;
	}
	/*if(document.order_form.title.value == "")
	{
		alert("Enter Title.");
		document.order_form.title.focus();
		return false;
	}
	if(document.order_form.company.value == "")
	{
		alert("Enter Company.");
		document.order_form.company.focus();
		return false;
	}
	if(document.order_form.address.value == "")
	{
		alert("Enter Address.");
		document.order_form.address.focus();
		return false;
	}
	if(document.order_form.ph_num.value == "")
	{
		alert("Enter Phone Number.");
		document.order_form.ph_num.focus();
		return false;
	}
	if(document.order_form.fax.value == "")
	{
		alert("Enter Fax Number.");
		document.order_form.fax.focus();
		return false;
	}*/
	if(document.order_form.email.value=="")
	{
		 alert("Enter Email_Id.");
		 document.order_form.email.focus();
		 return false;
	}
	var str=document.order_form.email.value;
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.indexOf(at,(lat+1))!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.indexOf(dot,(lat+2))==-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	}
	if (str.indexOf(" ")!=-1)
	{
		 alert("Enter valid Email_id.");
		 document.order_form.email.focus();
		 return false
	} 
}