function findform(appVariable)
{
//document.getElementById("appResults").innerHTML = appVariable

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null) 
{
alert ("Browser does not support HTTP Request")
return
} 

xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",appVariable,true)
xmlHttp.send(null)

if (appVariable == "select")
{
document.getElementById("appResults").innerHTML=""	
}
else
{
document.getElementById("appResults").innerHTML=xmlHttp.responseText
}


function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
if (appVariable == "select")
{
document.getElementById("appResults").innerHTML=""	
}
else
{
document.getElementById("appResults").innerHTML=xmlHttp.responseText 
}
} 
}


function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 


}


function findVac(applicationVariable)
{

var pumpResult
pumpResult = "pumpResults.asp?"

if (applicationVariable == "flasp") {
	pumpResult = pumpResult + "app=flasp"
	if(document.vacuum.question2[0].checked){pumpResult = pumpResult + "&source=central"}
	if(document.vacuum.question2[1].checked){pumpResult = pumpResult + "&source=pump"}
	if(document.vacuum.question3[0].checked){pumpResult = pumpResult + "&solvents=yes"}
	if(document.vacuum.question3[1].checked){pumpResult = pumpResult + "&solvents=no"}
	if(document.vacuum.question4[0].checked){pumpResult = pumpResult + "&noapps=1"}
	if(document.vacuum.question4[1].checked){pumpResult = pumpResult + "&noapps=2"}
	if(document.vacuum.question4[2].checked){pumpResult = pumpResult + "&noapps=3"}
	}
	
if (applicationVariable == "geldry") {
	pumpResult = pumpResult + "app=geldry"
	pumpResult = pumpResult + "&sdspage=" + document.vacuum.question2.value
	pumpResult = pumpResult + "&size=" + document.vacuum.question3.value
	}

if (applicationVariable == "rotovap") {
	if (document.vacuum.question2.value == "none" && document.vacuum.question2a.value == "" )
	{
	alert("Please select a solvent or enter its boiling point before proceeding.");
	return false ;
	}
else
	{
	pumpResult = pumpResult + "app=rotovap"
	pumpResult = pumpResult + "&solvent=" + document.vacuum.question2.value
	pumpResult = pumpResult + "&solbp=" + document.vacuum.question2a.value
	pumpResult = pumpResult + "&flask=" + document.vacuum.question3.value
	pumpResult = pumpResult + "&bathtemp=" + document.vacuum.question4.value
	if(document.vacuum.question5[0].checked){pumpResult = pumpResult + "&control=none"}
	if(document.vacuum.question5[1].checked){pumpResult = pumpResult + "&control=manual"}
	if(document.vacuum.question5[2].checked){pumpResult = pumpResult + "&control=2-point"}
	if(document.vacuum.question5[3].checked){pumpResult = pumpResult + "&control=vario"}
	
	}
}

if (applicationVariable == "vacoven") {
	if (document.vacuum.question2.value == "none" && document.vacuum.question2a.value == "" )
	{
	alert("Please select a solvent or enter its boiling point before proceeding.");
	return false ;
	}
else
	{
	pumpResult = pumpResult + "app=vacoven"
	pumpResult = pumpResult + "&solvent=" + document.vacuum.question2.value
	pumpResult = pumpResult + "&solbp=" + document.vacuum.question2a.value
	pumpResult = pumpResult + "&size=" + document.vacuum.question3.value
	pumpResult = pumpResult + "&sampleTemp=" + document.vacuum.question4.value
	if(document.vacuum.question5[0].checked){pumpResult = pumpResult + "&coldtrap=yes"}
	if(document.vacuum.question5[1].checked){pumpResult = pumpResult + "&coldtrap=no"}
	
	}
	}

if (applicationVariable == "filter") {
	pumpResult = pumpResult + "app=filter&"
	if(document.vacuum.question2[0].checked){pumpResult = pumpResult + "noapps=1"}
	if(document.vacuum.question2[1].checked){pumpResult = pumpResult + "noapps=2"}
	if(document.vacuum.question2[2].checked){pumpResult = pumpResult + "noapps=3"}
	if(document.vacuum.question2[3].checked){pumpResult = pumpResult + "noapps=4"}
	if(document.vacuum.question2[4].checked){pumpResult = pumpResult + "noapps=5"}
	if(document.vacuum.question2[5].checked){pumpResult = pumpResult + "noapps=6"}
	}
	
if (applicationVariable == "general") {
	pumpResult = pumpResult + "app=general&"
	if(document.vacuum.question2[0].checked){pumpResult = pumpResult + "type=general"}
	if(document.vacuum.question2[1].checked){pumpResult = pumpResult + "type=twopumps"}
	if(document.vacuum.question2[2].checked){pumpResult = pumpResult + "type=network"}
	}



if (applicationVariable == "fredry") {
	pumpResult = pumpResult + "app=fredry&"
	pumpResult = pumpResult + "size=" + document.vacuum.question2.value
	}
	
if (applicationVariable == "reactors") {
	pumpResult = pumpResult + "app=reactors&"
	pumpResult = pumpResult + "size=" + document.vacuum.question2.value
	}

if (applicationVariable == "cencon") {
	if (document.vacuum.question2.value == "none" && document.vacuum.question2a.value == "" )
	{
	alert("Please select a solvent or enter its boiling point before proceeding.");
	return false ;
	}
else
	{
	pumpResult = pumpResult + "app=cencon"
	pumpResult = pumpResult + "&solvent=" + document.vacuum.question2.value
	pumpResult = pumpResult + "&solbp=" + document.vacuum.question2a.value
	//if (document.vacuum.question3.value > 10) {pumpResult = pumpResult + "&sample=large")
	//if (document.vacuum.question3.value < 11) {pumpResult = pumpResult + "&sample=small")
	pumpResult = pumpResult + "&sample=" + document.vacuum.question3.value
	if(document.vacuum.question4[0].checked){pumpResult = pumpResult + "&coldtrap=yes"}
	if(document.vacuum.question4[1].checked){pumpResult = pumpResult + "&coldtrap=no"}
	if(document.vacuum.question5[0].checked){pumpResult = pumpResult + "&bumping=yes"}
	if(document.vacuum.question5[1].checked){pumpResult = pumpResult + "&bumping=no"}
	}
	}

//alert(pumpResult)


xmlHttp=GetXmlHttpObject()
if (xmlHttp==null) 
{
alert ("Browser does not support HTTP Request")
return
} 

xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",pumpResult,true)
xmlHttp.send(null)

//document.getElementById("pumpResults").innerHTML=xmlHttp.responseText
document.getElementById("rgtcolumn").innerHTML=xmlHttp.responseText

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
//document.getElementById("pumpResults").innerHTML=xmlHttp.responseText 
document.getElementById("rgtcolumn").innerHTML=xmlHttp.responseText 

} 
}


function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 


}


function changeVac(appVariable)
{

var pumpResult
pumpResult = "pumpResults.asp?type=nav&pumpid=" + appVariable

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null) 
{
alert ("Browser does not support HTTP Request")
return
} 

xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",pumpResult,true)
xmlHttp.send(null)

//document.getElementById("pumpResults").innerHTML=xmlHttp.responseText
document.getElementById("rgtcolumn").innerHTML=xmlHttp.responseText

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
//document.getElementById("pumpResults").innerHTML=xmlHttp.responseText 
document.getElementById("rgtcolumn").innerHTML=xmlHttp.responseText 

} 
}


function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 


}



function popWin(file,h,w) 
{
windowAttributes = "width=" + w + ",height=" + h + ",scrollbars=1,resizable=1,toolbar=1,menubar=0,location=1,directories=1"
nwin = window.open(file,"demoWindow",windowAttributes);
nwin.focus();
}

function resetApp()
{
	document.vacuumapp.question1.value = 'select'
}


function validate_rfqform()
{
if (document.rfq_form.dealer.value == "" || document.rfq_form.greet.value == "" || document.rfq_form.name2.value == "" || document.rfq_form.name.value == "" || document.rfq_form.title.value == "" || document.rfq_form.product.value == "" || document.rfq_form.company.value == "" || document.rfq_form.phone.value == "" || document.rfq_form.department.value == "" || document.rfq_form.address1.value == "" || document.rfq_form.city.value == "" || document.rfq_form.state.value == "" || document.rfq_form.zipcode.value == "" || document.rfq_form.country.value == "" || document.rfq_form.email.value == "" || document.rfq_form.email2.value == "" || document.rfq_form.email.value != document.rfq_form.email2.value )
	{
	alert("Please ensure that all required fields are filled out and that the 'Email' and 'Confirm Email' fields match before submitting form.");
	return false ;
	}
else
	{
	return true ;
	}
}

function showDealerInfo()
{
var status

var sWidth = screen.width
sWidth = eval(sWidth)
sWidth = sWidth-760
sWidth = sWidth*0.5
sWidth = sWidth+150

document.getElementById("dealerorg").style.left = sWidth
document.getElementById("dealerorg").style.visibility="visible"
}

function closeDealerInfo()
{
document.getElementById("dealerorg").style.visibility="hidden"
}


