català | español
|
|
Consejos y pautas de actuación |
.bmform_outer1003037{width:220px;} .bmform_inner1003037{border:1px solid #797a7b;} .bmform_head1003037{background-color:#d0d6d9; height:37px;} .bm_headetext1003037{color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:18px; padding:6px 10px 0 10px; font-weight:bold;} .bmform_body1003037{background-color:#ffffff; color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:12px; padding:12px; } .bmform_introtxt1003037{font-family:Arial, Helvetica, sans-serif; font-size:12px; padding-bottom:12px;} .bmform_frmtext1003037{padding: 5px 0px 3px 0px; display:block; float:none; text-align: left; text-decoration: none; width: auto; font-weight:bold;} .bmform_frm1003037{color:#000000; display:block; float:none; font-family:Verdana,sans-serif; font-size:14px; font-style:normal; font-weight:normal; text-align:left; text-decoration:none; width:190px; padding:3px;} .bmform_button1003037{text-align:center; padding-top:15px;} .bmform_submit1003037{padding:3px 12px 3px 12px;} .bmform_footer1003037{}.footer_bdy1003037{}.footer_txt1003037{} #tdLogo1003037 img{margin-botton:10px; max-width:230px;}
function CheckField1003037_GDLK(fldName, frm){ var fldObj = document.getElementsByName(fldName); if ( fldObj.length > 1) { for ( var i = 0, l = fldObj.length; i < l; i++ ) { if ( fldObj[0].type =='select-one' ) { if( fldObj[i].selected && i==0 && fldObj[i].value == '' ) { return false; } if ( fldObj[i].selected ) { return true; } } else { if ( fldObj[i].checked ) { return true; } }; } return false; } else { if ( fldObj[0].type == "checkbox" ) { return ( fldObj[0].checked ); } else if ( fldObj[0].type == "radio" ) { return ( fldObj[0].checked ); } else { fldObj[0].focus(); return (fldObj[0].value.length > 0); }} }
function _doSubmit1003037_GDLK(frm){ if(_checkSubmit1003037_GDLK(frm) ) { _doPost1003037_GDLK(frm); } }
function _doPost1003037_GDLK(frm) { var f = document.createElement("form"); f.setAttribute('accept-charset', "UTF-8"); f.setAttribute('method', "post"); f.setAttribute('action', "https://lb.benchmarkemail.com//code/lbform");
var elms = document.getElementsByName("frmLB" + frm)[0].getElementsByTagName("*");var ty = ""; for (var ei = 0; ei < elms.length; ei++) {ty = elms[ei].type; if (ty == "hidden" || ty == "text" || (ty == "checkbox" && elms[ei].checked) || (ty == "radio" && elms[ei].checked) || ty == "textarea" || ty == "select-one" || ty == "button") {elm = elms[ei]; var i = document.createElement("input"); i.type = "hidden"; i.name = elm.name.replace("_GDLK",""); i.id = elm.id; i.value = elm.value; f.appendChild(i);} } document.getElementsByTagName('body')[0].appendChild(f);f.submit();}
function rmspaces(x) {var leftx = 0;var rightx = x.length -1;while ( x.charAt(leftx) == ' ') { leftx++; }while ( x.charAt(rightx) == ' ') { --rightx; }var q = x.substr(leftx,rightx-leftx + 1);if ( (leftx == x.length) && (rightx == -1) ) { q =''; } return(q); }
function checkfield(data) {if (rmspaces(data) == ""){return false;}else {return true;}}
function isemail(data) {var flag = false;if ( data.indexOf("@",0) == -1 || data.indexOf("",0) != -1 ||data.indexOf("/",0) != -1 ||!checkfield(data) || data.indexOf(".",0) == -1 || data.indexOf("@") == 0 ||data.lastIndexOf(".") < data.lastIndexOf("@") ||data.lastIndexOf(".") == (data.length - 1) ||data.lastIndexOf("@") != data.indexOf("@") ||data.indexOf(",",0) != -1 ||data.indexOf(":",0) != -1 ||data.indexOf(";",0) != -1 ) {return flag;} else {var temp = rmspaces(data);if (temp.indexOf(' ',0) != -1) { flag = true; }var d3 = temp.lastIndexOf('.') + 4;var d4 = temp.substring(0,d3);var e2 = temp.length - temp.lastIndexOf('.') - 1;var i1 = temp.indexOf('@');if ( (temp.charAt(i1+1) == '.') || ( e2 < 1 ) ) { flag = true; }return !flag;}}
function CheckFieldD1003037_GDLK(fldH, chkDD, chkMM, chkYY, reqd, frm){ var retVal = true; var dt = validDate1003037_GDLK(chkDD, chkMM, chkYY, frm);var nMM = document.getElementsByName(chkMM)[0].value; var nDD = document.getElementsByName(chkDD)[0].value; var nYY = document.getElementsByName(chkYY)[0].value; var nDate = nMM + " " + nDD + " " + nYY; if ( dt == null && reqd == 1 ) { nDate = ""; retVal = false; } else if ( (nDD != "" || nMM != "" || nYY != "") && dt == null) { retVal = false; nDate = "";} if ( retVal ) {document.getElementsByName(fldH)[0].value = nDate;} return retVal; }
function validDate1003037_GDLK(chkDD, chkMM, chkYY, frm) {var objDate = null; if ( document.getElementsByName(chkDD)[0].value != "" && document.getElementsByName(chkMM)[0].value != "" && document.getElementsByName(chkYY)[0].value != "" ) {var mSeconds = (new Date(document.getElementsByName(chkYY)[0].value - 0, document.getElementsByName(chkMM)[0].selectedIndex - 1, document.getElementsByName(chkDD)[0].value - 0)).getTime();var objDate = new Date();objDate.setTime(mSeconds);if (objDate.getFullYear() != document.getElementsByName(chkYY)[0].value - 0 || objDate.getMonth() != document.getElementsByName(chkMM)[0].selectedIndex - 1 || objDate.getDate() != document.getElementsByName(chkDD)[0].value - 0){objDate = null;}}return objDate;}
function _checkSubmit1003037_GDLK(frm){
if ( !isemail( document.getElementsByName("fldEmail_GDLK")[0].value) ) {
alert("Por favor introduzca el Email");
return false;
}
if ( !CheckField1003037_GDLK("fldfirstname_GDLK", frm) ) {
alert("Por favor introduzca el Nombre:");
return false;
}
if(isemail(document.getElementById("fldEmail_GDLK").value) && window && window.JB_TRACKER && typeof window.JB_TRACKER.jbSubmitForm === 'function') {
window.JB_TRACKER.jbSubmitForm({
email: document.getElementById("fldEmail_GDLK").value, didSubmit: true
});
}
return true; }
Subscríbete para recibir las noticias y vídeos de Joan Contreras:
Email *
Nombre: *
Confirma, por favor:
* Campo Obligatorio |