<!-- This must be added to the FORM header onSubmit="return validateForm(this)" -->

var OSs="";
var APIs="";
var POSTs="";

<!-- Used to clear marked radio buttons -->
function clearCheckBox() {
document.dreg.ck.checked = false;
document.dreg.cs.checked = false;
document.dreg.cb.checked = false;
document.dreg.cpub.checked = false;
document.dreg.cd.checked = false;
document.dreg.cq.checked = false;
document.dreg.cp.checked = false;
for (j = 0; j < 6; j++) {
  document.dreg.q[j].checked = false;
  }
for (j = 0; j < 4; j++) {
  document.dreg.rt[j].checked = false;
  }
}

<!-- This validates the data entered -->

function validateForm(f) {
 var output = '';
 var msg = '';
 var gotolink = '';

<!-- First do basic validation of request type info -->
 
msg = '  - What kind of request is this?\n';
for (j = 0; j < 6; j++) {
  if (document.dreg.q[j].checked == true) msg="";
  }
output += msg;

msg = '  - What does this request relate to?\n';
for (j = 0; j < 4; j++) {
  if (document.dreg.rt[j].checked == true) msg="";
  }
output += msg;

if (output != '') {
  alert('Please indicate the following: \t\t\t   \n\r' + output);
  return;
 } 

<!-- Have they already opened a PMR -->

if ((document.dreg.cp.checked == true) && (document.dreg.rt[1].checked == true)){
   alert('Please log in and check the status of your PMR on-line.')
   parent.location='https://techsupport.services.ibm.com/retail/login'
   return
 }

<!-- Have they already opened a PMH or submitted a question? -->

if ((document.dreg.cp.checked == true) && (document.dreg.rt[0].checked == true)){
   alert('Please call 800-IBM-SERV in the US and check the status of your PMH or service request.')
   return
 }
if (document.dreg.urgent.checked == true){
   alert('Please first submit your request to Techline. You will\n\rthen get information on submitting a priority support alert.')
   return
 }

<!-- Have they already submitted a question? -->

if (document.dreg.cq.checked == true){
   alert('A support team member should have replied to your request.\n\rPlease ask for a status update from that person via email.\n\r');
   return;
 }

<!-- Second Route Downloads & Pubs on-line help -->

if (document.dreg.q[4].checked == true){
   if ((document.dreg.rt[0].checked == true) || (document.dreg.rt[2].checked == true)){ 
     parent.location='http://www2.clearlake.ibm.com/store/support/index.html'
     alert("Next is the main support page. Click on your product\n\n\r");
     }
   if (document.dreg.rt[1].checked == true){ 
     parent.location='http://techsupport.services.ibm.com/retail/fixes?expanded=rssdownloads#rss'
     }
   if (document.dreg.rt[3].checked == true){ 
     alert('Please check with your Independent Software Provider.');
     }
   return;
 }

if (document.dreg.q[5].checked == true){
   if (document.dreg.rt[3].checked == true){ 
     alert('Please check with your Independent Software Provider.');
     }
   else {
     parent.location='http://www2.clearlake.ibm.com/store/support/html/pubs.html'
     alert("Next is the publications page. In the upper right hand index, click on a product\n\n\r");
     }
   return;
 }


<!-- Third start validating self-support options and point to on-line help -->

<!-- Have they checked the KB & publications? -->

if (document.dreg.ck.checked == false){
   window.open('http://www2.clearlake.ibm.com/store/support/html/knowledgebase.html','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
   alert('Please search the Knowledgebase using keywords related\n\rto your request. This is the fastest way to get help!\n\n\rIf you don"t find an answer, check the Knowledgebase box\n\rand click Continue.');
   return;
 }

if (document.dreg.cpub.checked == false){
   window.open('http://www2.clearlake.ibm.com/store/support/html/pubs.html','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
   alert("Please check for publications related to your request.\n\n\rIf you don't find an answer, check the publications box\n\rand click Continue.");
   return;
 }

<!-- For hw problems, have they checked support pages & updated BIOS? -->
if ((document.dreg.q[2].checked == true) && (document.dreg.rt[0].checked == true)){ 
   if ((document.dreg.cs.checked == false) || (document.dreg.cb.checked == false)){
     window.open('http://www2.clearlake.ibm.com/store/support/index.html','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
     alert("Please check for BIOS/Firmware & system driver updates related to your request.\n\n\rIf you don't find a solution, check the BIOS & support page boxs\n\rand click Continue.");
     return;
   }
 }

<!-- For SW Technical Questions, have they checked support pages? -->
if ((document.dreg.q[1].checked == true) && (document.dreg.cs.checked == false) &&  ((document.dreg.rt[1].checked == true) || (document.dreg.rt[2].checked == true))){
     window.open('http://techsupport.services.ibm.com/retail/support','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
    alert("Please check software support web pages related to your request.\n\n\rIf you don't find an answer, check the support page box\n\rand click Continue.");
   return;
 }

<!-- For problems, have they checked support pages? -->
if ((document.dreg.q[2].checked == true) && (document.dreg.cs.checked == false)){
   if (document.dreg.rt[1].checked == true){
     window.open('http://techsupport.services.ibm.com/retail/support','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
   }
   else {
     window.open('http://www2.clearlake.ibm.com/store/support/index.html','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
   }
   alert("Please check support web pages related to your request.\n\n\rIf you don't find an answer, check the support page box\n\rand click Continue.");
   return;
 }

<!-- For open system problems, have they checked for updated OPOS/JavaPOS? -->
if (((document.dreg.rt[1].checked == false) && (document.dreg.rt[0].checked == false)) && (document.dreg.q[2].checked == true)){ 
   if (document.dreg.cd.checked == false){
     window.open('http://www2.clearlake.ibm.com/store/support/html/drivers.html','','toolbar=no, menubar=no, scrollbars=1,top=20,left=20,resizable=1,location=no,height=500,width=600');
     alert("Please check for updated OPOS or JavaPOS drivers.\n\n\rIf you are already at the current level, check the\n\rOPOS/JavaPOS box and click Continue.");
     return;
   }
 }

<!-- Call for HW Problems -->
if ((document.dreg.q[2].checked == true) && (document.dreg.rt[0].checked == true)){
   alert('Please call 800-IBM-SERV in the US and open a PMH or service request.')
   return
 }

<!-- Open a PMR for 4690 SW Problems -->
if ((document.dreg.q[2].checked == true) && (document.dreg.rt[1].checked == true)){
   alert('Please log in and open a PMR on-line.')
   parent.location='https://techsupport.services.ibm.com/retail/problems'
   return
 }

<!-- all open system driver questions go to DQ form -->
if (document.dreg.q[3].checked == true) {
   output = 'Please submit your question to the Driver Support Team.'
   parent.location='http://www2.clearlake.ibm.com/store/support/html/dquestion.html'
   if (document.dreg.rt[1].checked == true){
     parent.location='http://www2.clearlake.ibm.com/store/support/html/plquestion.html'
     output = 'Please submit your question to the Techline Team.'
     }
   alert( output)
   return
 }

<!-- all non-IBM aps go to ISV -->
if (document.dreg.rt[3].checked == true) {
   alert('Please submit your question to your Independent Software Provider.')
   return
 }

alert('Please submit your question to Techline.')
if (document.dreg.rt[0].checked == true){
  parent.location='http://www2.clearlake.ibm.com/store/support/html/hquestion.html'
  }
  else {
  parent.location='http://www2.clearlake.ibm.com/store/support/html/plquestion.html'
  }
return;
}
