function ptah(ptah_param) {if (ptah_param) document.location.href = 'site.aspx?i=' + ptah_param; else {c = 'http:/' + '/' + document.location.hostname; if (document.getElementsByTagName) {a = document.getElementsByTagName("a"); for (l = 0; l < a.length; l++) if ((a[l].href.substring(0, c.length) != c || a[l].rel == 'external' || a[l].href.indexOf('?i=xu') != -1) && a[l].rel != 'javascript') a[l].target = "_blank"} document.body.innerHTML = document.body.innerHTML.replace(/{email:([\w\.-]+)\\([\w\.-]+)}/g, '$1@$2')}} function ptah_byid(ptah_id) {return document.getElementById(ptah_id)} function ptah_automessage(ptah_message, ptah_array) {ptah_str = ''; if (ptah_array.length != 0) {for (l = 0; l < ptah_array.length; l++) ptah_str += (l == 0 ? '' : (l == ptah_array.length - 1 ? ' and ' : ', ')) + ptah_array[l]; ptah_str = ptah_message.replace('/', ptah_str)} return ptah_str} String.prototype.trim = function() {return this.replace(/^\s+|\s+$/, '')}; function vali_contact() {vali_array = []; if (ptah_byid('f_name').value.trim() == '') {vali_array.push('you haven\'t told us your name'); ptah_byid('v_name').className = 'red'} else ptah_byid('v_name').className = ''; if (ptah_byid('f_email').value.indexOf('@') == -1) {vali_array.push('you haven\'t entered an email address'); ptah_byid('v_email').className = 'red'} else ptah_byid('v_email').className = ''; if (ptah_byid('f_info').value.trim() == '') {vali_array.push('you haven\'t provided any further information'); ptah_byid('v_info').className = 'red'} else ptah_byid('v_info').className = ''; ptah_byid('vali_help').innerHTML = ptah_automessage('Your message could not be sent because /.', vali_array); return vali_array.length == 0} function calc_hide(calc_id, calc_state) {ptah_byid('calc_' + calc_id).style.display = calc_state == 1 ? 'inline' : 'none'; if (calc_state == 1) document.location.href = '#calcto_' + calc_id} function mini_calc(mini_value) {mini_dep = Math.ceil(mini_value / 10); with (ptah_byid('m_deposit')) if (value == '' && !isNaN(mini_dep)) value = mini_dep} 