function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "request_quote_public_form.php", "Quote Form", "width=650px,height=400px,left=300px,top=10px,resize=1,scrolling=0")
ajaxwin.onclose=function(){return window.confirm("Close Quote Form?")} //Run custom code when window is about to be closed
}
function openmyprivatepage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "requestQuoteFormPrivate.html", "Quote Form", "width=650px,height=400px,left=300px,top=10px,resize=1,scrolling=0")
ajaxwin.onclose=function(){return window.confirm("Close Quote Form?")} //Run custom code when window is about to be closed
}
function quotevalidate(){
	
	var emailid = document.getElementById('email').value;
	var ans = is_valid_email(emailid);
	
	if(document.getElementById('name').value=='')
	{
		alert('Name Required');
		document.getElementById('name').focus();
		return false;
	}
	else if(document.getElementById('business').value=='')
	{
		alert('Business Name Required');
		document.getElementById('business').focus();
		return false;
	}
	else if(ans==false)
	{
		alert('Valid Email Id Required');
		document.getElementById('email').focus();
		return false;
	}
	else if(document.getElementById('website').value=='')
	{
		alert('Current Website Required');
		document.getElementById('website').focus();
		return false;
	}
	else if(document.getElementById('desc').value=='')
	{
		alert('Project Description Required');
		document.getElementById('desc').focus();
		return false;
	}
	else
	{
			return true;
	}
	
	
}
function is_valid_email(email)
{
	return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email);
}
function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : evt.keyCode ;
          if (charCode > 31 && charCode != 40 && charCode != 41 && charCode != 43 && charCode != 46 && (charCode < 48 || charCode > 57))
            return false;

            return true;
      }
	  
function EnalbleOther(id)
{
	if(document.getElementById("request").value == "Other" && document.getElementById(id).disabled == true)
	{
		document.getElementById(id).disabled = false;
	}
	else
	{
		document.getElementById(id).disabled = true;
	}

}