// acpjsapi v0.2.4

function dosubmit(){}
function deleteOption(object,index){object.options[index]=null;}
function addOption(object,text,value){var defaultSelected=true;var selected=true;var optionName=new Option(text,value,defaultSelected,selected)
object.options[object.length]=optionName;}
function copySelected(fromObject,toObject){for(var i=0,l=fromObject.options.length;i<l;i++){if(fromObject.options[i].selected)
addOption(toObject,fromObject.options[i].text,fromObject.options[i].value);}
for(var i=fromObject.options.length-1;i>-1;i--){if(fromObject.options[i].selected)
deleteOption(fromObject,i);}}
function copyAll(fromObject,toObject){for(var i=0,l=fromObject.options.length;i<l;i++){addOption(toObject,fromObject.options[i].text,fromObject.options[i].value);}
for(var i=fromObject.options.length-1;i>-1;i--){deleteOption(fromObject,i);}}
function copySelectedtovar(ListObject1,ValObject1,TxtObject1,ListObject2,ValObject2,TxtObject2){ValObject1.value="";TxtObject1.value=""
for(var i=0,l=ListObject1.options.length;i<l;i++){ValObject1.value+=ListObject1.options[i].value+";";TxtObject1.value+=ListObject1.options[i].text+";";}
ValObject2.value="";TxtObject2.value=""
for(var i=0,l=ListObject2.options.length;i<l;i++){ValObject2.value+=ListObject2.options[i].value+";";TxtObject2.value+=ListObject2.options[i].text+";";}
return"true"}
function abre(url,nombre,params){var objetoventana=window.open(url,nombre,params);}
function countdown_clock(minute,seg,format,url){Mytoday=new Date();myyear=Mytoday.getFullYear()-2000;mymonth=Mytoday.getMonth()+1;myday=Mytoday.getDate();myseg=seg+Mytoday.getSeconds();if(myseg>59)
{myseg=myseg-60;minute=minute+1;}
myminute=minute+Mytoday.getMinutes();if(myminute>59)
{myminute=myminute-60;myhour=Mytoday.getHours()+1;}else{myhour=Mytoday.getHours();}
html_code='<span id="countdown"></span>';document.write(html_code);countdown(myyear,mymonth,myday,myhour,myminute,myseg,format,url);}
function countdown(year,month,day,hour,minute,seg,format,url)
{Today=new Date();Todays_Year=Today.getFullYear()-2000;Todays_Month=Today.getMonth()+1;Todays_Date=(new Date(Todays_Year,Todays_Month,Today.getDate(),Today.getHours(),Today.getMinutes(),Today.getSeconds())).getTime();Target_Date=(new Date(year,month,day,hour,minute,seg)).getTime();Time_Left=Math.round((Target_Date-Todays_Date)/1000);if(Time_Left<0){Time_Left=0;if(url){url();url=null;}}
switch(format)
{case 0:document.getElementById('countdown').innerHTML=Time_Left+' segundos';break;case 1:days=Math.floor(Time_Left/(60*60*24));Time_Left%=(60*60*24);hours=Math.floor(Time_Left/(60*60));Time_Left%=(60*60);minutes=Math.floor(Time_Left/60);Time_Left%=60;seconds=Time_Left;mps='s';sps='s';if(minutes==1)mps='';if(seconds==1)sps='';document.getElementById('countdown').innerHTML=minutes+' minuto'+mps+' y ';document.getElementById('countdown').innerHTML+=seconds+' segundo'+sps;break;case 2:days=Math.floor(Time_Left/(60*60*24));Time_Left%=(60*60*24);hours=Math.floor(Time_Left/(60*60));Time_Left%=(60*60);minutes=Math.floor(Time_Left/60);Time_Left%=60;seconds=Time_Left;mps='0';sps='0';if(minutes>9)mps='';if(seconds>9)sps='';document.getElementById('countdown').innerHTML=mps+minutes+':'+sps+seconds;break;default:document.getElementById('countdown').innerHTML=Time_Left+' segundos';}
setTimeout('countdown('+year+','+month+','+day+','+hour+','+minute+','+seg+','+format+','+url+');',1000);}
function htmleditor(mielem,format){switch(format)
{case 0:document.writeln('<'+'script');document.writeln(' language="javascript"');document.writeln(' type="text/javascript">');document.writeln(' tinyMCE.init({');document.writeln(' mode : "exact",');document.writeln(' language : "es",');document.writeln(' elements : "'+mielem+'",');document.writeln(' theme : "simple",');document.writeln(' });');document.writeln('</'+'script'+'>');break;case 1:document.writeln('<'+'script');document.writeln(' language="javascript"');document.writeln(' type="text/javascript">');document.writeln(' tinyMCE.init({');document.writeln(' mode : "exact",');document.writeln(' language : "es",');document.writeln(' elements : "'+mielem+'",');document.writeln(' theme : "advanced",');document.writeln(' plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",');document.writeln(' theme_advanced_buttons1_add_before : "save,newdocument,separator",');document.writeln(' theme_advanced_buttons1_add : "fontselect,fontsizeselect",');document.writeln(' theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",');document.writeln(' theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",');document.writeln(' theme_advanced_buttons3_add_before : "tablecontrols,separator",');document.writeln(' theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",');document.writeln(' theme_advanced_toolbar_location : "top",');document.writeln(' theme_advanced_toolbar_align : "left",');document.writeln(' theme_advanced_path_location : "bottom",');document.writeln(' plugin_insertdate_dateFormat : "%d/%m/%Y",');document.writeln(' plugin_insertdate_timeFormat : "%H:%M:%S",');document.writeln(' theme_advanced_resize_horizontal : false,');document.writeln(' theme_advanced_resizing : true,');document.writeln(' paste_use_dialog : false,');document.writeln(' paste_auto_cleanup_on_paste : true,');document.writeln(' paste_convert_headers_to_strong : false,');document.writeln(' paste_strip_class_attributes : "all",');document.writeln(' paste_remove_spans : false,');document.writeln(' paste_remove_styles : false');document.writeln(' });');document.writeln('</'+'script'+'>');break;case 2:document.writeln('<'+'script');document.writeln(' language="javascript"');document.writeln(' type="text/javascript">');document.writeln(' tinyMCE.init({');document.writeln(' mode : "exact",');document.writeln(' language : "es",');document.writeln(' elements : "'+mielem+'",');document.writeln(' theme : "advanced",');document.writeln(' theme_advanced_buttons1 : "fontselect,fontsizeselect,bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",');document.writeln(' theme_advanced_buttons2 : "",');document.writeln(' theme_advanced_buttons3 : "",');document.writeln(' theme_advanced_toolbar_location : "top",');document.writeln(' theme_advanced_toolbar_align : "left",');document.writeln(' theme_advanced_statusbar_location : "bottom",');document.writeln(' theme_advanced_resizing : true,');document.writeln(' extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"');document.writeln(' });');document.writeln('</'+'script'+'>');break;}}
function validarEmail(theElement,msg){var s=theElement.value;var filter=/^[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;if(s.length==0)return true;if(filter.test(s)){return true;}else{if(msg.length==0)alert("ERROR: La direccion de correo electronico ingresada no es valida.");else alert(msg);theElement.focus();return false;}};