"use strict";if(typeof document.getElementById=='undefined'){document.getElementById=function(a){return document.all[a]}}var ngstk=new(function Ngstk(){var c=this;this.config=[];this.config.BASE_URL="http://www.dwebresources.com";this.config.IMAGE_URL=this.config.BASE_URL+"/ngstk/image/";this.config.BROWSER_URL=this.config.BASE_URL+"/en/usuarios.php?espacio";this.config.SATAY_URL=this.config.BASE_URL+"/ngstk/satay.swf";this.config.SYNTAX=false;this.config.SYNTAX_URL=this.config.BASE_URL+"/ngstk/syntax/";var M=1;var s=[];var E=[];this.getUniqueID=function(){return M++};this.preloadimg=function(a){for(var b in a){if(a.hasOwnProperty(b)){E[E.length]=new Image();E[E.length-1].src=a[b]}}};this.urlParameter=function(a,b,d){if(!a||typeof a!="string"){return false}if(!b||typeof b!="string"){b=location.href}a=a.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var h=(d===true?new RegExp("[\\?&#]"+a+"=([^&#]*)"):new RegExp("[\\?&]"+a+"=([^&#]*)"));var g=h.exec(location.href);return(g==null?false:g[1])};var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.base64_encode=function(a){var b=[],d,h,g,f,l,k,p,i=0;do{d=a.charCodeAt(i++);h=a.charCodeAt(i++);g=a.charCodeAt(i++);f=d>>2;l=((d&3)<<4)|(h>>4);k=((h&15)<<2)|(g>>6);p=g&63;if(isNaN(h)){k=p=64}else{if(isNaN(g)){p=64}}b[b.length]=v.charAt(f)+v.charAt(l)+v.charAt(k)+v.charAt(p)}while(i<a.length);return b.join('')};this.base64_decode=function(a){var b=[],d,h,g,f,l,k,p;for(var i=0;i<a.length;){f=v.indexOf(a.charAt(i++));l=v.indexOf(a.charAt(i++));k=v.indexOf(a.charAt(i++));p=v.indexOf(a.charAt(i++));d=(f<<2)+(l>>4);h=((l&15)<<4)+(k>>2);g=((k&3)<<6)+p;b[b.length]=String.fromCharCode(d);if(k!=64){b[b.length]=String.fromCharCode(h)}if(p!=64){b[b.length]=String.fromCharCode(g)}}return b.join('')};this.urlencode=function(a){return escape(a).replace('+','%2B').replace('%20','+').replace('*','%2A').replace('/','%2F').replace('@','%40')};this.urldecode=function(a){return unescape(a.replace('+',' '))};this.escapeXML=function(a,b){if(b){return a.split("&").join("&#38;").split(String.fromCharCode(8364)).join("&#128;").split("<").join("&#60;").split(">").join("&#62;").split("&").join("&#38;")}return a.split("&").join("&#38;").split("<").join("&#60;").split(">").join("&#62;").split("&").join("&#38;")};this.display=function(a,b){if(typeof b!=='undefined'){if(b===true){b='block'}else if(b===false){b='none'}else{b=b.toLowerCase(b+"")}}if(typeof a==='string'){a=document.getElementById(a)}if(!a){return false}if(typeof b!=='undefined'){a.style.display=b}return a.style.display};this.showhide=function(a){var b=c.display(a);if(b===false){return false}return c.display(a,b=='none')};this.getElementById=function(a){if(typeof a==='string'){return document.getElementById(a)}return false};this.setCookie=function(a,b,d){var h="";if(typeof d=="number"){var g=new Date();g.setTime(g.getTime()+(d*86400000));h="; expires="+g.toGMTString()}document.cookie=c.trim(a)+"="+b+h+"; path=/"};this.getCookie=function(a){var b=c.trim(a)+"=";var d=document.cookie.split(';');for(var h=0;h<d.length;h++){var g=c.trim(d[h]);if(g.indexOf(b)===0){return g.substring(b.length,g.length)}}return null};this.delCookie=function(a){c.setCookie(a,"",-1)};this.addEvent=function(b,d,h,g){if(typeof b=='string'){b=document.getElementById(b)}if(!g||typeof g!='object'){g=window}if(!b||typeof b!='object'||!d||typeof d!='string'||!h||typeof h!='function'||!g||typeof g!='object'){return false}var f={obj:b,etype:d,fn:h,ctx:g};if(typeof s[f.etype]=='undefined'){s[f.etype]=[f]}else{s[f.etype][s[f.etype].length]=f}if(b!==c){var l=s[f.etype].length-1;while(l--){if(s[f.etype][l].obj===f.obj){return f}}if(typeof b.addEventListener!='undefined'){b.addEventListener(f.etype,function(a){c.triggerEvent(f,a||window.event)},false)}else if(typeof b.attachEvent!='undefined'){b.attachEvent("on"+f.etype,function(a){c.triggerEvent(f,a||window.event)})}}return f};this.removeEvent=function(b,d,h,g){if(typeof b=='string'){b=document.getElementById(b)}var f=b;if(!g||typeof g!='object'){g=window}if(typeof d!='undefined'&&typeof h!='undefined'){f={'obj':b,'etype':d,'fn':h,'ctx':g}}if(!f||!f.obj||typeof f.obj!='object'||!f.etype||typeof f.etype!='string'||!f.fn||typeof f.fn!='function'){return false}if(typeof s[f.etype]==='undefined'){return false}var l=false;var k=s[f.etype].length;while(k--){if(s[f.etype][k].obj==f.obj&&s[f.etype][k].fn==f.fn&&s[f.etype][k].ctx==f.ctx){s[f.etype][k].splice(k,1);l=true}}if(f.obj!==c){k=s[f.etype].length;while(k--){if(s[f.etype][k].obj===f.obj){return l}}if(typeof b.removeEventListener!='undefined'){b.removeEventListener(d,function(a){c.triggerEvent(f,a||window.event)},false)}else if(typeof b.detachEvent!='undefined'){b.detachEvent("on"+d,function(a){c.triggerEvent(f,a||window.event)})}}return l};this.triggerEvent=function(a,b,d){var h=true;if(typeof a=='string'){a=document.getElementById(a)}if(typeof(a)=='object'&&typeof a.obj!='undefined'&&typeof a.ctx!='undefined'&&typeof a.etype!='undefined'){d=b;b=a.etype;a=a.obj}if(!a||typeof a!='object'||!b||typeof b!='string'){return false}d=d||window.event;if(typeof s[b]!='undefined'){var g=s[b].length;while(g--&&h!==false){if(s[b][g].obj==a){h=s[b][g].fn.call(s[b][g].ctx,d)}}}return h};this.stopEvent=function(a){a=a||window.event;a.cancelBubble=true;a.returnValue=false;if(a.stopPropagation){a.stopPropagation();a.preventDefault()}return false};this.log=function(a){if(console&&console.log){console.log.apply(console,arguments)}else if(firebug&&firebug.d){firebug.d.console.log.apply(firebug.d.console,arguments)}};this.moveObjectToXY=function(a,b,d){if(typeof a=='string'){a=document.getElementById(a)}if(!a||typeof a!='object'){return false}a.style.position="absolute";a.style.left=b;a.style.top=d;return true};this.createObject=function(a,b,d){var h=document.createElement(a.toUpperCase());for(var g in b){if(b.hasOwnProperty(g)){if(g=="style"){c.applyCSS(h,b[g])}else{h.setAttribute(g,b[g])}}}if(typeof d=='string'){h.innerHTML=d}if(typeof d=='object'){h.appendChild(d)}return h};this.deleteObject=function(a){if(typeof a=='string'){a=document.getElementById(a)}if(!a||typeof a!='object'){return false}a.innerHTML="";return a.parentNode.removeChild(a)};this.findPos=function(a){if(typeof a=='string'){a=document.getElementById(a)}if(typeof a!='object'||!a){return false}var b=0,d=0,h=a.offsetWidth,g=a.offsetHeight;if(a.offsetParent){do{b+=a.offsetLeft;d+=a.offsetTop;a=a.offsetParent}while(a)}return{0:b,1:d,2:b+h,3:d+g,left:b,top:d,right:b+h,bottom:d+g}};this.trimL=function(a){return(typeof a=='string'?a.replace(/^\s+/,''):"")};this.trimR=function(a){return(typeof a=='string'?a.replace(/\s+$/,''):"")};this.trim=function(a){return(typeof a=='string'?a.replace(/^\s+/,'').replace(/\s+$/,''):"")};this.applyCSS=function(a,b){if(typeof a=='string'){a=document.getElementById(a)}if(typeof a!='object'||!a){return false}return(typeof b!='string'?false:a.style.cssText=b)};this.copyCSS=function(a,b){if(typeof a=='string'){a=document.getElementById(a)}if(typeof a!='object'||!a){return false}if(typeof b=='string'){b=document.getElementById(b)}if(typeof b!='object'||!b){return false}return(b.style.cssText=a.style.cssText)};this.dumpObject=function(a){if(typeof a==='object'){var b=["&lt;object&gt; {<dir>"];for(var d in a){if(a.hasOwnProperty(d)){b[b.length]=d+": "+c.dumpObject(a[d])+"<br />"}}b[b.length]="}</dir>";return b.join('')}return("&lt;"+(typeof a)+"&gt; "+a)};this.windowProperties=function(){if(document.body){var a=(document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth);var b=(document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight);var d=false;var h=false;var g=false;var f=false;if(window.scrollX){d=window.scrollX;h=window.scrollY}else{d=document.documentElement.scrollLeft+document.body.scrollLeft;h=document.documentElement.scrollTop+document.body.scrollTop}if(window.innerHeight&&window.scrollMaxY){f=window.innerHeight+window.scrollMaxY;g=window.innerWidth+window.scrollMaxX}else if(document.body.scrollHeight>document.body.offsetHeight){f=document.body.scrollHeight;g=document.body.scrollWidth}else{f=document.body.offsetHeight;g=document.body.offsetWidth}return{0:a,1:b,2:g,3:f,4:d,5:h,"windowWidth":a,"windowHeight":b,"documentWidth":g,"documentHeight":f,"scrollX":d,"scrollY":h}}return false};this.openWindow=function(a,b,d){var h=screen.width/2-b/2;var g=screen.height/2-d/2;return window.open(a,"","scrollbars=auto,width="+b+",height="+d+",screenX="+h+",screenY="+g+",left="+h+",top="+g)};this.xhtml={getFromCode:function(a){var b=c.createObject("DIV",null,a);var d=c.xhtml.getFromNode(a);c.deleteObject(d);return d},getFromNode:function(a,b,d,h,g){var f,l='',k,p=true,i='';var m='|div|p|table|tbody|tr|td|th|title|head|body|script|comment|li|meta|h1|h2|h3|h4|h5|h6|hr|ul|ol|option|link|';var j='|html|head|body|p|th|style|';var o=new RegExp("^<!--(([a]|[^a])*)-->$");var q=a.childNodes;var z=q.length;var w=(h?true:false);var u=new Date().getTime();for(f=0;f<z;f++){var n=q[f];if(document.all){if(n.getAttribute&&n.getAttribute('re_parsed')==u){continue}if(n.setAttribute){n.setAttribute('re_parsed',u)}}if(n.parentNode&&String(a.tagName).toLowerCase()!=String(n.parentNode.tagName).toLowerCase()){continue}switch(n.nodeType){case 1:k=String(n.tagName).toLowerCase();if(document.all&&k=='embed'){var A=/align=("[^\"]*"|'[^\']*'|[^\"\'\s]*)(\s|\>)/i;var x=String(n.outerHTML).match(A);if(x){x=x[1];i=x.replace(/("|')/g,"")}}if(k==''){break}if(k=='meta'){var J=String(n.name).toLowerCase();if(J=='generator'){break}}if(document.all&&k=='object'&&!(n.canHaveChildren||n.hasChildNodes())){l+=c.xhtml.fixObjectCode(n.outerHTML);continue}if(!h&&k=='body'){p=false}if(k=='!'){var F=o.exec(n.text);if(F){l+=c.xhtml.fixComment(F[1])}}else{if(k=='html'){l='<.?xml version="1.0" encoding="'+d+'"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'}if(m.indexOf('|'+k+'|')!=-1){if((w||l!='')&&!g){l+='\n'}else{w=true}}l+='<'+k;var B=n.attributes;var K=B.length;var t,G=false,H=false,I=false,C=false;for(var y=0;y<K;y++){var r=B[y].nodeName.toLowerCase();if(r=='re_parsed'){continue}if(!B[y].specified&&r!='selected'&&r!='style'&&r!='value'&&r!='shape'&&r!='coords'){continue}if((r=='shape'||r=='coords')&&k!='area'){continue}if(r=='selected'&&!n.selected||r=='style'&&n.style.cssText==''){continue}if(r=='_1'||r=='_2'||r=='_0-userdefined'||k=='br'&&r=='type'&&n.getAttribute('type')=='_0'){continue}var L=true;switch(r){case"style":t=n.style.cssText;break;case"class":t=n.className;break;case"http-equiv":t=n.httpEquiv;break;case"noshade":case"checked":case"selected":case"multiple":case"nowrap":case"disabled":t=r;break;case"name":t=(n.name?n.name:n.getAttribute('name'));break;case"for":t=n.htmlFor;break;default:try{t=n.getAttribute(r,2)}catch(e){L=false}}if(k=='embed'){switch(r){case'align':t=(i?i:eval('child.'+r));break;case'showstatusbar':case'showcontrols':case'autostart':case'type':t=B[y].nodeValue;break}}if(r=='lang'&&k=='html'){G=true;t=b}if(r=='xml:lang'){H=true;t=b}if(r=='xmlns'){I=true}if(k=='object'&&r=='src'&&document.all){t=c.xhtml.fixObjectSrc(n.outerHTML)}if(L&&(k!='li'||r!='value')){l+=' '+r+'="'+c.xhtml.fixAttribute(t)+'"'}if(r=='alt'){C=true}}if(k=='img'&&!C){l+=' alt=""'}if(k=='html'){if(!G){l+=' lang="'+b+'"'}if(!H){l+=' xml:lang="'+b+'"'}if(!I){l+=' xmlns="http://www.w3.org/1999/xhtml"'}}if(n.canHaveChildren||n.hasChildNodes()){l+='>';l+=c.xhtml.getFromNode(n,b,d,true,(g||k=='pre'?true:false));l+='</'+k+'>'}else{if(k=='style'||k=='title'||k=='script'||k=='textarea'||k=='a'){l+='>';var D;if(k=='script'){D=n.text}else{D=n.innerHTML}if(k=='style'){D=String(D).replace(/[\n]+/g,'\n')}l+=D+'</'+k+'>'}else{l+=' />'}}if(j.indexOf('|'+k+'|')!=-1){if((w||l!='')&&!g){l+='\n'}}}break;case 3:if(!g){if(n.nodeValue!='\n'){l+=c.xhtml.fixEntities(c.xhtml.fixText(n.nodeValue))}}else{l+=n.nodeValue}break;case 8:l+=c.xhtml.fixComment(n.nodeValue);break;default:break}}if(!p){l=l.replace(/<\/?head>[\n]*/gi,"").replace(/<head \/>[\n]*/gi,"").replace(/<\/?body>[\n]*/gi,"")}return l},fixComment:function(a){var b=new RegExp("-$");a=a.replace(/--/g,"__");if(b.exec(a)){a+=" "}return"<!--"+a+"-->"},fixText:function(a){return String(a).replace(/\n{2,}/g,"\n").replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;")},fixAttribute:function(a){return String(a).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},fixObjectSrc:function(a){var b=a.match(/<object ([^>]+)>/i);if(b){var d=b[1].match(/src="([^"]+)"/i);if(!d){d=b[1].match(/src='([^']+)'/i);if(!d){d=b[1].match(/src=([^ ]+)/i)}}if(d){return d[1]}}return''},fixObjectCode:function(a){return String(a).replace(/ style=/gi,' style=').replace(/ codeBase=/gi,' codebase=').replace(/ height=/gi,' height=').replace(/ width=/gi,' width=').replace(/ align=/gi,' align=').replace(/ classid=/gi,' classid=').replace(/ src=/gi,' src=').replace(/ NAME=/gi,' name=').replace(/ VALUE=/gi,' value=').replace(/ quality=/gi,' quality=').replace(/ TYPE=/gi,' type=').replace(/ PLUGINSPAGE=/gi,' pluginspage=').replace(/<OBJECT /gi,'<object ').replace(/<\/OBJECT>/gi,'</object>').replace(/<PARAM /gi,'<param ').replace(/<\/PARAM>/gi,'</param>').replace(/<EMBED /gi,'<embed ').replace(/<\/EMBED>/gi,'</embed>')},ents:{8364:"euro",402:"fnof",8240:"permil",352:"Scaron",338:"OElig",381:"#381",8482:"trade",353:"scaron",339:"oelig",382:"#382",376:"Yuml",162:"cent",163:"pound",164:"curren",165:"yen",166:"brvbar",167:"sect",168:"uml",169:"copy",170:"ordf",171:"laquo",172:"not",173:"shy",174:"reg",175:"macr",176:"deg",177:"plusmn",178:"sup2",179:"sup3",180:"acute",181:"micro",182:"para",183:"middot",184:"cedil",185:"sup1",186:"ordm",187:"raquo",188:"frac14",189:"frac12",190:"frac34",191:"iquest",192:"Agrave",193:"Aacute",194:"Acirc",195:"Atilde",196:"Auml",197:"Aring",198:"AElig",199:"Ccedil",200:"Egrave",201:"Eacute",202:"Ecirc",203:"Euml",204:"Igrave",205:"Iacute",206:"Icirc",207:"Iuml",208:"ETH",209:"Ntilde",210:"Ograve",211:"Oacute",212:"Ocirc",213:"Otilde",214:"Ouml",215:"times",216:"Oslash",217:"Ugrave",218:"Uacute",219:"Ucirc",220:"Uuml",221:"Yacute",222:"THORN",223:"szlig",224:"agrave",225:"aacute",226:"acirc",227:"atilde",228:"auml",229:"aring",230:"aelig",231:"ccedil",232:"egrave",233:"eacute",234:"ecirc",235:"euml",236:"igrave",237:"iacute",238:"icirc",239:"iuml",240:"eth",241:"ntilde",242:"ograve",243:"oacute",244:"ocirc",245:"otilde",246:"ouml",247:"divide",248:"oslash",249:"ugrave",250:"uacute",251:"ucirc",252:"uuml",253:"yacute",254:"thorn",255:"yuml",913:"Alpha",914:"Beta",915:"Gamma",916:"Delta",917:"Epsilon",918:"Zeta",919:"Eta",920:"Theta",921:"Iota",922:"Kappa",923:"Lambda",924:"Mu",925:"Nu",926:"Xi",927:"Omicron",928:"Pi",929:"Rho",931:"Sigma",932:"Tau",933:"Upsilon",934:"Phi",935:"Chi",936:"Psi",937:"Omega",8756:"there4",8869:"perp",945:"alpha",946:"beta",947:"gamma",948:"delta",949:"epsilon",950:"zeta",951:"eta",952:"theta",953:"iota",954:"kappa",955:"lambda",956:"mu",957:"nu",958:"xi",959:"omicron",960:"pi",961:"rho",962:"sigmaf",963:"sigma",964:"tau",965:"upsilon",966:"phi",967:"chi",968:"psi",969:"omega",8254:"oline",8804:"le",8260:"frasl",8734:"infin",8747:"int",9827:"clubs",9830:"diams",9829:"hearts",9824:"spades",8596:"harr",8592:"larr",8594:"rarr",8593:"uarr",8595:"darr",8220:"ldquo",8221:"rdquo",8222:"bdquo",8805:"ge",8733:"prop",8706:"part",8226:"bull",8800:"ne",8801:"equiv",8776:"asymp",8230:"hellip",8212:"mdash",8745:"cap",8746:"cup",8835:"sup",8839:"supe",8834:"sub",8838:"sube",8712:"isin",8715:"ni",8736:"ang",8711:"nabla",8719:"prod",8730:"radic",8743:"and",8744:"or",8660:"hArr",8658:"rArr",9674:"loz",8721:"sum",8704:"forall",8707:"exist",8216:"lsquo",8217:"rsquo",161:"iexcl",977:"thetasym",978:"upsih",982:"piv",8242:"prime",8243:"Prime",8472:"weierp",8465:"image",8476:"real",8501:"alefsym",8629:"crarr",8656:"lArr",8657:"uArr",8659:"dArr",8709:"empty",8713:"notin",8727:"lowast",8764:"sim",8773:"cong",8836:"nsub",8853:"oplus",8855:"otimes",8901:"sdot",8968:"lceil",8969:"rceil",8970:"lfloor",8971:"rfloor",9001:"lang",9002:"rang",710:"circ",732:"tilde",8194:"ensp",8195:"emsp",8201:"thinsp",8204:"zwnj",8205:"zwj",8206:"lrm",8207:"rlm",8211:"ndash",8218:"sbquo",8224:"dagger",8225:"Dagger",8249:"lsaquo",8250:"rsaquo"},fixEntities:function(a){var b;var d='';var h=new RegExp("[a]|[^a]","g");var g=a.match(h);if(!g){return a}for(b=0;b<g.length;b++){var f=parseInt(g[b].charCodeAt(),10);d+=(c.xhtml.ents[f]?"&"+c.xhtml.ents[f]+";":g[b])}return d}};this.mouse={Xarea:0,Yarea:0,Xpage:0,Ypage:0,dragObj:{},onMove:function(a){a=a||window.event;c.mouse.Xarea=a.clientX;c.mouse.Yarea=a.clientY;if(document.documentElement&&document.body&&document.body.scrollTop){c.mouse.Xscroll=document.documentElement.scrollLeft+document.body.scrollLeft;c.mouse.Yscroll=document.documentElement.scrollTop+document.body.scrollTop}else{c.mouse.Xscroll=window.scrollX;c.mouse.Yscroll=window.scrollY}c.mouse.Xpage=c.mouse.Xarea+c.mouse.Xscroll;c.mouse.Ypage=c.mouse.Yarea+c.mouse.Yscroll;if(typeof c.mouse.dragObj.elNode==='object'){c.mouse.dragObj.elNode.style.left=(c.mouse.dragObj.elStartLeft+c.mouse.Xpage-c.mouse.dragObj.cursorStartX)+"px";c.mouse.dragObj.elNode.style.top=(c.mouse.dragObj.elStartTop+c.mouse.Ypage-c.mouse.dragObj.cursorStartY)+"px";if(typeof a.event!='undefined'){if(typeof a.cancelBubble!='undefined'){a.cancelBubble=true}if(typeof a.returnValue!='undefined'){a.returnValue=false}}if(typeof a.preventDefault!='undefined'){a.preventDefault()}}},dragStart:function(a){if(typeof a=='string'){a=document.getElementById(a)}if(typeof a!='object'){return false}c.mouse.dragObj.elNode=a;c.mouse.dragObj.cursorStartX=c.mouse.Xpage;c.mouse.dragObj.cursorStartY=c.mouse.Ypage;var b=c.findPos(c.mouse.dragObj.elNode);c.mouse.dragObj.elStartLeft=b[0];c.mouse.dragObj.elStartTop=b[1];c.mouse.dragObj.elNode.style.zIndex++;return true},dragStop:function(){if(typeof c.mouse.dragObj.elNode=='object'){c.mouse.dragObj.elNode.style.zIndex--;c.mouse.dragObj={}}}};c.addEvent(document,"mousemove",c.mouse.onMove);c.addEvent(document,"mouseup",c.mouse.dragStop);this.mouse.animation={actualToPoint:function(a,b,d,h){return c.mouse.animation.areaToArea(c.mouse.Xpage,c.mouse.Ypage,a,b,d,h)},actualToObject:function(a,b,d){if(typeof a=='string'){a=document.getElementById(a)}if(typeof a!='object'){return false}var h=c.findPos(a);return c.mouse.animation.areaToArea(c.mouse.Xpage,c.mouse.Ypage,(h[0]+h[2])/2,(h[1]+h[3])/2,b,d)},areaToArea:function(h,g,f,l,k,p){h=parseInt(h,10);g=parseInt(g,10);f=parseInt(f,10);l=parseInt(l,10);p=parseInt(p,10);k=parseInt(k,10);var i=h;var m=g;if(typeof f!='number'){f=-1}if(typeof l!='number'){l=-1}if(typeof k!='number'){k=1}if(typeof p!='number'){p=2000}if(k<1){k=1}if(p<1){p=1}if(f>=0&&l>=0){var j={"src":c.config.IMAGE_URL+"puntero.gif","alt":"i","id":"ngstk_pointer","title":"Puntero simulado","border":"0","style":"position:absolute;top:"+c.mouse.Ypage+"px;left:"+c.mouse.Xpage+"px;z-index:99;"};document.body.appendChild(c.createObject("img",j));var o=k/40;if(o>100){o=100}var q=k/o;var z=(f-i)/o;var w=(l-m)/o;for(var u=1;u<o;u++){i+=z;m+=w;(function(a,b,d){setTimeout(function(){c.moveObjectToXY('ngstk_pointer',a+"px",b+"px")},d)}(i,m,parseInt(q*u,10)))}setTimeout(function(){c.moveObjectToXY('ngstk_pointer',f+"px",l+"px")},k);setTimeout(function(){c.deleteObject('ngstk_pointer')},parseInt(k+p,10))}}};c.preloadimg([c.config.IMAGE_URL+"puntero.gif"]);this.ajax=new(function N(){function o(a,b,d,h,g,f,l,k){if(typeof a!=='string'){return false}a=a.replace(/#.*$/,'');a+=((a.indexOf("?")==-1)?"?":"&");a+=Math.random(1000);if(typeof b=='object'){var p=[];for(var i in b){if(b.hasOwnProperty(i)){p[p.length]=encodeURIComponent(i)+"="+encodeURIComponent(b[i])}}b=p.join('&')}if(typeof b!='string'||!b){b=""}d=(""+d).toUpperCase();if(d!="POST"&&b!=""){a+="&"+b}var m;if(typeof ActiveXObject!="undefined"){m=new ActiveXObject("Microsoft.XMLHTTP")}else if(XMLHttpRequest){m=new XMLHttpRequest()}if(m){m.onreadystatechange=function(){if(typeof g==='function'){g(m,l)}if(m.readyState==4){if(m.status>=200&&m.status<400){if(typeof h==='function'){h(m,l)}}else{if(typeof f==='function'){f(m,l)}}}};if(k){for(var j in k){if(k.hasOwnProperty(j)){m.setRequestHeader(j,k[j])}}}m.open(d,a,true);m.setRequestHeader("Content-type","application/x-www-form-urlencoded");if(d=="POST"){m.setRequestHeader("Content-length",b.length);m.setRequestHeader("Connection","close");m.send(b)}else{if(typeof ActiveXObject!="undefined"){m.send()}else{m.send(null)}}}else{return false}return true}this.sendAndRecieve=function(a,b,d,h,g,f,l){return(new o(a,b,d,h,g,f,l))};this.send=this.sendAndRecieve;this.recieve=function(a,b,d,h,g,f){return c.ajax.sendAndRecieve(a,false,b,d,h,g,f)}})();this.audio={activep:0,active:true,play:function(a,b,d,h,g,f){if(c.audio.active&&typeof b==='number'&&typeof a==='string'){if(typeof d!=='number'){d=0}if(typeof h!=='string'){h="ngstk_audioObject"+c.getUniqueID()}if(!g){g=false}if(!f){f=false}var l=(b*1000)+d+300;setTimeout(function(){c.audio.build(a,h,l,false,g,f)},d);return true}return false},playDecrase:function(){if(c.audio.active>0){c.audio.active--}},build:function(a,b,d,h,g,f){if((f||c.audio.active===0)&&c.audio.active){if(!g){c.audio.active++}var l=(document.all?"&nbsp;<bgsound src=\""+a+"\" autostart=\"true\" loop=\""+h+"\"></bgsound>":'&nbsp;<object width="1" height="1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject"><param name="fileName" value="'+a+'"><param name="animationatStart" value="0"><param name="transparentatStart" value="1"><param name="autoStart" value="1"><param name="ShowControls" value="0"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="0"><param name="loop" value="'+h+'"><embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="0" bgcolor="transparent" showcontrols="0" showtracker="0" showdisplay="0" showstatusbar="0" videoborder3d="0" width="1" height="1" src="'+a+'" autostart="1" designtimesp="5311" loop="'+h+'"></embed></object>');var k=c.createObject("div",{id:b,style:"top:0; left:0; position:absolute; z-index:-1;"},l);document.body.appendChild(k);if(!g&&d&&d>0){setTimeout(c.audio.playDecrase,d)}if(d&&d>0){setTimeout(function(){c.audio.remove(b)},d)}}},remove:c.deleteObject};this.dict={text:function O(a,b,d){if(!a||typeof a!='string'){return}if(!b||typeof b!='string'){b="en"}if(!d||typeof d!='string'){d="fm"}var h=document.getElementById("ngstk_dict");if(h){c.deleteObject(h)}h=c.createObject("div",{id:"ngstk_dict",style:"position:absolute;bottom:2px; right:2px;"},"<iframe id=\"this.escuchar_if\" name=\"this.escuchar_if\" src=\"about:blank\" style=\"width:600px; height:600px;\"></iframe>");document.body.appendChild(h);var g=document.createElement('form');g.method='POST';g.target='this.escuchar_if';g.action='http://vozme.com/text2voice.php?lang='+b;var f=document.createElement('input');f.name='text';f.type='hidden';f.value=a;g.appendChild(f);var l=document.createElement('input');l.name='lang';l.type='hidden';l.value=b;g.appendChild(l);var k=document.createElement('input');k.name='gn';k.type='hidden';k.value=d;g.appendChild(k);var p=document.createElement('input');p.name='interface';p.type='hidden';p.value='full';g.appendChild(p);h.appendChild(g);g.submit()},selection:function(a,b){var d="";if(typeof window.getSelection!="undefined"){d=window.getSelection()+""}else if(typeof document.getSelection!="undefined"){d=document.getSelection()+""}else if(typeof document.selection!="undefined"){d=document.selection.createRange().text+""}if(d!=""){return c.dict.text(d,a,b)}return false},remove:function P(){return c.deleteObject("ngstk_dict")}};this.editor=function(i,m){if(!i||!m){return false}var j=this;var o,q=false,z="",w="";this.divStyle="";this.areaWidth=null;this.areaHeight=null;this.javaScript=false;this.cssFile=c.config.BASE_URL+"/css/estilo.css";this.buttonPath=c.config.IMAGE_URL;this.imageBrowse=c.config.BROWSER_URL+((c.config.BROWSER_URL.indexOf("?")==-1)?"?":"&")+"fn="+m+".addImage";this.flashBrowse=c.config.BROWSER_URL+((c.config.BROWSER_URL.indexOf("?")==-1)?"?":"&")+"fn="+m+".addFlash";this.linkBrowse=c.config.BROWSER_URL+((c.config.BROWSER_URL.indexOf("?")==-1)?"?":"&")+"fn="+m+".addLink";this.charset="utf-8";this.headMax=1;var u={ie:Boolean(document.body.currentStyle),gecko:(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1)};var n=location.href;var A=-1;var x;do{x=A;A=n.indexOf("/",A+1)}while(A!=-1);if(x>7){n=n.substring(0,x+1)}n=n.replace(/\//g,"\\/");var J=c.config.BASE_URL.replace(/\//g,"\\/");var F=new RegExp("/(href|data|value|src)=[\"']"+n+"([^\"']*)[\"']/gi");var B=new RegExp("/(href|data|value|src)=[\"']"+J+"([^\"']*)[\"']/gi");function K(a){if(u.gecko){return a}return a.replace(/(href|data|value|src)=["']([^"']*)["']/gi,'$1="$2"')}function t(a){if(u.gecko){return a}return a.replace(/(href|data|value|src)=["']([^"']*)["']/gi,'$1="$2"')}this.addImage=function(a){document.getElementById(i+'-i-url').value=a};this.addFlash=function(a){document.getElementById(i+'-f-url').value=a};this.addLink=function(a){document.getElementById(i+'-l-url').value=a};this.submit=function(){if(j.isOn()){if(q){j.toggleSource()}var a=c.xhtml.getFromNode(o.document.body);a=t(a);if(!j.javaScript){a=a.replace(/<script.*<\/script>/gi,"");a=a.replace(/<script.*<\/script>/gi,"")}if(c.config.SYNTAX){var b=[];if(a.indexOf('class="cpp"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushCpp.js"></script>'}if(a.indexOf('class="csharp"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushCSharp.js"></script>'}if(a.indexOf('class="css"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushCss.js"></script>'}if(a.indexOf('class="delphi"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushDelphi.js"></script>'}if(a.indexOf('class="xml"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushXml.js"></script>'}if(a.indexOf('class="java"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushJava.js"></script>'}if(a.indexOf('class="javascript"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushJScript.js"></script>'}if(a.indexOf('class="php"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushPhp.js"></script>'}if(a.indexOf('class="python"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushPython.js"></script>'}if(a.indexOf('class="ruby"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushRuby.js"></script>'}if(a.indexOf('class="sql"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushSql.js"></script>'}if(a.indexOf('class="vb"')!=-1){b[b.length]='<script type="text/javascript" src="'+c.config.SYNTAX_URL+'shBrushVb.js"></script>'}if(b!=""){a+=b.join("");a+="<link href=\""+c.config.SYNTAX_URL+"SyntaxHighlighter.css\" rel=\"stylesheet\" type=\"text/css\" /><script type=\"text/javascript\" src=\""+c.config.SYNTAX_URL+"shCore.js\"></script>";a+="<script type=\"text/javascript\">\n<!--\ndp.SyntaxHighlighter.ClipboardSwf = '"+c.config.SYNTAX_URL+"clipboard.swf'; dp.SyntaxHighlighter.HighlightAll('code'); // -->\n</script>"}}a=a.replace(B,"$1=\"$2\"");a=a.replace(F,"$1=\"$2\"");a=a.replace(/(href|data|value|src)=["'](^(javascript ?:|#|http:\/\/)][^"']*)["']/g,'$1="/$2"');a=a.replace(/<strong ?\/>/gi,"");document.getElementById(i).value=a}};function G(){var a=['<input type="hidden" id="'+i+'" name="'+i+'" value="" />'];a[a.length]='<div style="float:right; padding:5px;z-index:1;"><input id="'+i+'-viewSource" type="checkbox" onclick="'+m+'.toggleSource()" /><span onclick="'+m+'.toggleSource()">Fuente</span></div>';a[a.length]='<div id="'+i+'-botones" unselectable="on" onselectstart="return(false)" style="background-color:#d4d0c8;padding:0;border:1px solid #333;user-select:none;-moz-user-select:none;-khtml-user-select:none;">';a[a.length]='<select style="vertical-align:middle;margin:1px;" onchange="'+m+'.execCommand(\'formatblock\', this.value);this.selectedIndex=0;">';a[a.length]='<option value=""></option>';for(var b=j.headMax;b<=7;b++){a[a.length]='<option value="<h'+b+'>">Cabecera '+b+'</option>'}a[a.length]='<option value="<p>">P&aacute;rrafo</option><option value="<pre>">Preformateado</option></select>';a[a.length]='&nbsp;';if(c.config.SYNTAX){a[a.length]='<select style="vertical-align:middle;margin:1px;" onchange="'+m+'.codeBlock(this.value);this.selectedIndex=0;">';a[a.length]=' <option value=""></option>';a[a.length]=' <option value="cpp">C++</option>';a[a.length]=' <option value="csharp">C#</option>';a[a.length]=' <option value="css">CSS</option>';a[a.length]=' <option value="delphi">Delphi</option>';a[a.length]=' <option value="xml">HTML/XML/XHTML</option>';a[a.length]=' <option value="java">Java</option>';a[a.length]=' <option value="javascript">JavaScript</option>';a[a.length]=' <option value="php">PHP</option>';a[a.length]=' <option value="python">Python</option>';a[a.length]=' <option value="ruby">Ruby</option>';a[a.length]=' <option value="sql">SQL</option>';a[a.length]=' <option value="vb">VB</option>';a[a.length]='</select>';a[a.length]='&nbsp;'}a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" accesskey="B" title="Negrita" type="button" onclick="'+m+'.execCommand(\'bold\')"><img src="'+j.buttonPath+'bold.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Negrita" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Cursiva" type="button" onclick="'+m+'.execCommand(\'italic\')"><img src="'+j.buttonPath+'italic.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Cursiva" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Subrayado" type="button" onclick="'+m+'.execCommand(\'underline\')"><img src="'+j.buttonPath+'underline.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Subrayado" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Tachado" type="button" onclick="'+m+'.execCommand(\'StrikeThrough\')"><img src="'+j.buttonPath+'strikethrough.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Tachado" /></button>';a[a.length]='&nbsp;';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Izquierda" type="button" onclick="'+m+'.execCommand(\'justifyleft\')"><img src="'+j.buttonPath+'left.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Izquierda" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Centrar" type="button" onclick="'+m+'.execCommand(\'justifycenter\')"><img src="'+j.buttonPath+'center.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Centrar" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Derecha" type="button" onclick="'+m+'.execCommand(\'justifyright\')"><img src="'+j.buttonPath+'right.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Derecha" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Justificar" type="button" onclick="'+m+'.execCommand(\'justifyfull\')"><img src="'+j.buttonPath+'justify.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Justificar" /></button>';a[a.length]='&nbsp;';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Superscript" type="button" onclick="'+m+'.execCommand(\'Superscript\')"><img src="'+j.buttonPath+'superscript.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Superscript" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Subscript" type="button" onclick="'+m+'.execCommand(\'Subscript\')"><img src="'+j.buttonPath+'subscript.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Subscript" /></button>';a[a.length]='&nbsp;';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Lista numerada" type="button" onclick="'+m+'.execCommand(\'insertorderedlist\')"><img src="'+j.buttonPath+'number.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Lista numerada" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Lista no numerada" type="button" onclick="'+m+'.execCommand(\'insertunorderedlist\')"><img src="'+j.buttonPath+'bullet.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Lista no numerada" /></button>';a[a.length]='&nbsp;';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Sangrar" type="button" onclick="'+m+'.execCommand(\'indent\')"><img src="'+j.buttonPath+'indent.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Sangrar" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Quitar sangrado" type="button" onclick="'+m+'.execCommand(\'outdent\')"><img src="'+j.buttonPath+'outdent.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Quitar sangrado" /></button>';a[a.length]='&nbsp;';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Insertar enlace" type="button" onclick="'+m+'.hideDialogs(); document.getElementById(\''+i+'-link\').style.display=\'block\'"><img src="'+j.buttonPath+'link.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Insertar enlace" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Insertar im&aacute;gen" type="button" onclick="'+m+'.hideDialogs(); document.getElementById(\''+i+'-imagen\').style.display=\'block\'"><img src="'+j.buttonPath+'image.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Insertar im&aacute;gen" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Insertar flash" type="button" onclick="'+m+'.hideDialogs(); document.getElementById(\''+i+'-flash\').style.display=\'block\'"><img src="'+j.buttonPath+'flash.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Insertar flash" /></button>';a[a.length]='<button style="vertical-align:middle;padding:0;margin:1px;" title="Insertar tabla" type="button" onclick="'+m+'.hideDialogs(); document.getElementById(\''+i+'-tabla\').style.display=\'block\'"><img src="'+j.buttonPath+'table.gif" style="vertical-align:middle;margin:-1px;" onerror="this.parentNode.innerHTML=this.alt" alt="Insertar tabla" /></button>';a[a.length]='</div>';a[a.length]='<div id="'+i+'-link" style="background-color:#d4d0c8;padding:0;border:1px solid #333;display:none;" onkeypress="if (event.keyCode==13) return false;" onselectstart="return(false)">';a[a.length]='URL: <input type="text" id="'+i+'-l-url" size="50" /> ';if(j.linkBrowse){a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;"type="button" onclick="'+m+'.openWindow(\''+j.linkBrowse+'&ID='+i+'-i-url\',750,550)" value="En servidor" /> '}a[a.length]='<input type="checkbox" id="'+i+'-l-new" /> En ventana nueva. ';a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.insertLink();" value="Insertar enlace" /><input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.hideDialogs();" value="Cancelar" />';a[a.length]='</div>';a[a.length]='<div id="'+i+'-imagen" style="background-color:#d4d0c8;padding:0;border:1px solid #333;display:none;" onkeypress="if (event.keyCode==13) return false;" onselectstart="return(false)">';a[a.length]='URL de la im&aacute;gen: <input type="text" id="'+i+'-i-url" size="50" /> ';if(j.imageBrowse){a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.openWindow(\''+j.imageBrowse+'&ID='+i+'-i-url\',750,550)" value="En servidor" /> '}a[a.length]='<label title="Texto a mostrar si la im&aacute;gen no est&aacute; disponible"><br>Texto alternativo: <input id="'+i+'-i-alt" type="text" size="50" /></label><br>';a[a.length]='Alineado: <select style="vertical-align:middle;margin:1px;" id="'+i+'-i-side"><option value="none">_&hearts;_  Con el texto</option><option value="left">&hearts;== A la izaquierda</option><option value="right">==&hearts; A la derecha</option></select> ';a[a.length]='Borde: <input type="text" id="'+i+'-i-border" size="20" value="none" title="N&uacute;mero o css (ej: 3px maroon outset)" /> ';a[a.length]='M&aacute;rgen: <input type="text" id="'+i+'-i-margin" size="20" value="0" title="N&uacute;mero o CSS (ej: 5px 1em)" /> ';a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.insertImage();" value="Insertar im&aacute;gen" /><input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.hideDialogs();" value="Cancelar" />';a[a.length]='</div>';a[a.length]='<div id="'+i+'-flash" style="background-color:#d4d0c8;padding:0;border:1px solid #333;display:none;" onkeypress="if (event.keyCode==13) return false;" onselectstart="return(false)">';a[a.length]='<div style="border-bottom:1px solid #333;">';a[a.length]='URL: <input type="text" id="'+i+'-f-url" size="50" /> ';if(j.flashBrowse){a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.openWindow(\''+j.flashBrowse+'&ID='+i+'-f-url\',750,550)" value="En servidor" /> '}a[a.length]='Ancho: <input type="text" id="'+i+'-f-width" size="5" /> ';a[a.length]='Alto: <input type="text" id="'+i+'-f-height" size="5" /> ';a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.insertFlash();" value="Insertar" />';a[a.length]='</div>';a[a.length]='<div>';a[a.length]='<span style="float:right;"><input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.hideDialogs();" value="Cancelar" /></span>';a[a.length]='C&oacute;digo de youtube, etc...: <input type="text" id="'+i+'-v-cod" size="60" /> ';a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.insertFlashCode();" value="Insertar" />';a[a.length]='</div>';a[a.length]='</div>';a[a.length]='<div id="'+i+'-tabla" style="background-color:#d4d0c8;padding:0;border:1px solid #333;display:none;" onkeypress="if (event.keyCode==13) return false;" onselectstart="return(false)">';a[a.length]='Filas: <input type="text" id="'+i+'-t-rows" size="3" value="2"/> ';a[a.length]='<input type="checkbox" id="'+i+'-t-head" />1a es cabecera. ';a[a.length]='Columnas: <input type="text" id="'+i+'-t-cols" size="3" value="3"/> ';a[a.length]='<label title="Ancho en p&iacute;xeles o CSS">Borde : <input type="text" id="'+i+'-t-border" size="10" value="1px solid #000;"/> ';a[a.length]='<input type="checkbox" id="'+i+'-t-collapse" checked="checked" />Unir bordes. ';a[a.length]='<input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.insertTable();" value="Insertar tabla" /><input style="vertical-align:middle;padding:0;margin:1px;" type="button" onclick="'+m+'.hideDialogs();" value="Cancelar" />';a[a.length]='</div>';a[a.length]='<div><iframe id="'+i+'-frame" frameborder="0" style="width:100%; height:'+j.areaHeight+';"></iframe></div>';a[a.length]='<input type="hidden" name="'+i+'_3" value="1" />';return a.join('')}function H(){var a=['<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'];a[a.length]='<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"><head>';a[a.length]='<meta http-equiv="Content-Type" content="text/html; charset='+j.charset+'">';a[a.length]='<title>ngstk Rich Text Editor frame</title>';a[a.length]='<style type="text/css">html,body { cursor: text; margin:0; padding:0;}</style>';if(j.cssFile){a[a.length]='<link rel="stylesheet" type="text/css" href="'+j.cssFile+'">'}a[a.length]='</head><body></body></html>';return a.join('')}function I(a){a=a||window.event;var b;if(a.keyCode){b=a.keyCode}else if(a.which){b=a.which}if(!a.ctrlKey&&!a.metaKey&&!a.altKey&&b==9){if(!a.shiftKey){j.execCommand("indent")}else{j.execCommand("outdent")}return c.stopEvent(a)}if((a.ctrlKey||a.metaKey)&&!a.shiftKey&&!a.altKey){if(b==38){if(!q){j.execCommand("superscript")}c.stopEvent(a)}if(b==40){if(!q){j.execCommand("subscript")}c.stopEvent(a)}switch(String.fromCharCode(b).toLowerCase()){case'b':if(!q){j.execCommand("bold")}c.stopEvent(a);break;case'i':if(!q){j.execCommand("italic")}c.stopEvent(a);break;case'u':if(!q){j.execCommand("underline")}c.stopEvent(a);break;case's':if(!q){j.execCommand("StrikeThrough")}c.stopEvent(a);break;case'l':if(!q){j.execCommand("justifyleft")}c.stopEvent(a);break;case'r':if(!q){j.execCommand("justifyright")}c.stopEvent(a);break;case'w':if(!q){j.execCommand("justifycenter")}c.stopEvent(a);break;case'j':if(!q){j.execCommand("justifyfull")}c.stopEvent(a);break;case'n':if(!q){j.execCommand("insertorderedlist")}c.stopEvent(a);break;case'o':if(!q){j.execCommand("insertunorderedlist")}c.stopEvent(a);break;case'h':if(!q){j.hideDialogs()}c.display(i+'-link','block');c.stopEvent(a);break;case'g':if(!q){j.hideDialogs()}c.display(i+'-imagen','block');c.stopEvent(a);break;case'f':if(!q){j.hideDialogs()}c.display(i+'-flash','block');c.stopEvent(a);break;case'm':if(!q){j.hideDialogs()}c.display(i+'-video','block');c.stopEvent(a);break}}return true}function C(){try{o.document.body.innerHTML=w}catch(e){setTimeout(C,20)}}this.init=function(a){if(document.getElementById&&document.createElement&&document.designMode&&(u.ie||u.gecko)){var b;if(!(b=document.getElementById(i))){return false}w=(typeof a=="string"?c.base64_decode(a):b.value);var d=c.findPos(b);if(!j.areaWidth){j.areaWidth=(d.right-d.left-4)+"px"}if(!j.areaHeight){j.areaHeight=(d.bottom-d.top-4)+"px"}var h=c.createObject("div",{style:"width:"+j.areaWidth+";"+j.divStyle,id:i+"-ste"},(z?z:G()));document.getElementById(i).parentNode.replaceChild(h,document.getElementById(i));o=(u.ie?frames[i+"-frame"]:document.getElementById(i+"-frame").contentWindow);o.document.designMode="on";o.document.open();o.document.write(H());o.document.close();C();for(var g=document.getElementById(i);g&&g.nodeName.toLowerCase()!="html";g=g.parentNode){if(g.nodeName.toLowerCase()=="form"){c.addEvent(g,"submit",j.submit,j);break}}var f=o;f=((f.contentDocument)?f.contentDocument:f.document);c.addEvent(f,"keydown",I,j)}return true};this.codeBlock=function(a){j.insHTML('<pre name="code" class="'+a+'">','</pre>')};this.hideDialogs=function(){document.getElementById(i+"-imagen").style.display="none";document.getElementById(i+"-flash").style.display="none";document.getElementById(i+"-link").style.display="none";document.getElementById(i+"-tabla").style.display="none"};this.openWindow=c.openWindow;this.toggleSource=function(){var a,b;if(u.ie){if(!q){a=o.document.body.innerHTML;o.document.body.innerText=a;c.display(i+"-botones","none");q=true}else{b=o.document.body.innerText;o.document.body.innerHTML=b;c.display(i+"-botones","block");q=false}}else if(u.gecko){if(!q){a=document.createTextNode(o.document.body.innerHTML);o.document.body.innerHTML="";o.document.body.appendChild(a);c.display(i+"-botones","none");q=true}else{a=o.document.body.ownerDocument.createRange();a.selectNodeContents(o.document.body);o.document.body.innerHTML=a.toString();c.display(i+"-botones","block");q=false}}j.hideDialogs();document.getElementById(i+"-viewSource").checked=q?"checked":"";document.getElementById(i+"-viewSource").blur()};this.execCommand=function(a,b){o.focus();o.document.execCommand(a,false,b);o.focus()};this.insertLink=function(){j.hideDialogs();var a=document.getElementById(i+"-l-url").value;var b=document.getElementById(i+"-l-new").checked?' target="_4"':"";if(a){j.insHTML('<a href="'+a+'"'+b+'>')}else{o.document.execCommand('unlink',false)}};this.insertImage=function(){j.hideDialogs();var a=document.getElementById(i+"-i-url").value;if(a){var b=document.getElementById(i+"-i-alt").value?document.getElementById(i+"-i-alt").value:a.replace(/.*\/(.+)\..*/,"$1");var d=document.getElementById(i+"-i-side").value;var h=document.getElementById(i+"-i-border").value;if(h.match(/^\d+$/)){h+='px solid'}var g=document.getElementById(i+"-i-margin").value;if(g.match(/^\d+$/)){g+='px solid'}var f='<img alt="'+b+'" src="'+a+'"';if((d=="left")||(d=="right")||h||g){f+=' style="';if(d){f+='float:'+d+';'}if(h){f+='border:'+h+';'}if(g){f+='margin:'+g+';'}f+='"'}f+=' />';j.insHTML(f)}};function y(a,b,d){if(c.config.SATAY_URL){d=c.config.SATAY_URL+"?path="+d}var h='<object type="application/x-shockwave-flash" data="'+d+'" width="'+a+'" height="'+b+'"><param name="movie" value="'+d+'" /><param name="quality" value="high" /><div style="border: 1px dashed rgb(0, 0, 0); width: '+a+'px; height: '+a+'px; text-align: center;">Objeto Flash</div></object>';j.insHTML(h)}this.insertFlash=function(){j.hideDialogs();var a=document.getElementById(i+"-i-url").value;var b=document.getElementById(i+"-i-width").value;var d=document.getElementById(i+"-i-height").value;if(b&&d&&a){y(b,d,a)}};this.insertFlashCode=function(){j.hideDialogs();var a=document.getElementById(i+"-v-cod").value;if(a){var b=a.indexOf("<object");var d=false,h=false,g=false,f;if(b>0){a=a.substr(b)}b=a.indexOf("</object");if(b>0){a=a.substr(0,b)}b=a.indexOf("width");if(b!=-1){f=a.substr(b);f=f.substr(f.indexOf('"')+1);h=f.substr(0,f.indexOf('"'))}b=a.indexOf("width:");if(b!=-1){f=a.substr(b+6);h=f.substr(0,f.indexOf('px'))}b=a.indexOf("height");if(b!=-1){f=a.substr(b);f=f.substr(f.indexOf('"')+1);d=f.substr(0,f.indexOf('"'))}b=a.indexOf("height:");if(b!=-1){f=a.substr(b+7);d=f.substr(0,f.indexOf('px'))}b=a.indexOf("src");if(b!=-1){f=a.substr(b);f=f.substr(f.indexOf('"')+1);g=f.substr(0,f.indexOf('"'))}if(h&&d&&g){y(h,d,g)}}};this.insertTable=function(){j.hideDialogs();var a=document.getElementById(i+"-t-rows").value;var b=document.getElementById(i+"-t-cols").value;var d=document.getElementById(i+"-t-border").value;if(d.match(/^\d+$/)){d+='px solid'}var h=document.getElementById(i+"-t-collapse").checked;var g=document.getElementById(i+"-t-head").checked;var f="";if(d||h){f=' style="';if(d){f+='border:'+d+';'}if(h){f+='border-collapse:collapse;'}f+='"'}if((a>0)&&(b>0)){var l=['<table'+f+'>'];for(var k=1;k<=a;k++){l[l.length]='<tr'+f+'>';for(var p=1;p<=b;p++){l[l.length]=(k==1&&g?'<th'+f+'>T&iacute;tulo'+p+'</th>':'<td'+f+'>('+k+', '+p+')</td>')}l[l.length]='</tr>'}l[l.length]='</table>';j.insHTML(l.join(''))}};this.isOn=function(){return Boolean(o)};this.getContent=function(){try{return o.document.body.innerHTML}catch(e){}return false};this.insHTML=function(a,b){if(typeof b!=='string'){b=""}if(j.isOn()){var d,h;o.focus();if(o.getSelection){d=o.getSelection();if(d){h=d.getRangeAt(d.rangeCount-1).cloneRange();d=(d+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}else{d=o.document.selection;h=d.createRange()}if(a.indexOf('js:')===0){try{eval(a.replace(/^js:/,''))}catch(e){}return}try{o.document.execCommand("inserthtml",false,a+d+b)}catch(eb){if(o.document.selection){h.select();a=a+h.htmlText+b;try{o.document.selection.createRange().pasteHTML(a)}catch(ec){}}}}};return true}})();
