
function openWindow(url, name)
{
	args = "width=500,height=500,resizable=yes,scrollbars=yes,status=0,left=100,top=100);";
    popupWin = window.open(url, name,args);
    if (window.focus) 
    {
		popupWin.focus();
    }
}

function validate_prod(theform)
{
	if(theform.product_search.value == "")
	{
		window.alert ("Please enter manufacturer part-# or product description");
		theform.product_search.focus();
		return (false);
	}

return (true);
}

function validate_quote(theform)
{
if(theform.desc1.value == "")
	{
		window.alert ("Please enter description before adding to quote_list");
		theform.desc1.focus();
		return (false);
	}

return (true);
}

function Update()
	{
    // alter the action and submit the form
    document.submitQuote.action = "update_quote_list.asp";
    document.submitQuote.submit();
	}
function Send()
	{
   // alter the action and submit the form
	if(document.submitQuote.Company.value == "")
		{
		window.alert ("Please enter the company");
		document.submitQuote.Company.focus();
		}
	else if(document.submitQuote.Contact.value == "")
		{
		window.alert ("Please enter the Contact Name");
		document.submitQuote.Contact.focus();
	
		}
	else if(document.submitQuote.Phone.value == "")
		{
		window.alert ("Please enter the Phone");
		document.submitQuote.Phone.focus();
		}
	else if(document.submitQuote.email.value == "")
		{
	window.alert ("Please enter the email");
	document.submitQuote.email.focus();
		}

	else if(document.submitQuote.sales_rep.value == "")
		{
	window.alert ("Please enter the name of your account manager at RU-LINK, type new if you don't have one");
	document.submitQuote.sales_rep.focus();
		}

	
	
	else
		{
	document.submitQuote.action = "confirm.asp";
    document.submitQuote.submit();
		}

	}

function goBack()
{

	
 if (history.length > 0){
  	history.back()
  }
}

function validate(theform)
{
if(theform.Company.value == "")
{
window.alert ("Please enter the company name");
theform.Company.focus();
return (false);
}
if(theform.Contact.value == "")
		{
		window.alert ("Please enter the Contact Name");
		theform.Contact.focus();
		return (false);
		}

		if(theform.Phone.value == "")
		{
		window.alert ("Please enter the Phone");
		theform.Phone.focus();
		return (false);
		}


     if(theform.email.value == "")
		{
		window.alert ("Please enter the email");
		theform.email.focus();
		return (false);
		}



 if(theform.sales_rep.value == "")
		{
	window.alert ("Please enter the name of your account manager at RU-LINK, type n/a if you don't have one");
	theform.sales_rep.focus();
	return (false);
		}









}	

