jQuery(document).ready(function(){jQuery('#_optthemes_webformcodehtml').change(change_selects);jQuery('#_launchpage_autorespondercode').change(change_launch_selects);function change_selects(){var tags=['a','iframe','frame','frameset','script'],reg,val=jQuery('#_optthemes_webformcodehtml').val(),hdn=jQuery('#popup_domination_hdn_div2'),formurl=jQuery('#_optthemes_optinformurl'),hiddenfields=jQuery('#_optthemes_webformhiddenhtml');formurl.val('');if(jQuery.trim(val)=='')
return false;jQuery('#popup_domination_hdn_div').html('');jQuery('#popup_domination_hdn_div2').html('');for(var i=0;i<5;i++){reg=new RegExp('<'+tags[i]+'([^<>+]*[^\/])>.*?</'+tags[i]+'>',"gi");val=val.replace(reg,'');reg=new RegExp('<'+tags[i]+'([^<>+]*)>',"gi");val=val.replace(reg,'');}
var tmpval;try{tmpval=decodeURIComponent(val);}catch(err){tmpval=val;}
hdn.append(tmpval);var num=0;jQuery(':text',hdn).each(function(){var name=jQuery(this).attr('name'),name_selected=num=='0'?name:num!='0'?name_selected:'',email_selected=num=='1'?name:email_selected;jQuery('#_optthemes_optinname').val(name_selected);jQuery('#_optthemes_optinemail').val(email_selected);num++;});jQuery(':input[type=hidden]',hdn).each(function(){jQuery('#popup_domination_hdn_div').append(jQuery('<input type="hidden" name="'+jQuery(this).attr('name')+'" />').val(jQuery(this).val()));});var hidden_f=jQuery('#popup_domination_hdn_div').html();formurl.val(jQuery('form',hdn).attr('action'));hiddenfields.val(hidden_f);hdn.html('');};function change_launch_selects(){var tags=['a','iframe','frame','frameset','script'],reg,val=jQuery('#_launchpage_autorespondercode').val(),hdn=jQuery('#popup_domination_hdn_div2'),formurl=jQuery('#_launchpage_optinformurl'),hiddenfields=jQuery('#_launchpage_webformhiddenhtml');formurl.val('');if(jQuery.trim(val)=='')
return false;jQuery('#popup_domination_hdn_div').html('');jQuery('#popup_domination_hdn_div2').html('');for(var i=0;i<5;i++){reg=new RegExp('<'+tags[i]+'([^<>+]*[^\/])>.*?</'+tags[i]+'>',"gi");val=val.replace(reg,'');reg=new RegExp('<'+tags[i]+'([^<>+]*)>',"gi");val=val.replace(reg,'');}
var tmpval;try{tmpval=decodeURIComponent(val);}catch(err){tmpval=val;}
hdn.append(tmpval);var num=0;jQuery(':text',hdn).each(function(){var name=jQuery(this).attr('name'),name_selected=num=='0'?name:num!='0'?name_selected:'',email_selected=num=='1'?name:email_selected;jQuery('#_launchpage_optinboxname').val(name_selected);jQuery('#_launchpage_optinboxemail').val(email_selected);num++;});jQuery(':input[type=hidden]',hdn).each(function(){jQuery('#popup_domination_hdn_div').append(jQuery('<input type="hidden" name="'+jQuery(this).attr('name')+'" />').val(jQuery(this).val()));});var hidden_f=jQuery('#popup_domination_hdn_div').html();formurl.val(jQuery('form',hdn).attr('action'));hiddenfields.val(hidden_f);hdn.html('');};});
