// JavaScript Document var alists = new Array(new Array('For help saving my marriage','Saving your marriage is possible - Enter your name and email below to get free information about how to save your marriage.','','http://forms.aweber.com/form/displays.htm?id=jAwsTJwczIyM'),new Array('To try and stop my divorce','You can stop your divorce - Find out how to avoid making mistakes - Get a free ecourse on how to stop your divorce today.','','http://forms.aweber.com/form/displays.htm?id=jIzsDMwcHIyMnA=='),new Array('To download divorce papers','To download divorce papers - Sign up for our free service which will allow you to access free divorce papers.','','http://forms.aweber.com/form/displays.htm?id=nByMDGysHIzM'),new Array('To find out how to get a cheap divorce','To find out how to get a cheap divorce enter you details below - we\'ll show you how you can save thousands.','','http://forms.aweber.com/form/displays.htm?id=jOyMnOwsHKzsrA=='),new Array('To file for a divorce online','To file for a divorce online - Get our free guide to divorcing online by entering your details below.','','http://forms.aweber.com/form/displays.htm?id=rMwMDAzMzIwM'),new Array('Others','Thank you for sharing that request. To receive a free newsletter with tips and information on divorce, child custody or even how to save your marriage enter your name and email below.','','http://forms.aweber.com/form/displays.htm?id=rAwsDIxs7GzM')) function showAForm(inp) { eAWrap = document.getElementById('awrap'); eAWrap.innerHTML = '

'+alists[inp.value][1]+'

' + '' + '' + '' + '' + '
Name:
Email:
Gender: Male Female
' + alists[inp.value][2] + ''; } function getLForm(inp) { tOthers = document.getElementById('tOthers'); if (inp.parentNode.id == 'oli') { if (!tOthers) { eInput = document.createElement('input'); eInput.setAttribute('name', 'custom Others'); eInput.setAttribute('id', 'tOthers'); eInput.setAttribute('value', 'Please specify...'); eInput.setAttribute('size', 40); eInput.setAttribute('style', 'margin-left:5px'); eInput.onclick = function () { if (this.value == 'Please specify...') { this.value = ''; } } eInput.onblur = function () { if (this.value == '') { this.value = 'Please specify...'; } } inp.parentNode.appendChild(eInput); } } else if (tOthers) { tOthers.parentNode.removeChild(tOthers); } showAForm(inp); } function showQuestions() { eQWrap = document.getElementById('qwrap'); eQWrap.innerHTML = '

Please tell us the main reason for visiting our site:

'; eUl = document.createElement('ul'); for (i=0;iSorry. An error occured while ' + 'trying to submit your answers. You may have entered an invalid email or you have already submitted to ' + 'this survey using the provided email.

Please correct your inputs below ' + 'and resubmit again. All fields are required.

'; document.getElementById('qwrap').innerHTML = hErrMsg; //timerClose(10); } } } var cTInerval = 0; var cTimer = 0; function timerClose(t) { cTimer = t; document.getElementById('ctimer').innerHTML = cTimer; cTInerval = setInterval('updateTimer()', 1000); } function updateTimer() { cTimer = cTimer - 1 document.getElementById('ctimer').innerHTML = cTimer; if (!cTimer) { clearInterval(cTInerval); closeABox('sbox'); } } function showLoader() { eWrap = document.getElementById('qwrap'); hLoader = '
' + '
Submitting your answers. Please wait...
'; eWrap.innerHTML = hLoader; } function closeABox(wrapId) { eSBox = document.getElementById(wrapId); eSBox.style.display = 'none'; Set_Cookie('aweber_stop', 1, 24, '/', '', ''); } function createCookie(name,value,hours) { if (hours) { var date = new Date(); date.setTime( date.getTime() + (hours*60*60*1000) ); var expires = "; expires="+date.toGMTString(); } else expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function processData() { //eFawrap = document.getElementById('fawrap'); //eFawrap.innerHTML = ''; document.getElementById('receiver').setAttribute('stat', 'submitted'); if (document.getElementById('tOthers')) { document.getElementById('Others').value = document.getElementById('tOthers').value; } showLoader(); }; function setupBox() { iLoader = new Image(); //preloading iLoader.src = '/aweberforms/images/loading.gif'; hSurveyBox = '
' + '
' + '

Divorce Survey ' + '[Close]

'+ '
' + '
' + '
'; document.write(hSurveyBox); showQuestions(); } function startAweber() { if (!Get_Cookie('aweber_stop')) { setupBox(); } } function Set_Cookie( name, value, expires, path, domain, secure ) { var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 * 60; // * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function Get_Cookie( check_name ) { var a_all_cookies = document.cookie.split( ';' ); var a_temp_cookie = ''; var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; // set boolean t/f default f for ( i = 0; i < a_all_cookies.length; i++ ) { a_temp_cookie = a_all_cookies[i].split( '=' ); cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); if ( cookie_name == check_name ) { b_cookie_found = true; if ( a_temp_cookie.length > 1 ) { cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } function Delete_Cookie( name, path, domain ) { if ( Get_Cookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } //Delete_Cookie('aweber_stop', '/', ''); startAweber();