Hello i have a question regarding this tutorial which is translated in English btw , I'm using it for a while and i want to know is it possible to add a poll in it with 3 pre set poll questions that are hidden in the form but the poll appears when the topic is posted.
Poll title: Application voting
Poll answers:
Positive
Negative
Neutral
Here is the code I'm using
Poll title: Application voting
Poll answers:
Positive
Negative
Neutral
Here is the code I'm using
- Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
jQuery(function(){
SF_PARAMETROS = {
//###### START EDITABLE ZONE ###########################################################################
/************** START GENERAL PARAMETERS *********************/
TITULO_FORMULARIO: "Application Form",
TITULO_TABLA_PUBLICADA: "",
TIPO_MENSAJE: MENSAJE.NUEVO,
TIPO_TEMA: TEMA.NORMAL,
ID_FORO: 39,
ID_TEMA: 63,
SKIN_DATEPICKER: DATEPICKER.OSCURO,
PERMITIR_HTML: false,
SKIN_SALIDA: SKIN.OSCURO
/************** END GENERAL PARAMETERS ******************/
};
/************** START GROUPS ZONE ************************************/
GRUPO["DATOSPERSONALES"]= "Personal Information";
GRUPO["CHARINFO"]= "Character Information";
GRUPO["ADDITIONAL"]= "Additional Information";
//You can add more groups
/************** END GROUPS ZONE ********************************/
/************** START FIELDS ZONE *************************************/
MISCAMPOS["TopicTitle"] = ["Topic Title", CAMPO.TEXTO, TIPO.OBLIGATORIO];
MISOPCIONES["TopicTitle"] = [OPS.NOPUBLISH];
MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO, TIPO.OBLIGATORIO];
MISOPCIONES["Username"] = [OPS.NOPUBLISH];
MISCAMPOS["Name"] = ["Name:", CAMPO.TEXTO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
MISCAMPOS["Country"] = ["Country:", CAMPO.TEXTO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
MISCAMPOS["Age"] = ["Age:", CAMPO.TEXTO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
MISCAMPOS["Gender"] = ["Gender:", CAMPO.SEXO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
//You can add more fields. Above are examples
/************** END FIELDS ZONE **********************************/
//###### END EDITABLE ZONE ############################################################################
SF_PARAMETROS["NOMBRE_INVITADO"] = "Anonymous";
SF_PARAMETROS["AVATAR_DEFECTO"] = "http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";
SF_PARAMETROS["CSS_PREFIJO"] = "sf_" + SF_PARAMETROS.SKIN_SALIDA + "_";
SF_PARAMETROS["CSS_CLASE_TABLA"] = "tabla";
SF_PARAMETROS["CSS_CLASE_CABECERA"] = "cabecera";
SF_PARAMETROS["CSS_CLASE_FILA"] = "fila";
SF_PARAMETROS["CSS_CLASE_FILAGRUPO"] = "";
SF_PARAMETROS["CSS_CLASE_CELDAGRUPO"] = "celdaGrupo";
SF_PARAMETROS["CSS_CLASE_CELDAGRUPOCIERRE"] = "celdaGrupoCierre";
SF_PARAMETROS["CSS_CLASE_CELDACAMPO"] = "celdaTitulo";
SF_PARAMETROS["CSS_CLASE_CELDADATO"] = "celdaDato";
setParameters();
sfDo();
if(fa_idusuario() == -1){
jQuery("#form_inner_placeholder input#username").removeAttr("disabled").attr("value", "");
}
});
//Form is loaded
function preProcesoFormulario(){}
//Form is loaded and filled
function preProcesoFormulario2(){
TITULO_FORMULARIO = jQuery("#TopicTitle").val();
}
//Form is loaded, filled and published
function postProcesoFormulario(fv){
jQuery("form>input#username").attr("value", jQuery("#form_inner_placeholder input#username").val());
}
</script>
<!-- FORM CSS -->
<style type="text/css">
/* The whole page */
body {
color: #424242;
text-align: center;
background-color: #222222;
font-family: sans-serif;
}
/**Page**/
#page {text-shadow: 0 1px #FFF; box-shadow: inset 0 0 20px #555555;-webkit-box-shadow: inset 0 0 20px #555555;-moz-box-shadow:0px inset 0 0 20px #555555; border-radius: 7px;color: black;background-color: #E1EBF2;text-align: center;width: 60%;min-width: 330px;margin-left: auto;margin-right: auto;padding: 20px 20px 20px 20px;}
/* Links */
a { color: red; cursor: pointer; bottom: 0px;}
.applinks {padding: 20px;color: black;font-weight: bold;}
.applinks:hover {color: red;font-weight: bold;}
/**Titles**/
.h1 { font-size: 2em; } p a { cursor: pointer; }
.h2 {text-align:center;}
/* The div where the form is */
form#miFormulario {
min-width: 150px; /* Anchura del formulario */
text-shadow: 1px 1px 0px white;
margin: auto;
}
/**Container**/
#container { text-align: center; }
#contenedor_formulario {width:96%;}
/* Area of a group */
form#miFormulario fieldset {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
/* The label or title of a Group */
form#miFormulario legend{
font-weight: bold;
}
/* The title of a field */
form#miFormulario label{
margin-right: 20px;
cursor:text;
}
/* All input fields of type */
form#miFormulario input[type='text']{
width: 100%;
}
/* CSS for non-editable fields, as CAMPO.AVATAR eg */
form#miFormulario input[type="text"][disabled] {
background-color: #D7D7D7;
}
/* CAMPO.AREA_TEXTO */
form#miFormulario textarea {
height: 75px;
width: 100%;
resize: none;
}
/* Fields drop-down list or type multiselection */
form#miFormulario select{
width: 100%;
}
/* Multiselect field */
form#miFormulario select[multiple]{
width: 100%;
}
/* SEND button */
form#miFormulario #submit_div input[type='submit'] {
height: 30px;
width: 100px;
}
/* RESET button */
form#miFormulario #submit_div input[type='reset'] {
height: 30px;
width: 100px;
}
/* Boxes day and month CAMPO.EDAD */
form#miFormulario input[type='text'].dia, form#miFormulario input[type='text'].mes{
width: 30px;
}
/* Case CAMPO.EDAD year*/
form#miFormulario input[type='text'].ano{
width: 50px;
}
/* CAMPO.FECHA */
form#miFormulario input[type='text'].fecha{
width: 75px;
}
/* CAMPO.AVATAR and CAMPO.IMAGEN */
form#miFormulario input.sf_avatar_input, form#miFormulario input.fasf_input_img{
width: 90%;
}
/* CAMPO.IDUSUARIO */
form#miFormulario input.sf_idusuario_input{
width: 50px;
text-align: right;
}
/* Tables */
table[class^="fasf_table_"] {
width: 100%;
font-size: 15px;
}
/* First column: Title */
td[class^="fasf_td0_"] {
width: 50%;
}
/* First Column: Data */
td[class^="fasf_td1_"] {
width: 50%;
}
</style>
<!-- FIN CSS DEL FORMULARIO -->
<html>
<head>
<link rel="shortcut icon"href="http://i37.servimg.com/u/f37/11/67/28/75/lilfla11.png" />
<style type="text/css">
</style>
</head>
<body>
<img src="http://i79.servimg.com/u/f79/11/67/28/75/hgforu11.png" style="width:357px; height:180px;" />
<div id="page">
<span style="width:100%;"><a href="/forum" class="applinks">Forum</a>|<a href="/portal" class="applinks">Portal</a>|<a href="/f39-guild-application-center-open" class="applinks">Application Center</a>|<a href="/f40-accepted-declined" class="applinks">Accepted/Declined</a></span>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="SuperFormulario" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css" />
<div id="hidden" style="display:none"></div>
<div id="fa_hidden_load" style="display:none"></div>
<div id="fa_hidden_load_avatar" style="display:none"></div>
<div id="contenedor_formulario">
<form id="miFormulario" action="/post" method="post" name="post" enctype="multipart/form-data" target="_parent">
<div id="hidden_inputs">
<input type="hidden" name="lt" value="0" />
<input id="mode" type="hidden" name="mode" value="newtopic" />
<input id="auth1" type="hidden" value="" name="auth[]" />
<input id="auth2" type="hidden" value="" name="auth[]" />
<input id="f_o_t" type="hidden" name="" value="" />
</div>
<input id="topictype" type="hidden" name="topictype" value="" />
<input id="cuerpo" type="hidden" name="message" value="" />
<input type="hidden" name="subject" id="titulo" value="" />
<input type="hidden" name="username" id="username" value="" />
<div id="form_inner_placeholder"><img src="http://i37.servimg.com/u/f37/17/45/19/77/preloa10.gif" /></div>
<div align="center" id="submit_div">
<input name="reset" value="Reset" type="reset" style="cursor:pointer;" />
<input name="post" value="Send" onclick="procesarFormulario()" type="submit" style="cursor:pointer;" />
</div>
</form>
</div>
<span style="font-style:italic;font-size: 13px;">(Note:Don't forget to keep an eye on your application after you post it, you will find it in the "Application Center")</span>
</div>
</body>
</html>
<!-- TINYPIC -->
<script type="text/javascript">
tinypic_layout = 'narrow';tinypic_type = 'images';tinypic_links = 'url';tinypic_language = 'es';tinypic_search = 'false';tinypic_autoload = true;
</script>
<script src="http://plugin.tinypic.com/j/plugin.js" type="text/javascript"></script>
<script>
function openTinypic(){
jQuery("iframe[id^='tinypic_plugin_']").dialog({
title: "Upload image",
height: 400,
resizable: true,
position: ['middle',20],
draggable: true,
width: 'auto',
//center: true,
modal: true,
show: "fade",
hide: "fade"
});
}
</script>
<style>
iframe[id^='tinypic_plugin_']{
display: none;
}
img#sf_img_hosting{
cursor: pointer;
}
</style>
<!-- FIN TINYPIC -->
<!-- SCRIPT MOTOR -->
<script>
var SF_VERSION="1.4_en";var FORM_VALIDATED=false;var CAPTCHA_USADO=false;var FA_USUARIO,FA_IDUSUARIO,FA_AVATAR;var TEMA={NORMAL:0,FIJO:1,ANUNCIO:2,GLOBAL:3};var MENSAJE={NUEVO:"newtopic",RESPUESTA:"reply"};var GRUPO=[];GRUPO.NINGUNO="";var SF_PARAMETROS=[];var CAMPO={IDUSUARIO:1,USUARIO:2,AVATAR:3,EDAD:10,SEXO:11,FECHA:12,TEXTO:20,NUMERICO:21,AREA_TEXTO:22,DESPLEGABLE:30,LISTA:31,LISTAIMGS:32,CHECKBOX:33,OPCION:34,MULTISELECCION:35,IMAGEN:40,URL:41,YOUTUBE:42,FUNCION:50,CAPTCHA:100};var TIPO={OPCIONAL:0,OPCIONAL_SKIP:1,OBLIGATORIO:2,INVISIBLE:3};var OPS={NOPLACEHOLDER:1,FULLURL:2,VALIDAR:3,PLACEHOLDER:function(a){return"[PLACEHOLDER]"+a},TIP:function(a){return"[TIP]"+a},COLUMNA_UNICA:{LEFT:10,CENTER:11,RIGHT:12,JUSTIFY:13},NOTITLE:15,NOPUBLISH:16,ALIGN:{LEFT:20,CENTER:21,RIGHT:22,JUSTIFY:23},VALIGN:{TOP:30,MIDDLE:31,BOTTOM:32},ALIGN_TITLE:{LEFT:40,CENTER:41,RIGHT:43,JUSTIFY:43},VALIGN_TITLE:{TOP:50,MIDDLE:51,BOTTOM:52},COLOR:function(a){return"[COLOR]"+a},SIZE:function(a){return"[SIZE]"+a},FONT:function(a){return"[FONT]"+a},WRAP:function(a){return"[WRAP]"+a},PREFIJO:function(a){return"[PREFIJO]"+a},INFIJO:function(a){return"[INFIJO]"+a},SUFIJO:function(a){return"[SUFIJO]"+a}};var PERMITIR_HTML=false;var FORM_INVITADO="Anonymous";var TITULO_FORMULARIO="Mi form";var TITULO_TABLA_PUBLICADA="";var CSS_PREFIX="sf_light_";var clase_tabla_formulario=CSS_PREFIX+"tabla";var clase_cabecera_formulario=CSS_PREFIX+"cabecera";var clase_fila_formulario=CSS_PREFIX+"fila";var clase_celdaCampo_formulario=CSS_PREFIX+"celdaTitulo";var clase_celdaDato_formulario=CSS_PREFIX+"celdaDato";var clase_FilaGrupo="";var clase_CeldaGrupo=CSS_PREFIX+"celdaGrupo";var clase_CeldaGrupoCierre=CSS_PREFIX+"celdaGrupoCierre";var tipoDeTema=TEMA.NORMAL;var tipoDeMensaje=MENSAJE.RESPUESTA;var idForoPublicacion=0;var idTemaPublicacion=0;var AVATAR_DEFECTO="http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";var anyAge=false;function setParameters(){PERMITIR_HTML=SF_PARAMETROS.PERMITIR_HTML;FORM_INVITADO=SF_PARAMETROS.NOMBRE_INVITADO;TITULO_FORMULARIO=SF_PARAMETROS.TITULO_FORMULARIO;TITULO_TABLA_PUBLICADA=SF_PARAMETROS.TITULO_TABLA_PUBLICADA;CSS_PREFIX=SF_PARAMETROS.CSS_PREFIJO;clase_tabla_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_TABLA;clase_cabecera_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CABECERA;clase_fila_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_FILA;clase_celdaCampo_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDACAMPO;clase_celdaDato_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDADATO;clase_FilaGrupo=SF_PARAMETROS.CSS_CLASE_FILAGRUPO;clase_CeldaGrupo=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPO;clase_CeldaGrupoCierre=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPOCIERRE;tipoDeTema=SF_PARAMETROS.TIPO_TEMA;tipoDeMensaje=SF_PARAMETROS.TIPO_MENSAJE;idForoPublicacion=SF_PARAMETROS.ID_FORO;idTemaPublicacion=SF_PARAMETROS.ID_TEMA;AVATAR_DEFECTO=SF_PARAMETROS.AVATAR_DEFECTO}var MISCAMPOS=[];var MISOPCIONES=[];var IDX={TITULO:0,TIPO:1,REQUERIDO:2,GRUPO:3,VALORES:4,OUTCSS:5,EXTATTRS:6};var DATEPICKER={CLARO:"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css",OSCURO:"http://code.jquery.com/ui/1.10.3/themes/ui-darkness/jquery-ui.min.css"};var SKIN={CLARO:"light",OSCURO:"dark"};var FA_SF_BASEC={BP:"fasf_"};var FA_SF_C={IN:{CSSPREFIX:{TABLE:FA_SF_BASEC.BP+"table_",TR0:FA_SF_BASEC.BP+"tr0_",TD0:FA_SF_BASEC.BP+"td0_",TR1:FA_SF_BASEC.BP+"tr1_",TD1:FA_SF_BASEC.BP+"td1_",FIELDSET:FA_SF_BASEC.BP+"fieldset_",LEGEND:FA_SF_BASEC.BP+"legend_",LABEL:FA_SF_BASEC.BP+"label_",INPUT:FA_SF_BASEC.BP+"input_",TEXTAREA:FA_SF_BASEC.BP+"textarea_",SELECT:FA_SF_BASEC.BP+"select_",OPTION:FA_SF_BASEC.BP+"option_",IMG:FA_SF_BASEC.BP+"img_"}}};function getGrupo(a){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return keyGrup}}}function getClaseGrupo(a,b){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+keyGrup}}}function getClaseIDGrupo(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+a}function getClase(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+a}function getCookie(a){var b=document.cookie.split(a+"=");if(b.length==2){return b.pop().split(";").shift()}}var _userdata=new Object();function fa_idusuario(){if(!_userdata.hasOwnProperty("user_id")){var a=unescape(getCookie("fa_"+(document.location.hostname).replace(/\./g,"_")+"_data"));if(a!=null&&a!=undefined&&a!="undefined"){try{_userdata.user_id=a.match(/:\"?\d+\"?;/g)[0].replace(/[\":;]/g,"");return _userdata.user_id}catch(err){console.log(err);_userdata.user_id=-1;return-1}}else{_userdata.user_id=-1;return-1}}else{return parseInt(_userdata.user_id)}}function fa_usuario(){if(fa_idusuario()==-1){return FORM_INVITADO}else{if(!_userdata.hasOwnProperty("username")){if(jQuery("a#logout.mainmenu").length){_userdata.username=(jQuery("img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");return _userdata.username}else{var f=FORM_INVITADO;jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u"+fa_idusuario()+" .mainmenu",function(a){f=(jQuery("#fa_hidden_load img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1")});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.username=f;return f}}else{return _userdata.username}}}function fa_urlavatar(){var b=AVATAR_DEFECTO;if(fa_idusuario()>-1){if(_userdata.hasOwnProperty("avatar")){b=jQuery(_userdata.avatar).attr("src")}else{jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load_avatar").load("/profile?mode=editprofile&page_profil=avatars form[action='/profile'] img",function(a){b=jQuery("#fa_hidden_load_avatar img").attr("src")||b});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load_avatar").remove();_userdata.avatar="<img src='"+b+"' />"}}return b}function fa_soystaff_(){if(!_userdata.hasOwnProperty("user_level")){var b=false;jQuery("body").prepend("<span id='fa_hidden_load' style='display:none'>");jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u1 div#profile-advanced-details span.gen>strong, div#profile-advanced-details div.inner>strong, div#profile-advanced-details div.main-content>strong, div#profile-advanced-details div.box-content>strong",function(a){b=!jQuery("#fa_hidden_load").is(":empty")});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.user_level=b;return b}else{return _userdata.user_level>0}}function sfDo(){var a="<h2>"+SF_PARAMETROS.TITULO_FORMULARIO+"</h2>";var b="";var c="~";var d="%";var f=false;for(key in MISCAMPOS){var g=MISCAMPOS[key][IDX.TITULO];var h=MISCAMPOS[key][IDX.TIPO];var j=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var k=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var l=MISCAMPOS[key][IDX.VALORES]==undefined?["-"]:MISCAMPOS[key][IDX.VALORES];var m=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var n=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var o=getGrupo(k);var p=MISOPCIONES[key];var q="";var tip="";var r=false;for(var i=0;p!=null&&i<p.length;i++){if(/^\[PLACEHOLDER\]/g.test(p[i])){q=p[i].split("[PLACEHOLDER]")[1];continue}if(/^\[TIP\]/g.test(p[i])){tip=" title='"+p[i].split("[TIP]")[1]+"' ";continue}if(p[i]==OPS.NOPLACEHOLDER){r=true;continue}}if(r){q=""}if(j==TIPO.OBLIGATORIO){g+="*"}var s=false;var t="";switch(j){case TIPO.OPCIONAL:t="";break;case TIPO.OPCIONAL_SKIP:t="";break;case TIPO.OBLIGATORIO:if(h!=CAMPO.FUNCION){t="required='required'";if(h==CAMPO.DESPLEGABLE||h==CAMPO.MULTISELECCION){t="required"}}break;case TIPO.INVISIBLE:s=true;t="";break;default:t="";break}d=b;b=k;var u="";var v="";if(s||h==CAMPO.FUNCION){if(h==CAMPO.FUNCION){var w="";u="value=''";try{if(l[0]!=undefined){var x=window[l[0]];if(x!=null){if(l[1]!=undefined){w=x(l[1])}else{w=x()}}u="value='"+w+"'"}}catch(err){console.log("SF_ERR: "+e)}h=CAMPO.TEXTO}else{u="value='"+l+"'"}var v=" style='display:none!important;'"}if(c=="~"){if(b==GRUPO.NINGUNO){f=false;a+="<table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClaseIDGrupo(o,"tr0")+"' "+v+">"}else{a+="<fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr0")+"' "+v+">";f=true}}else{if(b==GRUPO.NINGUNO){f=false;if(c==GRUPO.NINGUNO){a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">"}else{a+="</tr></table></fieldset><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}}else{if(b!=c){if(f){a+="</tr></table></fieldset><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}else{a+="</tr></table><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}}else{a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">"}f=true}}if(h!=CAMPO.CAPTCHA){a+="<td class='"+getClase(key,"td0")+(f?" inGroup":"")+"'><label class='"+getClase(key,"label")+"' for='"+key+"'>"+g+"</label></td>"}var y="<td class='"+getClase(key,"td1")+(f?" inGroup":"")+"'>";switch(h){case CAMPO.EDAD:a+=y;a+="Day: <input maxlength='2' class='dia "+getClase(key,"input")+"_dia' type='text' "+u+" name='"+key+"_dia' id='"+key+"_dia' "+t+" "+m+"/> ";a+="Month: <input maxlength='2' class='mes "+getClase(key,"input")+"_mes' type='text' "+u+" name='"+key+"_mes' id='"+key+"_mes' "+t+" "+m+"/> ";a+="Year: <input maxlength='4' class='ano "+getClase(key,"input")+"_ano' type='text' "+u+" name='"+key+"_ano' id='"+key+"_ano' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"_dia, #"+key+"_mes, #"+key+"_ano').forceNumericOnly();<\/script>";break;case CAMPO.SEXO:a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Male' name='"+key+"' id='"+(key+"_hombre")+"' "+t+" "+m+" >Male";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Female' name='"+key+"' id='"+(key+"_mujer")+"' "+t+" "+m+" >Female";a+="</td>";break;case CAMPO.FECHA:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='fecha "+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').datepicker();<\/script>";break;case CAMPO.IDUSUARIO:FA_IDUSUARIO=fa_idusuario();a+=y;a+="<input class='"+getClase(key,"input")+" sf_idusuario_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_IDUSUARIO+"' disabled />";a+="</td>";break;case CAMPO.USUARIO:FA_USUARIO=fa_usuario();a+=y;a+="<input class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_USUARIO+"' disabled />";a+="</td>";break;case CAMPO.AVATAR:FA_AVATAR=fa_urlavatar();a+=y;a+="<input class='"+getClase(key,"input")+" sf_avatar_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_AVATAR+"' disabled /> <img src='"+FA_AVATAR+"' width='16' height='16' />";a+="</td>";break;case CAMPO.TEXTO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.NUMERICO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').forceNumericOnly();<\/script>";break;case CAMPO.AREA_TEXTO:a+=y;a+="<textarea "+tip+" placeholder='"+q+"' class='"+getClase(key,"textarea")+"' name='"+key+"' "+u+" id='"+key+"' "+t+" "+m+" /></textarea>";a+="</td>";break;case CAMPO.DESPLEGABLE:var z=l;a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' name='"+key+"' id='"+key+"' "+t+" "+m+" >";a+="<option class='"+getClase(key,"option")+"' value=''>--- Select ---";var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"'>"+z[opt];i++}a+="</select>";a+="</td>";break;case CAMPO.LISTA:var z=l;var A=[];if(l!=null&&l[0]!=null&&(typeof l[0]==typeof[])){z=l[0]}if(l!=null&&l[1]!=null&&(typeof l[1]==typeof[])){A=l[1]}a+="<td class='"+getClase(key,"td1")+"' style='text-align:justify'>";var B="";for(var i=0;i<z.length;i++){imgact=A[i]!=null?"<img src='"+A[i]+"' /> ":"";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[i]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+imgact+z[i]+"<br>"}a+="</td>";break;case CAMPO.CHECKBOX:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' onClick='javascript:reqCheck(\""+(key+i)+'", '+MISCAMPOS[key][2]+")' type='checkbox' value='"+z[opt]+"' name='"+key+"[]' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++}a+="</td>";break;case CAMPO.OPCION:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[opt]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++}a+="</td>";break;case CAMPO.MULTISELECCION:a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' multiple "+t+" name='"+key+"' id='"+key+"' >";var z=l;var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"' "+m+" >"+z[opt]+"</option>";i++}a+="</select>";a+="</td>";break;case CAMPO.IMAGEN:if(!r&&q==""){q="Image URL"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+" fasf_input_img' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/> <img title='Upload image' alt='Upload image' id='sf_img_hosting' src='http://i37.servimg.com/u/f37/17/45/19/77/image_10.png' onclick='openTinypic()' />";a+="</td>";break;case CAMPO.URL:if(!r&&q==""){q="URL address"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.YOUTUBE:if(!r&&q==""){q="Youtube video URL"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.CAPTCHA:if(!CAPTCHA_USADO){a+="<td class='"+getClase(key,"td1")+"' colspan='2'>";a+="<div id='cptch'><span>Verification code: </span><span id='txtahc_tpcaDiv'></span><input type='hidden' id='txtahc_tpca' /> <input type='text' name='txtahc_input' id='txtahc_input' style='width:75px !important' /></div>";a+="</td>";CAPTCHA_USADO=true}break;default:break}c=b}if(b==GRUPO.NINGUNO){a+="</tr></table>"}else{a+="</tr></table></fieldset>"}jQuery("#form_inner_placeholder").html(a);if(CAPTCHA_USADO){setcptchcode()}jQuery("#form_inner_placeholder [title]").tooltip();preProcesoFormulario()}jQuery(function(){if(tipoDeMensaje==MENSAJE.NUEVO){jQuery("#hidden").load("/post?f="+idForoPublicacion+"&mode=newtopic form[action='/post'] input[type='hidden']")}if(SF_PARAMETROS.SKIN_DATEPICKER==DATEPICKER.CLARO){jQuery("link#ui-theme").attr("href",DATEPICKER.CLARO)}else{jQuery("link#ui-theme").attr("href",DATEPICKER.OSCURO)}document.title=TITULO_FORMULARIO;jQuery("#miFormulario").submit(function(e){if(!FORM_VALIDATED){e.preventDefault();return false}})});jQuery(function(a){a.datepicker.regional.es={closeText:"Cerrar",prevText:"<Ant",nextText:"Sig>",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};a.datepicker.setDefaults(jQuery.datepicker.regional.en)});function reqCheck(a,b){if(b){var c=jQuery("#"+a).attr("name");var d=false;jQuery("input[type='checkbox'][name='"+c+"']").each(function(){if(jQuery(this).is(":checked")){d=true}});if(d){jQuery("input[type='checkbox'][name='"+c+"']").removeAttr("required")}else{jQuery("input[type='checkbox'][name='"+c+"']").attr("required","required")}}}var colSpanAlignStyle="style='text-align:center!important'";var ERROR_VALIDACION=false;var MSG_ERRORES_VALIDACION="Validation errors:\n\n";var bbcodes=["b","i","u","quote","code","list","img","url","scroll","fade","blur","flipv","fliph","updown","center","right","strike","flash","hide","spoiler","wow","justify","sub","sup","left","hr"];function procesarFormulario(){ERROR_VALIDACION=false;MSG_ERRORES_VALIDACION="Validation errors:\n\n";if(typeof(preProcesoFormulario2)!="undefined"){preProcesoFormulario2()}var b="[table class='"+clase_tabla_formulario+" sf_table']";if(jQuery.trim(TITULO_TABLA_PUBLICADA).length){b+="[tr class='"+clase_cabecera_formulario+"'][td colspan=2]"+TITULO_TABLA_PUBLICADA+"[/td][/tr]"}var c=["","",""];var d=GRUPO.NINGUNO;var e=false;for(key in MISCAMPOS){c=["","",""];colSpan2=false;var f=false;var nopublish=false;var g="";var h="";var j="";var k=[];var l="";var m=[];var n="";var o=inf1=inf2=suf="";var p=false;var q=false;var r=MISCAMPOS[key][IDX.TITULO];var s=MISCAMPOS[key][IDX.TIPO];var t=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var u=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var v=MISCAMPOS[key][IDX.VALORES]==undefined?[""]:MISCAMPOS[key][IDX.VALORES];var w=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var x=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var y=MISOPCIONES[key];for(var i=0;y!=null&&i<y.length;i++){if(/^\[PREFIJO\]/g.test(y[i])){o+=y[i].split("[PREFIJO]")[1];continue}if(/^\[INFIJO\]/g.test(y[i])){inf1+=y[i].split("[INFIJO]")[1].split("|")[0]||"";inf2+=y[i].split("[INFIJO]")[1].split("|")[1]||"";continue}if(/^\[SUFIJO\]/g.test(y[i])){suf+=y[i].split("[SUFIJO]")[1];continue}if(/^\[COLOR\]/g.test(y[i])){g+="[color="+y[i].split("[COLOR]")[1]+"]";h="[/color]"+h;continue}if(/^\[SIZE\]/g.test(y[i])){g+="[size="+y[i].split("[SIZE]")[1]+"]";h="[/size]"+h;continue}if(/^\[FONT\]/g.test(y[i])){g+="[font="+y[i].split("[FONT]")[1]+"]";h="[/font]"+h;continue}if(/^\[WRAP\]/g.test(y[i])){var z=(y[i].split("[WRAP]")[1]).toLowerCase();var A=[];A[0]=z;var B=z.substring(0,(z.indexOf(" ")==-1?z.length:z.indexOf(" ")));if(z.indexOf(",")>=0){A=z.split(",")}if(jQuery.inArray(A[0],bbcodes)>=0){switch(A[0]){case"img":if(A[1]!=undefined&&A[2]!=undefined){g+="[img("+A[1]+"px,"+A[2]+"px)]";h="[/img]"+h}else{g+="[img]";h="[/img]"+h}break;case"spoiler":g+="[spoiler"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/spoiler]"+h;break;case"quote":g+="[quote"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/quote]"+h;break;case"url":g+="[url"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/url]"+h;break;case"list":g+="[list][*]";h="[/list]"+h;break;case"flash":g+="[flash("+(A[1]==undefined?"500":A[1])+","+(A[2]==undefined?"500":A[2])+")]";h="[/flash]"+h;break;default:g+="["+A[0]+"]";h="[/"+A[0]+"]"+h}}else{g+="<"+A[0]+">";h="</"+B+">"+h}continue}switch(y[i]){case OPS.COLUMNA_UNICA.LEFT:colSpan2=true;colSpanAlignStyle="style='text-align:left!important'";break;case OPS.COLUMNA_UNICA.CENTER:colSpan2=true;colSpanAlignStyle="style='text-align:center!important'";break;case OPS.COLUMNA_UNICA.RIGHT:colSpan2=true;colSpanAlignStyle="style='text-align:right!important'";break;case OPS.COLUMNA_UNICA.JUSTIFY:colSpan2=true;colSpanAlignStyle="style='text-align:justify!important'";break;case OPS.NOTITLE:f=true;break;case OPS.NOPUBLISH:nopublish=true;break;case OPS.SHOWGROUP:break;case OPS.ALIGN.LEFT:m.push("text-align:left!important");break;case OPS.ALIGN.CENTER:m.push("text-align:center!important");break;case OPS.ALIGN.RIGHT:m.push("text-align:right!important");break;case OPS.ALIGN.JUSTIFY:m.push("text-align:justify!important");break;case OPS.VALIGN.TOP:m.push("vertical-align:top!important");break;case OPS.VALIGN.MIDDLE:m.push("vertical-align:middle!important");break;case OPS.VALIGN.BOTTOM:m.push("vertical-align:bottom!important");break;case OPS.ALIGN_TITLE.LEFT:k.push("text-align:left!important");break;case OPS.ALIGN_TITLE.CENTER:k.push("text-align:center!important");break;case OPS.ALIGN_TITLE.RIGHT:k.push("text-align:right!important");break;case OPS.ALIGN_TITLE.JUSTIFY:k.push("text-align:justify!important");break;case OPS.VALIGN_TITLE.TOP:k.push("vertical-align:top!important");break;case OPS.VALIGN_TITLE.MIDDLE:k.push("vertical-align:middle!important");break;case OPS.VALIGN_TITLE.BOTTOM:k.push("vertical-align:bottom!important");break;case OPS.FULLURL:p=true;break;case OPS.VALIDAR:q=true;break;default:}}if(m.join(";").length){n=" style='"+m.join(";")+"'"}if(k.join(";").length){l=" style='"+k.join(";")+"'"}if(s==CAMPO.CAPTCHA){continue}if(x!=undefined){var C=x;if(typeof C==typeof""){claseFila=C}if(typeof C==typeof[]){var D=C.length;for(var i=0;i<C.length;i++){c[i]=C[i]}}}var E="";if(jQuery.trim(clase_fila_formulario)){E=clase_fila_formulario}if(jQuery.trim(c[0])){E=jQuery.trim(E)?E+" "+c[0]:c[0]}var F="";if(jQuery.trim(clase_celdaCampo_formulario)){F=clase_celdaCampo_formulario}if(jQuery.trim(c[1])){F=jQuery.trim(F)?F+" "+c[1]:c[1]}var G="";if(jQuery.trim(clase_celdaDato_formulario)){G=clase_celdaDato_formulario}if(s==CAMPO.AVATAR){G=jQuery.trim(G)?G+" sf_tdavatar":"sf_tdavatar"}if(jQuery.trim(c[2])){G=jQuery.trim(G)?G+" "+c[2]:c[2]}if(t==TIPO.OPCIONAL_SKIP){var H="";if(s==CAMPO.OPCION){H=jQuery("input[name='"+key+"']:checked").val()}else{if(s==CAMPO.EDAD){var I,me,an;I=jQuery.trim(jQuery("#miFormulario #"+key+"_dia").val());me=jQuery.trim(jQuery("#miFormulario #"+key+"_mes").val());an=jQuery.trim(jQuery("#miFormulario #"+key+"_ano").val());var J=I+me+an;if(J==null||J==undefined||J==""){continue}}else{if(s==CAMPO.CHECKBOX){var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(jQuery(this).val())});H=K==null?"":K.toString()}else{H=jQuery("#miFormulario #"+key).val()}}}if(H==null||H==undefined||jQuery.trim(H)==""){continue}}if(!nopublish){if(u!=d){b+="[tr class='"+clase_FilaGrupo+"']";var L=clase_CeldaGrupo;if(d!=GRUPO.NINGUNO&&u==GRUPO.NINGUNO){L=clase_CeldaGrupoCierre;e=false}else{e=true}b+="[td colspan=2 class='"+L+"']"+u+"[/td]";b+="[/tr]";d=u}if(colSpan2){if(!f){b+="[tr class='"+E+"']";b+="[td colspan=2 "+colSpanAlignStyle+" class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";b+="[/tr]"}b+="[tr class='"+E+"'][td class='"+G+(e?" inGroup":"")+"' colspan=2 "+colSpanAlignStyle+n+"]"}else{b+="[tr class='"+E+"']";if(!f){b+="[td class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]"}b+="[td class='"+G+(e?" inGroup":"")+"' "+n+"]"}var M=suf__="";M=o+inf1;suf__=inf2+suf;switch(s){case CAMPO.EDAD:var I,me,an;I=pad(jQuery("#miFormulario #"+key+"_dia").val(),2);me=pad(jQuery("#miFormulario #"+key+"_mes").val(),2);an=pad(jQuery("#miFormulario #"+key+"_ano").val(),4);var N="[b][SF_EDAD]"+I+"/"+me+"/"+an+"[/b]";if(I+me+an=="00000000"&&t!=TIPO.OBLIGATORIO){N=""}else{if(parseInt(I)==0||parseInt(I)>31){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong day\n";jQuery("#miFormulario #"+key+"_dia").focus()}if(parseInt(me)==0||parseInt(me)>12){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong month\n";jQuery("#miFormulario #"+key+"_mes").focus()}if((!anyAge&&parseInt(an)<1900)||parseInt(an)>new Date().getFullYear()){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Year out of range\n";jQuery("#miFormulario #"+key+"_ano").focus()}}b+=g+M+N+suf__+h;break;case CAMPO.SEXO:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.FECHA:b+=g+M+jQuery("#miFormulario #"+key).val()+suf__+h;break;case CAMPO.USUARIO:b+=g+M+FA_USUARIO+suf__+h;break;case CAMPO.AVATAR:b+=g+"[img]"+FA_AVATAR+"[/img]"+h;break;case CAMPO.IDUSUARIO:b+=g+M+FA_IDUSUARIO+suf__+h;break;case CAMPO.FUNCION:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.NUMERICO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.AREA_TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.DESPLEGABLE:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.LISTA:var O="";if(v!=null&&v[1]!=null&&(typeof v[1]==typeof[])){if(jQuery("input[name='"+key+"']:checked").next("img").length){O="[img]"+jQuery("input[name='"+key+"']:checked").next("img").attr("src")+"[/img] "}}b+=g+O+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.CHECKBOX:var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(get_(jQuery(this).val()))});b+=g+M+K+suf__+h;break;case CAMPO.OPCION:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.MULTISELECCION:var P=jQuery("#miFormulario #"+key).val();if(P!=null&&P!=undefined){P=P.toString()}b+=g+M+get_(P)+suf__+h;break;case CAMPO.IMAGEN:var Q=get_(jQuery("#miFormulario #"+key).val());if((Q==null||jQuery.trim(Q)=="")&&t!=TIPO.OBLIGATORIO){q=false}if(q){ERROR_VALIDACION=!isImg(Q,key)}var R=M+Q+suf__;if(jQuery.trim(R)!=""){R="[img]"+R+"[/img]"}b+=g+R+h;break;case CAMPO.URL:var S=get_(jQuery("#miFormulario #"+key).val());if((S==null||jQuery.trim(S)=="")&&t!=TIPO.OBLIGATORIO){q=false}if(q){ERROR_VALIDACION=!isUrl(S,key)}var T=S;if(!p&&v!=null&&jQuery.trim(v)!=""){T=v}var U=M+S+suf__;if(jQuery.trim(U)!=""){U="[url="+U+"]"+T+"[/url]"}b+=g+U+h;break;case CAMPO.YOUTUBE:var T=jQuery("#miFormulario #"+key).val();if((T==null||jQuery.trim(T)=="")&&t!=TIPO.OBLIGATORIO){q=false}var V=get_(youtube_parser(T,key,q));if(jQuery.trim(V)!=""){V="[youtube]"+V+"[/youtube]"}b+=g+V+h;break;default:}b+="[/td][/tr]"}}b+="[/table]";jQuery("input#cuerpo").attr("value",b);if(tipoDeMensaje==MENSAJE.RESPUESTA){jQuery.ajaxSetup({async:false});jQuery("#hidden_inputs").load("/post?t="+idTemaPublicacion+"&mode=reply form[action='/post'] input[type='hidden']");jQuery.ajaxSetup({async:true})}else{var W,auth2;jQuery("#hidden").find("input[name='auth[]']").each(function(a){if(a==0){W=jQuery(this).attr("value")}if(a==1){auth2=jQuery(this).attr("value")}});jQuery("input#mode").attr("value",tipoDeMensaje);jQuery("input#auth1").attr("value",W);jQuery("input#auth2").attr("value",auth2);jQuery("input#f_o_t").attr("name","f");jQuery("input#f_o_t").attr("value",idForoPublicacion);jQuery("input#topictype").attr("value",tipoDeTema)}jQuery("input#titulo").val(TITULO_FORMULARIO);if(CAPTCHA_USADO){FORM_VALIDATED=chk_ek_c_frm(jQuery("#miFormulario"))&&!ERROR_VALIDACION}else{FORM_VALIDATED=true&&!ERROR_VALIDACION}if(ERROR_VALIDACION){alert(MSG_ERRORES_VALIDACION)}postProcesoFormulario(FORM_VALIDATED)}function get_(a){if(a==null||a==undefined){return""}if(!PERMITIR_HTML){return a.replace(/<(?:.|\n)*?>/gm,"")}else{return a}}function isUrl(s,a){var b=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;var c=b.test(s);if(!c){MSG_ERRORES_VALIDACION+="* Not a valid URL address\n";jQuery("#miFormulario #"+a).focus()}return c}function youtube_parser(a,b,c){var d=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;var e=(a==null?null:a.match(d));if(e&&e[7].length==11){return"http://www.youtube.com/watch?v="+e[7]}else{if(c){MSG_ERRORES_VALIDACION+="* Not a valid Youtube URL\n";jQuery("#miFormulario #"+b).focus();ERROR_VALIDACION=true}}}function isImg(s,a){var b=(s!=null&&(s.match(/^(https?):\/\/.*(jpg|jpeg|png|gif|bmp)$/gi)!=null));if(!b){MSG_ERRORES_VALIDACION+="* Not a valid image URL\n";jQuery("#miFormulario #"+a).focus()}return b}jQuery.fn.forceNumericOnly=function(){return this.each(function(){jQuery(this).keydown(function(e){var a=e.charCode||e.keyCode||0;return(a==8||a==9||a==46||a==110||a==190||(a>=35&&a<=40)||(a>=48&&a<=57)||(a>=96&&a<=105))})})};function pad(a,b){return a.length<b?pad("0"+a,b):a}var _0x503f=["\x72\x61\x6E\x64\x6F\x6D","\x63\x65\x69\x6C","","\x76\x61\x6C\x75\x65","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61\x44\x69\x76","\x76\x61\x6C","\x23\x6D\x69\x46\x6F\x72\x6D\x75\x6C\x61\x72\x69\x6F\x20\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x69\x6E\x63\x6F\x72\x72\x65\x63\x74","\x66\x6F\x63\x75\x73","\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x6A\x6F\x69\x6E","\x20","\x73\x70\x6C\x69\x74"];function setcptchcode(){var a=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var b=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var c=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var d=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var e=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var f=a+b+c+d+e;document[_0x503f[5]](_0x503f[4])[_0x503f[3]]=f;document[_0x503f[5]](_0x503f[7])[_0x503f[6]]=f}function chk_ek_c_frm(a){var b=_0x503f[2];if(jQuery(_0x503f[9])[_0x503f[8]]()==_0x503f[2]){b+=_0x503f[10]}if(jQuery(_0x503f[9])[_0x503f[8]]()!=_0x503f[2]){if(validCptch(jQuery(_0x503f[9])[_0x503f[8]]())==false){b+=_0x503f[11]}}if(b!=_0x503f[2]){alert(b);jQuery(_0x503f[13])[_0x503f[12]]();return false}return true}function validCptch(){var a=rmvspces(document[_0x503f[5]](_0x503f[4])[_0x503f[3]]);var b=rmvspces(document[_0x503f[5]](_0x503f[14])[_0x503f[3]]);if(a==b){return true}else{return false}}function rmvspces(a){return a[_0x503f[17]](_0x503f[16])[_0x503f[15]](_0x503f[2])}
</script>