function FinalCheckContact() { var bError=false; sError='The following errors were found:\n'; if(!Validate(document.getElementById('fname').value,'fname','Client First Name',1,'string','')) bError=true; if(!Validate(document.getElementById('lname').value,'lname','Client Last Name',1,'string','')) bError=true; if(!Validate(document.getElementById('email').value,'email','Client Email',1,'email','')) bError=true; if(!Validate(document.getElementById('confirmEmail').value,'confirmEmail','Client Email',1,'email','email')) bError=true; if(!Validate(document.getElementById('captcha').value,'captcha','Authentication',1,'string','')) bError=true; if(select_check('dstContactViaType')) bError=true; if(bError==true) { alert(sError); return false; } else return true; } function FinalCheckAssignment() { var bError=false; sError='The following errors were found:\n'; if(!Validate(document.getElementById('fname').value,'fname','Client First Name',1,'string','')) bError=true; if(!Validate(document.getElementById('lname').value,'lname','Client Last Name',1,'string','')) bError=true; if(!Validate(document.getElementById('client_organization').value,'client_organization','Client Company Name',1,'string','')) bError=true; if(!Validate(document.getElementById('client_address').value,'client_address','Client Address',1,'string','')) bError=true; if(!Validate(document.getElementById('client_city').value,'client_city','Client City',1,'string','')) bError=true; if(!Validate(document.getElementById('client_state').value,'client_state','Client State',1,'state','')) bError=true; if(!Validate(document.getElementById('client_zip').value,'client_zip','Client Zip',1,'zip','')) bError=true; if(!Validate(document.getElementById('email').value,'email','Client Email',1,'email','')) bError=true; if(!Validate(document.getElementById('confirmEmail').value,'confirmEmail','Client Email',1,'email','email')) bError=true; if(!Validate(document.getElementById('client_phone').value,'client_phone','Client Phone',1,'phone','')) bError=true; if(!Validate(document.getElementById('captcha').value,'captcha','Authentication',1,'string','')) bError=true; if(!Validate(document.getElementById('subject_first_name').value,'subject_first_name','Subject First Name',1,'string','')) bError=true; if(!Validate(document.getElementById('subject_last_name').value,'subject_last_name','Subject Last Name',1,'string','')) bError=true; if(!Validate(document.getElementById('subject_dob').value,'subject_dob','Subject DOB',0,'date','')) bError=true; if(!Validate(document.getElementById('subject_city').value,'subject_city','Subject City',1,'string','')) bError=true; if(!Validate(document.getElementById('subject_state').value,'subject_state','Subject State',1,'state','')) bError=true; if(!Validate(document.getElementById('subject_zip').value,'subject_zip','Subject Zip',1,'zip','')) bError=true; if(!Validate(document.getElementById('subject_phone').value,'subject_phone','Subject Phone',0,'phone','')) bError=true; if(!Validate(document.getElementById('loss_date').value,'loss_date','Date of Loss',0,'date','')) bError=true; if(!Validate(document.getElementById('employer_insured_phone').value,'employer_insured_phone','Employer/Insured Phone',0,'phone','')) bError=true; if(select_check('dstPIAssignmentType')) bError=true; if(select_check('dstPIClaimType')) bError=true; if(select_check('dstContactViaType')) bError=true; if(bError==true) { alert(sError); return false; } else return true; } function FinalCheckNewsletter() { var bError=false; sError='The following errors were found:\n'; if(!Validate(document.getElementById('Email').value,'Email','Email',0,'email','')) bError=true; if(bError==true) { alert(sError); return false; } else return true; } function expand(id,rows,cols) { document.getElementById(id).rows=rows; document.getElementById(id).cols=cols; } function MakeRequest(this_action,this_id) { var http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari, ... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/html'); // See note below about this line } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } else { if (this_action == ('phoneCheck')){ var string = document.getElementById(this_id).value; var str = 'action='+this_action+'&string='+string+''; http_request.onreadystatechange = function() { alertContentsField(http_request,this_id); }; } http_request.open('POST', 'https://www.migclaims.com/', true); //production http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", str.length); http_request.setRequestHeader("Connection", "close"); http_request.send(str); return true; } } function alertContents(http_request,this_id) { if (http_request.readyState == 4) { if (http_request.status == 200) { document.getElementById(this_id).innerHTML=http_request.responseText ; return true; } else { alert('There was a problem with the request.'); return false; } } else return false; } function alertContentsField(http_request,this_id) { if (http_request.readyState == 4) { if (http_request.status == 200) { document.getElementById(this_id).value=http_request.responseText ; return true; } else { alert('There was a problem with the request.'); return false; } } else return false; } function select_check(id){ var n = document.getElementById(id).selectedIndex; var select_value = document.getElementById(id)[n].value; if (select_value ==('0')){ alert('Please make a selection.'); document.getElementById(id).style.backgroundColor = "#ff0000"; return true; }else{ document.getElementById(id).style.backgroundColor = "#ffffff"; return false; } }