var Nyx={}; Nyx.box={}; Nyx.JSON={}; Nyx.JSON.arrayCount=function(el) {l=0; for(i in el) {l+=1;} return l;} Nyx.version='1.0'; Nyx.builtOn='01/03/2011 00:00:00'; Nyx.NyxURL='http://skywap.xtgem.com/nyx/nyx.js'; Nyx.html=document.getElementsByTagName('html')[0]; Nyx.head=document.getElementsByTagName('head')[0]; var $=function(id,indx) {if(!indx && document.getElementById(id) && !document.getElementsByTagName(id).length>0) {return document.getElementById(id);} else if(Nyx.isNumber(indx) && indx!='*' && !document.getElementById(id) && document.getElementsByTagName(id)) {return document.getElementsByTagName(id)[indx];} else if(indx && indx=='*' && !document.getElementById(id) && document.getElementsByTagName(id)) {for(i=0;i1024?Nyx.toDecimal(Nyx.html.innerHTML.length/1024,2)+' Kb':Nyx.html.innerHTML.length+' Bytes';} Nyx.about=function() {location.href='http://skywap.xtgem.com/nyx/about';} Nyx.tagExists=function(tag) {return document.getElementsByTagName(tag).length>0?true:false;} Nyx.ask=function(q,t,f) {t=t||'return'; f=f||'return'; t=new Function(t); f=new Function(f); q=confirm(q); q==true?t():f();} Nyx.getExt=function(url) { if(url && Nyx.isString(url)) { url_check=url.toLowerCase(); if(url_check.indexOf('http://')!=-1 || url_check.indexOf('www.')!=-1) { dot=url.lastIndexOf('.')+1; l=url.length; ext=url.substr(dot,l); ext=ext.toUpperCase(); return ext; }} } Nyx.imgButton=function(url,src,alt,name) {if(url && src) {alt=alt||'Generated By Nyx+'; name=name||''; document.write(''+alt+''+name+'');}} Nyx.addCss=function(id,p,css) {id.style[p]=css; return id;} Nyx.addEvent=function(obj,type,f) {if(window.addEventListener||window.attachEvent) {window.addEventListener?obj.addEventListener(type,f,false):obj.attachEvent('on'+type,f);} else {obj['on'+type]=f;} } Nyx.addVars=function(name,v,n,b,a) {b=b||''; a=a||''; i=1; while(iwindow.innerHeight) {Nyx.orientation='Landscape';} else {Nyx.orientation='Portrait';}} Nyx.addEvent(window,'load',function() {Nyx.getOrientation();}); Nyx.addEvent(window,'resize',function() {Nyx.getOrientation();}); Nyx.addClass=function(id,class) {if(id && class && id.class.indexOf(class)==-1) {id.class=id.class+' '+class;}} Nyx.addVar=function(x,v,obj) {if(x && v) {obj=obj||window; if(obj.indexOf('Nyx')==-1) {obj[x]=v;}}} Nyx.addStyle=function(id,style) {x=id.getAttribute('style'); if(id && x.indexOf(style)==-1 && style) {if(x.charAt(x.length-1)!=';') {x+='; ';} id.setAttribute('style',x+style);}} Nyx.getStyle=function(id) {if(id && id.getAttribute('style').length>0) {return id.getAttribute('style');}} Nyx.setStyle=function(id,style) {if(id && style) {id.setAttribute('style',style);}} Nyx.hasChild=function(id) {if(id.childNodes.length>0) {return true;}} Nyx.hasClass=function(id) {if(id) {if(id.class.length>0) {return true;} } } Nyx.hasClassName=function(id,class) {if(id && class) {if(id.class.indexOf(class)!=-1) {return true;} } } Nyx.removeClass=function(id,class) {if(id && id.class.indexOf(class)!=-1) {id.class=id.class.replace(class,'');}} Nyx.setClass=function(id,class) {if(id && class) {id.class=class;}} Nyx.toDecimal=function(n,d) {n=n.toString(); w=n.substring(0,n.indexOf('.')); n=n.substr(n.indexOf('.'),d+1); return (w+n)*1;} Nyx.firstChar=function(string) {return string?string.charAt(0):undefined;} Nyx.lastChar=function(string) {return string?string.charAt(string.length-1):undefined;} Nyx.maxChars=function(el,max) {if(el.tagName=='INPUT' || el.tagName=='TEXTAREA') {if(el.innerHTML) {el.innerHTML=el.innerHTML.substr(0,max);} else{el.value=el.value.substr(0,max);}}} Nyx.entity=function(string) {string=string.replace(/\/g,'>'); return string;} Nyx.viewSource=function(id) { if(id) {id.style.display='table'; id.style.backgroundColor='#FFFFFF'; id.style.color='#000FFF'; id.style.borderStyle='solid'; id.style.borderColor='#FF0000'; id.style.borderWidth='4px'; id.innerHTML=''+'
'+Nyx.entity(Nyx.html.innerHTML).replace(/\n/g,'
')+'
'+Nyx.entity('/* Nyx+ Source Viewer */')+'
'+'';} else {return ''+Nyx.entity(Nyx.html.innerHTML)+'';} } Nyx.toggleV=function(id,style) {if(id) {style=style||'inline'; (id.style.display!='none' && id.style.display!=style)?id.style.display=style:undefined; id.style.display==style?id.style.display='none':id.style.display=style;}} Nyx.panel=function(opt) {panel=document.createElement('div'); opt['css']=opt['css']||'background-color:#FFFFFF;color:#000FFF;border-style:solid;border-color:#FF0000;width:'+opt['w']+'px;height:'+opt['h']+'px;z-index:100;text-align:center;overflow:hidden;'; Nyx.setStyle(panel,opt['css']); panel.innerHTML=opt['code']; opt['id'].parentNode.insertBefore(panel,opt['id'].nextSibling);} Nyx.swapImg=function(img,url1,url2) {img1=new Image(); img1.src=url1; img2=new Image(); img2.src=url2; img.src!=url1?img.src=url1:img.src=url2;} Nyx.tag={}; Nyx.tag.all=document.getElementsByTagName('*'); Nyx.tag.allTags=document.getElementsByTagName('*').length; Nyx.tag.address=document.getElementsByTagName('address'); Nyx.tag.applet=document.getElementsByTagName('applet'); Nyx.tag.area=document.getElementsByTagName('area'); Nyx.tag.a=document.getElementsByTagName('a'); Nyx.tag.base=document.getElementsByTagName('base'); Nyx.tag.basefont=document.getElementsByTagName('basefont'); Nyx.tag.big=document.getElementsByTagName('big'); Nyx.tag.blockquote=document.getElementsByTagName('blockquote'); Nyx.tag.br=document.getElementsByTagName('br'); Nyx.tag.b=document.getElementsByTagName('b'); Nyx.tag.caption=document.getElementsByTagName('caption'); Nyx.tag.code=document.getElementsByTagName('code'); Nyx.tag.div=document.getElementsByTagName('div'); Nyx.tag.em=document.getElementsByTagName('em'); Nyx.tag.font=document.getElementsByTagName('font'); Nyx.tag.form=document.getElementsByTagName('form'); Nyx.tag.h1=document.getElementsByTagName('h1'); Nyx.tag.h2=document.getElementsByTagName('h2'); Nyx.tag.h3=document.getElementsByTagName('h3'); Nyx.tag.h4=document.getElementsByTagName('h4'); Nyx.tag.h5=document.getElementsByTagName('h5'); Nyx.tag.h6=document.getElementsByTagName('h6'); Nyx.tag.img=document.getElementsByTagName('img'); Nyx.tag.input=document.getElementsByTagName('input'); Nyx.tag.i=document.getElementsByTagName('i'); Nyx.tag.link=document.getElementsByTagName('link'); Nyx.tag.li=document.getElementsByTagName('li'); Nyx.tag.map=document.getElementsByTagName('map'); Nyx.tag.meta=document.getElementsByTagName('meta'); Nyx.tag.ol=document.getElementsByTagName('ol'); Nyx.tag.option=document.getElementsByTagName('option'); Nyx.tag.pre=document.getElementsByTagName('pre'); Nyx.tag.p=document.getElementsByTagName('p'); Nyx.tag.script=document.getElementsByTagName('script'); Nyx.tag.select=document.getElementsByTagName('select'); Nyx.tag.small=document.getElementsByTagName('small'); Nyx.tag.strike=document.getElementsByTagName('strike'); Nyx.tag.strong=document.getElementsByTagName('strong'); Nyx.tag.style=document.getElementsByTagName('style'); Nyx.tag.sub=document.getElementsByTagName('sub'); Nyx.tag.sup=document.getElementsByTagName('sup'); Nyx.tag.table=document.getElementsByTagName('table'); Nyx.tag.textarea=document.getElementsByTagName('textarea'); Nyx.tag.title=document.getElementsByTagName('title'); Nyx.tag.u=document.getElementsByTagName('u'); Nyx.tag.ul=document.getElementsByTagName('ul');