//-----Form devised by Tivon Angel 03-9512813
function confirm(){

//--------required fields start

if(document.getElementById('Basic Valve Size 1').value==""){
alert("Veuillez entrer la dimension de la vanne de base 1")
document.getElementById('Basic Valve Size 1').select()
return false
}
if(document.getElementById('quantity1').value==""){
alert("Veuillez entrer la quantit? de la vanne de base de dimension 1")
document.getElementById('quantity1').select()
return false
}

//---------compulsory detail fields
if(document.getElementById('Company').value == ""){
alert("Veuillez noter le nom de votre Société")
document.getElementById('Company').select()
return false
}
if(document.getElementById('Name').value == ""){
alert("Veuillez noter votre nom")
document.getElementById('Name').select()
return false
}
if(document.getElementById('Telephone').value == ""){
alert("Veuillez entrer votre num?ro de t?l?phone")
document.getElementById('Telephone').select()
return false
}
if(document.getElementById('Fax').value == ""){
alert("Veuillez entrer votre de fax")
document.getElementById('Fax').select()
return false
}
if(document.getElementById('E-mail').value == ""){
alert("Veuillez noter votre adresse de e-mail")
document.getElementById('E-mail').select()
return false
}

//email validation starts here--------------------------
invalidChars = " #*=!)(&%~<>?/:;,àáâãäåæçèéëìîðñòôö÷øùúóõêí"
for(i=0; i < invalidChars.length; i++){
badChar = invalidChars.charAt(i)
if(document.getElementById('E-mail').value.indexOf(badChar,0) > -1){
alert("L'adresse de e-mail que vous avez indiquée n'est pas valide")
document.getElementById('E-mail').select()
return false
}


//------------ check for existence of @ sign
atPos = document.getElementById('E-mail').value.indexOf("@", 1)
if(atPos == -1){
alert("L'adresse de e-mail que vous avez indiquée n'est pas valide")
document.getElementById('E-mail').select()
return false
}

//------ - check for existence of one @ sign
if(document.getElementById('E-mail').value.indexOf("@", atPos+1) != -1){
alert("L'adresse de e-mail que vous avez indiquée n'est pas valide")
document.getElementById('E-mail').select()
return false
}

//--------- check for existence of a period
periodPos = document.getElementById('E-mail').value.indexOf(".", atPos)
if(periodPos == -1){
alert("L'adresse de e-mail que vous avez indiquée n'est pas valide")
document.getElementById('E-mail').select()
return false
}

//------------ check for existence of at least 2 chars after the period
if(periodPos+3 > document.getElementById('E-mail').value.length){
alert("L'adresse de e-mail que vous avez indiquée n'est pas valide")
document.getElementById('E-mail').select()
return false
}
//-----------------------------------------------------------------email validation ends here here

//----require all other text fields
if(document.getElementById('other_ends_material').style.display == "inline"){
if((document.getElementById('other_ends_material').value =="Remplis ici") || (document.getElementById('other_ends_material').value =="")){
alert("Veuillez spécifier une matière d'extrémité")
document.getElementById('other_ends_material').select()
return false
}
}

if(document.getElementById('other_housing_material').style.display == "inline"){
if((document.getElementById('other_housing_material').value =="Remplis ici") || (document.getElementById('other_housing_material').value =="")){
alert("Veuillez spécifier une matière de corps")
document.getElementById('other_housing_material').select()
return false
}
}

if(document.getElementById('other_coating').style.display == "inline"){
if((document.getElementById('other_coating').value =="Remplis ici") || (document.getElementById('other_coating').value =="")){
alert("Veuillez spécifier un revêtement")
document.getElementById('other_coating').select()
return false
}
}

if(document.getElementById('Other_threaded').style.display == "inline"){
if((document.getElementById('Other_threaded').value =="Remplis ici") || (document.getElementById('Other_threaded').value =="")){
alert("Veuillez spécifier une extrémité filetée")
document.getElementById('Other_threaded').select()
return false
}
}

if(document.getElementById('Other_flanged').style.display == "inline"){
if((document.getElementById('Other_flanged').value =="Remplis ici") || (document.getElementById('Other_flanged').value =="")){
alert("Veuillez spécifier une extrémité à bride")
document.getElementById('Other_flanged').select()
return false
}
}

if(document.getElementById('Other_wafer').style.display == "inline"){
if((document.getElementById('Other_wafer').value =="Remplis ici") || (document.getElementById('Other_wafer').value =="")){
alert("Veuillez spécifier une autre bride de ligne")
document.getElementById('Other_wafer').select()
return false
}
}

if(document.getElementById('Other Solenoid Valve Voltage').style.display == "inline"){
if((document.getElementById('Other Solenoid Valve Voltage').value =="Remplis ici") || (document.getElementById('Other Solenoid Valve Voltage').value =="")){
alert("Veuillez spécifier une tension pour l'électrovanne")
document.getElementById('Other Solenoid Valve Voltage').select()
return false
}
}


if(document.getElementById('other Enclosure protection Ex.proof option').style.display == "inline"){
if((document.getElementById('other Enclosure protection Ex.proof option').value =="Remplis ici") || (document.getElementById('other Enclosure protection Ex.proof option').value =="")){
alert("Veuillez spécifier une enceinte de protection antidéflagrante")
document.getElementById('other Enclosure protection Ex.proof option').select()
return false
}
}

if(document.getElementById('other Non-standard option').style.display == "inline"){
if((document.getElementById('other Non-standard option').value =="Remplis ici") || (document.getElementById('other Non-standard option').value =="")){
alert("Veuillez spécifier une matière non-standard d'équipement de contrôle")
document.getElementById('other Non-standard option').select()
return false
}
}


}//required fields end of function






newWin = window.open("confirmation.htm", "newWin", "")
z=screen.height
if((parseInt(z))==600){
newWin.moveTo(0,0);
newWin.resizeTo(800,600)
}
if((parseInt(z))==768){
newWin.moveTo(0,0);
newWin.resizeTo(1024,768)
}
newWin.focus()

//------------------------------write
newWin.document.write("<html><head><title>Inbal Valves</title></head>")
newWin.document.write("<body style='background-image: url(images/inbal-back.gif); background-repeat: repeat-y; background-position: right top'>")
newWin.document.write("<center><img src='images/conf_top.jpg'>")
newWin.document.write("<div style='text-align:center; font-family:arial; font-size:15pt; font-weight:bold; color:red'>Confirmation du formulaire</div><div style='text-align:center; font-family:arial; font-size:10pt; font-weight:bold; color:333333; width:50%'>Veuillez vérifier les informations que vous avez notées Pour envoyer le formulaire cliquez sur 'Envoyer'. Pour modifier des informations que vous avez notées cliquez sur 'Modifier'. Le clic sur 'Modifier' vous présentera le formulaire tel que vous l'avez rempli. Ce qui vous permettra de faire les  modifications nécessaires </div></center>")
//-----header end

//newWin.document.write("<form NAME='theform' METHOD='POST' ACTION='/cgi-bin/cgiemail/mil2.txt'>")
//newWin.document.write("<input type='hidden' name='success' value='http://www.inbalvalves.com/form_test/thanks.htm'>")

newWin.document.write("<form name=tivon action='mailto:inbal@inbalvl.com' method=post enctype=text/plain onsubmit=window.location='thanks.htm' >")
newWin.document.write("<table border=0 width=500 align=center>")

//------table and form tag
//-------------------------------------------------------------------------------------title
newWin.document.write("<td>&nbsp;</td><td><input style='width:170px; border:none; color:red' type=hidden name=' ' value='This information comes from the Data Sheet in http://www.inbalvalves.com'></td><tr>")
newWin.document.write("<td>&nbsp;</td><td><input style='width:170px; border:none; color:red' type=hidden name=' ' value='------------------------------------------------------------'></td><tr>")

//------------title end

if(document.getElementById('Reference No').value != ""){
newWin.document.write("<td>No. de référence</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Reference No').name + "'" + " value=" + "'" + document.getElementById('Reference No').value + "'" + "></td><tr>")
}

if(document.getElementById('Date').value != ""){
newWin.document.write("<td>" + document.getElementById('Date').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Date').name + "'" + " value=" + "'" + document.getElementById('Date').value + "'" + "></td><tr>")
}

if(document.getElementById('Project name and location').value != ""){
newWin.document.write("<td>" + document.getElementById('Project name and location').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Project name and location').name + "'" + " value=" + "'" + document.getElementById('Project name and location').value + "'" + "></td><tr>")
}


//------------looping start
for(i = 0; i < 9; i++){
if(document.myForm.Applications[i].checked){
newWin.document.write("<td>Application</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Applications[i].name + " value=" + document.myForm.Applications[i].value + "></td><tr>")

if(document.myForm.Applications[i].value=="Deluge"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Deluge Release').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Deluge Release').name + "'" + " value=" + "'" + document.getElementById('Deluge Release').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('Deluge Resetting').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Deluge Resetting').name + "'" + " value=" + "'" + document.getElementById('Deluge Resetting').value + "'" + "></td><tr>")
}


if(document.myForm.Applications[i].value=="Deluge_Pressure_Control"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Deluge Pressure Control Release').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Deluge Pressure Control Release').name + "'" + " value=" + "'" + document.getElementById('Deluge Pressure Control Release').value + "'" + "></td><tr>")
}

if(document.myForm.Applications[i].value=="Deluge_Pressure_Control"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Deluge Pressure Control Resetting').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Deluge Pressure Control Resetting').name + "'" + " value=" + "'" + document.getElementById('Deluge Pressure Control Resetting').value + "'" + "></td><tr>")
}

if(document.myForm.Applications[i].value=="preaction"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Preaction Release').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Preaction Release').name + "'" + " value=" + "'" + document.getElementById('Preaction Release').value + "'" + "></td><tr>")
}

if(document.myForm.Applications[i].value=="preaction"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Preaction Interlock').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Preaction Interlock').name + "'" + " value=" + "'" + document.getElementById('Preaction Interlock').value + "'" + "></td><tr>")
}

if(document.myForm.Applications[i].value=="Remote_Control"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Remote Control').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Remote Control').name + "'" + " value=" + "'" + document.getElementById('Remote Control').value + "'" + "></td><tr>")
}
}
}
//-----------loop ends


if(document.getElementById('Basic Valve Size 1').value != ""){
newWin.document.write("<td>" + document.getElementById('Basic Valve Size 1').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Basic Valve Size 1').name + "'" + " value=" + "'" + document.getElementById('Basic Valve Size 1').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('units1').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('units1').name + "'" + " value=" + "'" + document.getElementById('units1').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('quantity1').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('quantity1').name + "'" + " value=" + "'" + document.getElementById('quantity1').value + "'" + "></td><tr>")
}

if(document.getElementById('Basic Valve Size 2').value != ""){
newWin.document.write("<td>" + document.getElementById('Basic Valve Size 2').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Basic Valve Size 2').name + "'" + " value=" + "'" + document.getElementById('Basic Valve Size 2').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('units2').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('units2').name + "'" + " value=" + "'" + document.getElementById('units2').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('quantity2').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('quantity2').name + "'" + " value=" + "'" + document.getElementById('quantity2').value + "'" + "></td><tr>")
}

if(document.getElementById('Basic Valve Size 3').value != ""){
newWin.document.write("<td>" + document.getElementById('Basic Valve Size 3').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Basic Valve Size 3').name + "'" + " value=" + "'" + document.getElementById('Basic Valve Size 3').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('units3').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('units3').name + "'" + " value=" + "'" + document.getElementById('units3').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('quantity3').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('quantity3').name + "'" + " value=" + "'" + document.getElementById('quantity3').value + "'" + "></td><tr>")
}

if(document.getElementById('Basic Valve Size 4').value != ""){
newWin.document.write("<td>" + document.getElementById('Basic Valve Size 4').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Basic Valve Size 4').name + "'" + " value=" + "'" + document.getElementById('Basic Valve Size 4').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('units4').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('units4').name + "'" + " value=" + "'" + document.getElementById('units4').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('quantity4').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('quantity4').name + "'" + " value=" + "'" + document.getElementById('quantity4').value + "'" + "></td><tr>")
}

//------------looping start
for(i = 0; i < 2; i++){

if(document.myForm.materials[i].checked){
newWin.document.write("<td>Material</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.materials[i].name + " value=" + document.myForm.materials[i].value + "></td><tr>")


if(document.myForm.materials[i].value=="Non-standard"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Ends_Material').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Ends_Material').name + "'" + " value=" + "'" + document.getElementById('Ends_Material').value + "'" + "></td><tr>")

newWin.document.write("<td>" + document.getElementById('Housing_Material').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Housing_Material').name + "'" + " value=" + "'" + document.getElementById('Housing_Material').value + "'" + "></td><tr>")


if(document.getElementById('Ends_Material').value=="other"){ //write other if needed
newWin.document.write("<td>" + document.getElementById('other_ends_material').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('other_ends_material').name + "'" + " value=" + "'" + document.getElementById('other_ends_material').value + "'" + "></td><tr>")

}
}
if(document.getElementById('Housing_Material').value=="other"){ //write other if needed
newWin.document.write("<td>" + document.getElementById('other_housing_material').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('other_housing_material').name + "'" + " value=" + "'" + document.getElementById('other_housing_material').value + "'" + "></td><tr>")
}
}
}
//--------------loop ends


newWin.document.write("<td>" + document.getElementById('coating').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('coating').name + "'" + " value=" + "'" + document.getElementById('coating').value + "'" + "></td><tr>")

if(document.getElementById('coating').value=="other"){
newWin.document.write("<td>" + document.getElementById('other_coating').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('other_coating').name + "'" + " value=" + "'" + document.getElementById('other_coating').value + "'" + "></td><tr>")
}

//----loop start for ends-----------------------------------------------------------------------------------------------
for(i = 0; i < 4; i++){
if(document.myForm.ends[i].checked){
newWin.document.write("<td>Ends</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.ends[i].name + " value=" + document.myForm.ends[i].value + "></td><tr>")

if(document.myForm.ends[i].value=="Threaded"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Threaded option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Threaded option').name + "'" + " value=" + "'" + document.getElementById('Threaded option').value + "'" + "></td><tr>")

if(document.getElementById('Threaded option').value=="other"){
newWin.document.write("<td>" + document.getElementById('Other_threaded').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Other_threaded').name + "'" + " value=" + "'" + document.getElementById('Other_threaded').value + "'" + "></td><tr>")
}
}

if(document.myForm.ends[i].value=="Flanged"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Flanged option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flanged option').name + "'" + " value=" + "'" + document.getElementById('Flanged option').value + "'" + "></td><tr>")

if(document.getElementById('Flanged option').value=="other"){
newWin.document.write("<td>" + document.getElementById('Other_flanged').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Other_flanged').name + "'" + " value=" + "'" + document.getElementById('Other_flanged').value + "'" + "></td><tr>")

}
newWin.document.write("<td>" + document.getElementById('Flanged RF or FF').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flanged RF or FF').name + "'" + " value=" + "'" + document.getElementById('Flanged RF or FF').value + "'" + "></td><tr>")


}

if(document.myForm.ends[i].value=="Wafer"){ //-------write fields attached to radio buttons
newWin.document.write("<td>" + document.getElementById('Wafer line flanges').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Wafer line flanges').name + "'" + " value=" + "'" + document.getElementById('Wafer line flanges').value + "'" + "></td><tr>")

if(document.getElementById('Wafer line flanges').value=="other"){
newWin.document.write("<td>" + document.getElementById('Other_wafer').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Other_wafer').name + "'" + " value=" + "'" + document.getElementById('Other_wafer').value + "'" + "></td><tr>")

}
newWin.document.write("<td>" + document.getElementById('Wafer RF or FF').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Wafer RF or FF').name + "'" + " value=" + "'" + document.getElementById('Wafer RF or FF').value + "'" + "></td><tr>")

}


}
}//-----------------end of loop



for(i = 0; i < 2; i++){// ----------flow test port check
if(document.myForm.Flow_test_port[i].checked){
newWin.document.write("<td>Flow test port</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Flow_test_port[i].name + " value='" + document.myForm.Flow_test_port[i].value + "'></td><tr>")
}
}


for(i = 0; i < 2; i++){// ----------drain port check
if(document.myForm.Drain_port[i].checked){
newWin.document.write("<td>Drain port</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Drain_port[i].name + " value='" + document.myForm.Drain_port[i].value + "'></td><tr>")
}
}

for(i = 0; i < 2; i++){// ----------installation
if(document.myForm.Installation[i].checked){
newWin.document.write("<td>Installation</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Installation[i].name + " value='" + document.myForm.Installation[i].value + "'></td><tr>")
}
}

if(document.getElementById('Actual maximum line pressure').value != ""){
newWin.document.write("<td>" + document.getElementById('Actual maximum line pressure').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Actual maximum line pressure').name + "'" + " value=" + "'" + document.getElementById('Actual maximum line pressure').value + "'" + "></td><tr>")
}

if(document.getElementById('Actual maximum line pressure').value != ""){
newWin.document.write("<td>" + document.getElementById('Actual maximum line pressure units').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Actual maximum line pressure units').name + "'" + " value=" + "'" + document.getElementById('Actual maximum line pressure units').value + "'" + "></td><tr>")
}

//------------------
if(document.getElementById('Flow rate through the Inbal Valve size 1').value != ""){
newWin.document.write("<td>" + document.getElementById('Flow rate through the Inbal Valve size 1').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 1').name + "'" + " value=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 1').value + "'" + "></td><tr>")
}

if(document.getElementById('Flow rate through the Inbal Valve size 2').value != ""){
newWin.document.write("<td>" + document.getElementById('Flow rate through the Inbal Valve size 2').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 2').name + "'" + " value=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 2').value + "'" + "></td><tr>")
}

if(document.getElementById('Flow rate through the Inbal Valve size 3').value != ""){
newWin.document.write("<td>" + document.getElementById('Flow rate through the Inbal Valve size 3').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 3').name + "'" + " value=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 3').value + "'" + "></td><tr>")
}

if(document.getElementById('Flow rate through the Inbal Valve size 4').value != ""){
newWin.document.write("<td>" + document.getElementById('Flow rate through the Inbal Valve size 4').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 4').name + "'" + " value=" + "'" + document.getElementById('Flow rate through the Inbal Valve size 4').value + "'" + "></td><tr>")
}



if((document.getElementById('Flow rate through the Inbal Valve size 1').value != "")||(document.getElementById('Flow rate through the Inbal Valve size 2').value != "")||(document.getElementById('Flow rate through the Inbal Valve size 3').value != "")||(document.getElementById('Flow rate through the Inbal Valve size 4').value != "")){
newWin.document.write("<td>" + document.getElementById('Flow rate through the Inbal Valve units').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Flow rate through the Inbal Valve units').name + "'" + " value=" + "'" + document.getElementById('Flow rate through the Inbal Valve units').value + "'" + "></td><tr>")
}



//------------------------------
if(document.getElementById('In case of pressure control for size 1 set to:').value != ""){
newWin.document.write("<td>" + document.getElementById('In case of pressure control for size 1 set to:').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('In case of pressure control for size 1 set to:').name + "'" + " value=" + "'" + document.getElementById('In case of pressure control for size 1 set to:').value + "'" + "></td><tr>")
}

if(document.getElementById('In case of pressure control for size 2 set to:').value != ""){
newWin.document.write("<td>" + document.getElementById('In case of pressure control for size 2 set to:').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('In case of pressure control for size 2 set to:').name + "'" + " value=" + "'" + document.getElementById('In case of pressure control for size 2 set to:').value + "'" + "></td><tr>")
}

if(document.getElementById('In case of pressure control for size 3 set to:').value != ""){
newWin.document.write("<td>" + document.getElementById('In case of pressure control for size 3 set to:').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('In case of pressure control for size 3 set to:').name + "'" + " value=" + "'" + document.getElementById('In case of pressure control for size 3 set to:').value + "'" + "></td><tr>")

if(document.getElementById('In case of pressure control for size 4 set to:').value != ""){
newWin.document.write("<td>" + document.getElementById('In case of pressure control for size 4 set to:').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('In case of pressure control for size 4 set to:').name + "'" + " value=" + "'" + document.getElementById('In case of pressure control for size 4 set to:').value + "'" + "></td><tr>")
}

}




if((document.getElementById('In case of pressure control for size 1 set to:').value != "")||(document.getElementById('In case of pressure control for size 2 set to:').value != "")||(document.getElementById('In case of pressure control for size 3 set to:').value != "")||(document.getElementById('In case of pressure control for size 4 set to:').value != "")){
newWin.document.write("<td>" + document.getElementById('In case of pressure control, set to units').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('In case of pressure control, set to units').name + "'" + " value=" + "'" + document.getElementById('In case of pressure control, set to units').value + "'" + "></td><tr>")
}
//--------------------------

if(document.getElementById('solenoid_table').style.display == "inline"){ //---solenoid condition start

for(i = 0; i < 2; i++){// ----------Solenoid radio choice
if(document.myForm.Solenoid_Valve[i].checked){
newWin.document.write("<td>Solenoid valve</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Solenoid_Valve[i].name + " value='" + document.myForm.Solenoid_Valve[i].value + "'></td><tr>")

//if(document.getElementById('Solenoid Valve ACDC').value != "AC"){
if(document.myForm.Solenoid_Valve[i].value=="Other"){//-----write fields connected to Other
if(document.getElementById('Solenoid Valve Volt').value != "other"){
newWin.document.write("<td>" + document.getElementById('Solenoid Valve Volt').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Solenoid Valve Volt').name + "'" + " value=" + "'" + document.getElementById('Solenoid Valve Volt').value + "'" + "></td><tr>")
}
//}
if(document.getElementById('Solenoid Valve Volt').value=="other"){
newWin.document.write("<td>" + document.getElementById('Other Solenoid Valve Voltage').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Other Solenoid Valve Voltage').name + "'" + " value=" + "'" + document.getElementById('Other Solenoid Valve Voltage').value + "'" + "></td><tr>")
}
newWin.document.write("<td>" + document.getElementById('Solenoid Valve ACDC').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Solenoid Valve ACDC').name + "'" + " value=" + "'" + document.getElementById('Solenoid Valve ACDC').value + "'" + "></td><tr>")
}


if(document.getElementById('Solenoid Valve ACDC').value == "AC"){
newWin.document.write("<td>" + document.getElementById('Solenoid Valve AC Frequency').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Solenoid Valve AC Frequency').name + "'" + " value=" + "'" + document.getElementById('Solenoid Valve AC Frequency').value + "'" + "></td><tr>")
}
}
}//----end of fields connected to other

newWin.document.write("<td>" + document.getElementById('Solenoid valve body').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Solenoid valve body').name + "'" + " value=" + "'" + document.getElementById('Solenoid valve body').value + "'" + "></td><tr>")

if(document.getElementById('Hazardous Area Classification').value != ""){
if(document.getElementById('Hazardous Area Classification').value != "Remplis ici"){
newWin.document.write("<td>" + document.getElementById('Hazardous Area Classification').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Hazardous Area Classification').name + "'" + " value=" + "'" + document.getElementById('Hazardous Area Classification').value + "'" + "></td><tr>")
}
}

for(i = 0; i < 2; i++){
if(document.myForm.Enclosure_protection[i].checked){
newWin.document.write("<td>Enclosure protection</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Enclosure_protection[i].name + " value=" + document.myForm.Enclosure_protection[i].value + "></td><tr>")


if(document.myForm.Enclosure_protection[i].value=="Standard"){
newWin.document.write("<td>" + document.getElementById('Enclosure protection standard option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Enclosure protection standard option').name + "'" + " value=" + "'" + document.getElementById('Enclosure protection standard option').value + "'" + "></td><tr>")
}

if(document.myForm.Enclosure_protection[i].value=="Ex.proof"){
newWin.document.write("<td>" + document.getElementById('Enclosure protection Ex.proof option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Enclosure protection Ex.proof option').name + "'" + " value=" + "'" + document.getElementById('Enclosure protection Ex.proof option').value + "'" + "></td><tr>")

if(document.getElementById('Enclosure protection Ex.proof option').value == "other"){
newWin.document.write("<td>" + document.getElementById('other Enclosure protection Ex.proof option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('other Enclosure protection Ex.proof option').name + "'" + " value=" + "'" + document.getElementById('other Enclosure protection Ex.proof option').value + "'" + "></td><tr>")
}
}
}
}

newWin.document.write("<td>" + document.getElementById('Inbal Valve closes when solenoid valve').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Inbal Valve closes when solenoid valve').name + "'" + " value=" + "'" + document.getElementById('Inbal Valve closes when solenoid valve').value + "'" + "></td><tr>")
}//-----end of solenoid condition


//---------control trim
for(i = 0; i < 2; i++){
if(document.myForm.Control_trim_materials[i].checked){
newWin.document.write("<td>Control trim materials</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Control_trim_materials[i].name + " value=" + document.myForm.Control_trim_materials[i].value + "></td><tr>")

if(document.myForm.Control_trim_materials[i].value == "Non-standard"){
newWin.document.write("<td>" + document.getElementById('Non-standard option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Non-standard option').name + "'" + " value=" + "'" + document.getElementById('Non-standard option').value + "'" + "></td><tr>")

if(document.getElementById('Non-standard option').value == "other"){
newWin.document.write("<td>" + document.getElementById('other Non-standard option').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('other Non-standard option').name + "'" + " value=" + "'" + document.getElementById('other Non-standard option').value + "'" + "></td><tr>")
}

}
}
}

for(i = 0; i < 2; i++){
if(document.myForm.Full_or_basic_control_trim[i].checked){
newWin.document.write("<td>Full or basic control trim</td><td>" + "<input style='width:170px; border:none; color:red' type='text' name=" + document.myForm.Full_or_basic_control_trim[i].name + " value=" + document.myForm.Full_or_basic_control_trim[i].value + "></td><tr>")
}
}

//---------end control trim


//---------fluid
newWin.document.write("<td>" + document.getElementById('Fluid').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Fluid').name + "'" + " value=" + "'" + document.getElementById('Fluid').value + "'" + "></td><tr>")
//--------end fluid


newWin.document.write("<td colspan=2><hr></td><TR>")
newWin.document.write("<td colspan=2>Filled by</td><TR>")
//-------------------details
if(document.getElementById('Company').value != ""){
newWin.document.write("<td>" + document.getElementById('Company').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Company').name + "'" + " value=" + "'" + document.getElementById('Company').value + "'" + "></td><tr>")
}

if(document.getElementById('Name').value != ""){
newWin.document.write("<td>" + document.getElementById('Name').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Name').name + "'" + " value=" + "'" + document.getElementById('Name').value + "'" + "></td><tr>")
}

if(document.getElementById('Function').value != ""){
newWin.document.write("<td>" + document.getElementById('Function').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Function').name + "'" + " value=" + "'" + document.getElementById('Function').value + "'" + "></td><tr>")
}

if(document.getElementById('Telephone').value != ""){
newWin.document.write("<td>" + document.getElementById('Telephone').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Telephone').name + "'" + " value=" + "'" + document.getElementById('Telephone').value + "'" + "></td><tr>")
}

if(document.getElementById('Fax').value != ""){
newWin.document.write("<td>" + document.getElementById('Fax').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Fax').name + "'" + " value=" + "'" + document.getElementById('Fax').value + "'" + "></td><tr>")
}

if(document.getElementById('E-mail').value != ""){
newWin.document.write("<td>" + document.getElementById('E-mail').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('E-mail').name + "'" + " value=" + "'" + document.getElementById('E-mail').value + "'" + "></td><tr>")
}

if(document.getElementById('Address').value != ""){
newWin.document.write("<td>" + document.getElementById('Address').name + "</td><td><input style='width:170px; border:none; color:red' type=text name=" + "'" + document.getElementById('Address').name + "'" + " value=" + "'" + document.getElementById('Address').value + "'" + "></td><tr>")
}


//------------------
newWin.document.write("<td><input type=submit value='Envoyer' style='background-color:cornsilk; width:100px; font-size:8pt; height:15pt'></td>")
newWin.document.write("<td><input type=button value='Modifier' onclick='window.close()' style='background-color:cornsilk; width:100px; font-size:8pt; height:15pt'></td>")

newWin.document.write("</form>")



newWin.document.write("</table>")
newWin.document.write("</BODY></HTML>")



}

