var _deBug=false; var UserAgentName=navigator.userAgent.toLowerCase(); var isIE=(navigator.appName.indexOf("Microsoft Internet Explorer")==0); var isIE7d=isIE; if(isIE7d){ isIE7d=UserAgentName.indexOf("msie ")+5; isIE7d=UserAgentName.substring(isIE7d,isIE7d+1); isIE7d=(isNaN(isIE7d))?false:parseFloat(isIE7d)<7; } var isFF=(UserAgentName.indexOf("firefox")!=-1); var isOP=(UserAgentName.indexOf("opera")!=-1); if(isIE)document.execCommand('BackgroundImageCache',false,true); var isWindowLoaded=false; var fnReadyFunc=new Array(); var _SiteURL=''; var _Now=''; function $(p){return (typeof p=='object')?p:(p?document.getElementById(p):null)} function $w(f){(!isWindowLoaded)?fnReadyFunc.push(f):f()} function $s(){$x(arguments,function(p){p.style.display=''})} function $h(){$x(arguments,function(p){p.style.display='none'})} function $z(p){p=$(p);return(p)?(p.style.display!='none'):0} function $a(){$x(arguments,function(p){$z(p)?$h(p):$s(p)})} function $x(a,f){if(a&&a.length){for(var i=0;i-1)} function $p(p,n){var t=0;if(!n)n=1;else t=(typeof n=='string');if(t)n=n.toLowerCase();if(!t){for(var i=0;i0)a.deleteRow(0); var tmp=document.createElement('div'); $h(tmp); document.body.appendChild(tmp); tmp.innerHTML=''+(h?h.innerHTML:htm)+'
'; var tt=$('temp_div_table_q'); for(var i=0;i-1;} function $sat(x,nm,val){x.setAttribute(nm,val);} function $atr(x,nm){return(x&&x.nodeType==1)?x.getAttribute(nm):null;} function $ism(x,tn,cs,an){if(!x||x.nodeType!=1)return 0;if(tn){if(x&&x.nodeName){var xzz=x.nodeName;if(!xzz.toLowerCase().match('^'+tn+'$'))return 0;}}if(cs&&an){if(an=='class'||an=='classname'){if(!$csi(x,cs))return 0;}else if($atr(x,an)!=cs)return 0;}return 1;} function $fnd(p,tn,cs,an){var f=[];an=(!an)?'class':an.toLowerCase();if(!p)p=document.childNodes;for(var i=0;i-1){cs=tn.substr(cc+1);tn=tn.substr(0,cc);}else{cc=tn.indexOf('[');if(cc>-1){cs=tn.substring(cc+1,tn.length-1);tn=tn.substr(0,cc);cc=cs.split('=');an=cc[0].toLowerCase();cs=cc[1];}}return $fnd(p,tn,cs,an);} function $$(a,f,p){var e=null;p=$(p);if(!a)return [];e=(p)?p.childNodes:document.body.childNodes;a=a.split(' ');for(var i=0;i3){ var mod=v.length%3; var retval=(mod>0?(v.substring(0,mod)):""); for (i=0;i=0){o=options[selectedIndex];v=o.value;if(!v&&!('value'in o))v=o.text}setVal(name,v)}else{var v='';for(var x=0;x'; html += ''; html += ''; html += ''; html += '<\/embed>'; html += '<\/object>'; document.write(html); } function swfvod(src,w,h){ html = ''; html += ''; html += ''; html += ''; html += ''; html += '<\/embed>'; html += '<\/object>'; document.write(html); } function MM_swapImgRestore(){ var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&ixID.apha){xID.apha=(!qp)?0:xID.apha+10;if(isIE)xID.style.filter='alpha(opacity='+(xID.apha)+')';else xID.style.opacity=xID.apha/100;}else if(isIE)xID.style.filter='';}if(rID)setStyleBox(rID,xID.style.top,xID.style.left,xID.offsetWidth+'px',xID.offsetHeight+'px');if(nowBoxSHOW)nowBoxSHOW=setTimeout(function(){_resizeBox(1);},30);}} function _hideBox(){if(nowBoxSession){nowBoxSession();nowBoxSession=null;}if(nowBoxSHOW){clearTimeout(nowBoxSHOW);nowBoxSHOW=0;var xID=$('stOverPop'),tID=$('stOverBack'),rID=null;$ih('stOverPopIn','');if(isIE7d){rID=$('R9TargetBox');rID.src='about:blank';setStyleBox(rID,'0px','0px','0px','0px');}$h(xID,tID);setTimeout(function(){_delEvent(document,'click',_dohideChideBox);},200);nowBoxButton=null;nowBoxBack=null;}} function setPageCenter(xID,bkID){var pd=getPageSize(),sd=getScrollXY(),aw=getMaxWidth(xID),ah=getMaxHeight(xID);if(bkID)setStyleBox(bkID,'0px','0px','100%',pd.ph+'px');xID.style.top=String(Math.round((pd.h/2)-(ah/2))+sd.y)+'px';xID.style.left=String(Math.round((pd.w/2)-(aw/2))+sd.x)+'px';} function setStyleBox(i,t,l,w,h){i=$(i).style;i.position='absolute';if(l)i.left=l;if(t)i.top=t;if(w)i.width=w;if(h)i.height=h;} function getMaxHeight(elm,mH){if(isIE) return elm.offsetHeight;if(!mH)mH=elm.offsetHeight;for(var i=0;idb.offsetHeight){x=db.scrollWidth;y=db.scrollHeight;}else{x=db.offsetWidth;y=db.offsetHeight;}if(dx.innerHeight){w=dx.innerWidth;h=dx.innerHeight;}else if(de&&de.clientHeight){w=de.clientWidth;h=de.clientHeight;}else if(document.body){w=db.clientWidth;h=db.clientHeight;}var pw=(x0;i--)if(_R9EListen[i]!=undefined)_delEventIndex(i);_R9EListen=[]} function _delEventIndex(i){if(isIE||isOP)_R9EListen[i][0].detachEvent("on"+_R9EListen[i][1],_R9EListen[i][2]);else _R9EListen[i][0].removeEventListener(_R9EListen[i][1],_R9EListen[i][2],true)} function _delEvent(doc,evname,func){var fei=_fndEvent(doc,evname,func);if(fei==null)return;_delEventIndex(fei);delete _R9EListen[fei];} function _addEvents(doc,evs,func){for(var i in evs)_addEvent(doc,evs[i],func);} function _delEvents(doc,evs,func){for(var i in evs)_delEvent(doc,evs[i],func);} function valAllCheckSelect(did) { var aEle=$(did); if(!aEle)return true; var aEle=aEle.elements,aCnt=0; if(!aEle||!aEle.length){ alert('¼±ÅÃÇÒ Ç׸ñÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.'); return false; } for(var i=0;i0){ if(aName != ''){ if(!confirm('[°æ°í (WARNING!!)]\n\nÁ¤¸» ¼±ÅÃÇϽŠÇ׸ñµéÀ» '+aName+'ÇϽðڽÀ´Ï±î ?\n\n¸¸¾à ¼±ÅÃµÈ Ç׸ñ¿¡ ´ëÇÑ '+aName+'ÀÛ¾÷À» °è¼Ó ÇÒ °æ¿ì º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.'))return false; } if(aMode&&aValue)aFrm.elements[aMode].value=aValue; return true; } alert('¸ÕÀú '+aName+'Ç׸ñÀ» ¼±ÅÃÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.'); return false; } function valISChecked(did,aName) { var aEle=$(did); if(!aEle)return false; var aEle=aEle.elements,aCnt=0; for (var i=0;i<=aEle.length-1;i++) { if (aEle[i]!=null) if (aEle[i].type=='checkbox'&&aEle[i].name.substr(0,1)=='c') if (aEle[i].checked)aCnt++; } if(aCnt <= 0){ alert(aName+'ÇÏ½Ç Ç׸ñÀ» ¼±ÅÃÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.'); return false; } return true; } function $vf(f){ if(!f||!f.title)return true; var err=(!f.nodeName)?f.title+'À»(¸¦) ¼±Åà ¶Ç´Â üũÇϼ¼¿ä.':f.title+'À»(¸¦) ÀÔ·ÂÇϼ¼¿ä.'; if(!f.nodeName&&typeof f=='object'){ for(var i=0;i-1)a=this.substr(s+a.length);else return '';var l=(!b)?a.length:a.indexOf(b);if(l<0)l=a.length;return(l>-1)?a.substring(l,0):'';} String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");} String.prototype.int=function(){var a=parseFloat(this.replace(/[^0-9\-\.]/g,''));return (isNaN(a))?x:a;} function setcookie(n,v,es,p){var t=new Date();if(!es)es=86400;if(!p)p='/';if(!v)v='';t.setTime(t.getTime()+(1000*es));document.cookie=n+'='+v+'; path='+p+'; expires='+t.toGMTString()+';';} function getcookie(n){var a=document.cookie;return a.cut(n+'=',';');} function docSetFFKFix(p){ if(!isFF)return 0; p=$(p); if(!p)return 0; p._t=0; p._v=''; _addEvent(p,'focus',function(){ if(p._t)clearInterval(p._t); p._t=setInterval(function(){ if(p._v!=p.value){ p._v=p.value; if(document.createEvent){ var e; if(window.KeyEvent){ e=document.createEvent('KeyEvents'); e.initKeyEvent('keyup',true,true,window,false,false,false,false,65,0); } else{ e=document.createEvent('UIEvents'); e.initUIEvent('keyup',true,true,window,1); e.keyCode=65; } p.dispatchEvent(e); } else{ var e=document.createEventObject(); e.keyCode=65; p.fireEvent('onkeyup',e); } } },50); }); _addEvent(p,'blur',function(){if(p._t)clearInterval(p._t);p._t=0;}); return 1; } function docSetSeujest(p,url) { if(!p.id)setID(p); p.playurl=url; p.bx=$n('div',{className:'Sujest','innerHTML':'
ÇØ´çÇÏ´Â °Ë»ö¾î¿¡ ´ëÇÑ Á¦¾ÈÀÌ ¾ø½À´Ï´Ù.

'}); p.fx=$n('iframe',{className:'SujestFrame','width':'0','height':'0','src':'about:blank','name':p.id+'Frame'}); p.ux=$n('div',{className:'SujestArrow'}); if(isFF)p.fx.style.opacity='0'; else p.fx.style.filter='alpha(opacity=0)'; $h(p.bx,p.fx); $i(p,p.bx,p.fx,p.ux); p.bf=$(p.id+'Sujest'); p.ot=$(p.id+'Button'); $p(p).className+=' SujestMain'; p.autocomplete='off'; p._cvl=''; p._ply=0; p._myd=[]; p._nsj=null; p._ops={ 'snuj':['±â´É',function(pp,v,f){pp._nsj=v;if(!f){if(!v)pp.onkeyup(1);else pp.setHiding();}}], 'snsl':['½ºÅ©·Ñ',function(pp,v,f){pp.bx.className=(!v)?'Sujest SujestScroll':'Sujest';if(!f)pp.setShowing();}] }; p.bf.setUlmove=function(e,ei){ var ex=[],dxd; var pov=-1; $t('p',p.bf,function(ql,r){ if(!$c(ql,'item'))return 0; ex.push(ql); if(ql.itsOver)pov=ex.length-1; ql.itsOver=0; ql.className=ql.className.replace(/offitem|onitem/i,''); return 1; }); if(ex.length){ if(!$z(p.bx))p.setShowing(); if(e==1||!e){ pov=(!e)?pov+1:pov-1; if(!ex[pov]){ if(pov<0){ p.value=p._cvl; p._v=p._cvl; p.setHiding(); return 0; } else pov=ex.length-1; } e=ex[pov]; if(p._myd[p._cvl]){ dxd=p._myd[p._cvl][2][pov]; dxd=dxd.split(','); p.value=dxd[1]; } else p.value=e.innerText; p._v=p.value; var d1=e.offsetTop; var d2=d1+e.offsetHeight; var dMn=$p(e).scrollTop; var dMx=dMn+$p(e).offsetHeight; if(d1dMx)$p(e).scrollTop=$p(e).scrollTop+e.offsetHeight; } e.itsOver=1; e.className+=' onitem'; } return 1; }; p.bf.setMyValue=function(e,i){ var sch; if(p._myd[p._cvl]){ sch=p._myd[p._cvl][2][i].split(','); sch=sch[1]; } if(!sch)sch=e.innerText; p.value=sch; p._v=sch; p.form.submit(); }; p.setHiding=function(){ $h(p.bx,p.fx); p.ux.className='SujestArrow SujestUP'; }; p.outOPS=function(){ var cdx=''; for(var dx in p._ops){ var dv=p[dx+'ck']?null:1; cdx+=''+p._ops[dx][0]+(dv?'²ô±â':'Äѱâ')+''; } p.ot.innerHTML=cdx; }; p.outLooping=function(c){ var lst=p._myd[c][2],sm2=[],q,o,lc,cs,cm,wd=0; cm={}; for(var i=0;i'+c+''+q.substring(c.length,q.length); else if(o=='r'){ lc=q.length-c.length; if(q.lastIndexOf(c)==lc)q=q.substring(0,lc)+''+c+''; } sm2[wd-1]+='

'+q+'

'; } return sm2.join('

'); } p.setShowing=function(){ var sm2=''; var c=String(p.value); //.trim(); p.outOPS(); if(p._nsj)sm2='°Ë»ö ÀÚµ¿¿Ï¼º ±â´ÉÀ» »ç¿ëÇÏÁö ¾Ê°í ÀÖ½À´Ï´Ù.'; else if(!c)sm2='°Ë»ö¾î¸¦ ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù.'; else if(!p._myd[c]||p._myd[c][1]<=0)sm2='ÇöÀç ãÀº °Ë»ö¾î°¡ ¾ø½À´Ï´Ù.'; if(sm2)p.bf.innerHTML='

'+sm2+'

'; else if(p._cvl!=c)p.bf.innerHTML='
'+p.outLooping(c)+'
'; p._cvl=c; p.ux.className='SujestArrow SujestDown'; $s(p.bx,p.fx); setStyleBox(p.bx,p.offsetTop+p.offsetHeight+'px',p.offsetLeft+'px',(p.offsetWidth-8)+'px'); setStyleBox(p.ux,p.offsetTop+'px',(p.offsetLeft+p.offsetWidth-25)+'px',p.offsetHeight+'px',p.offsetHeight+'px'); setStyleBox(p.fx,p.bx.style.top,p.bx.style.left,p.bx.offsetWidth+'px',p.bx.offsetHeight+'px'); }; if(isFF)docSetFFKFix(p); p.onkeyup=function(e){ if(p._nsj)return 0; var key; if(e!=1){ e=e||window.event; key=(e)?e.keyCode:65; var keyA={17:1,18:1,37:1,116:1}; if(keyA[key])return 0; } else key=1; if(key==27)p.setUxOnOff(); else if(key==38)p.bf.setUlmove(1); else if(key==40)p.bf.setUlmove(0); else{ var c=String(p.value); //.trim(); if(p._ply){ setTimeout(function(){p.onkeyup(1);},100); return 0; } p._ply=0; if(!c){p.setHiding();return 0;} p._cvl=''; if(p._myd[c]){if(p._myd[c][1]>0)p.setShowing();else p.setHiding();} else{ p._ply=1; $ajax(p.playurl,function(dt){ var d=dt.split('^'); var e=d[0].split(','); p._myd[c]={0:e[0],1:e[1],2:d[1].split('|')}; (e[1]>0)?p.setShowing():p.setHiding(); p._ply=0; },{query:c},2); } } return 1; }; p.setUxOnOff=function(){$z(p.bx)?p.setHiding():p.setShowing();}; p.bx.setOPS=function(t,v){ if(!p._ops[t])return 0; var f=(v==3); if(f)v=getcookie(t+'ck'); if(!f&&v==p[t+'ck'])return 0; setcookie(t+'ck',v); p[t+'ck']=v; if(p._ops[t][1])p._ops[t][1](p,v,f); }; p.ux.onclick=p.setUxOnOff; for(var dx in p._ops)p.bx.setOPS(dx,3); setStyleBox(p.ux,p.offsetTop+'px',(p.offsetLeft+p.offsetWidth-25)+'px',p.offsetHeight+'px',p.offsetHeight+'px'); } function slideMove(p,nx,px,py,spd){ p=$(p); if(!spd)spd=0.2; p.spd=spd; if(!p.nwno)p.nwno=0; if(!p.spdslide) { $p(p).style.position='relative'; $p(p).style.overflow='hidden'; p.x=0; p.y=0; p.nwno=0; p.mxno=0; if(px)p.mxno=Math.round($p(p).scrollWidth/px)-1; if(py)p.mxno=Math.round($p(p).scrollHeight/py)-1; p.px=px; p.py=py; p.spdslide=function(n){ p.setpos(n); p.playing=true; p.tid=setInterval(function(){p.setplay()},20); }; p.setplay=function(){ p.x+=(p.x2-p.x)*p.spd; p.y+=(p.y2-p.y)*p.spd; p.setp(p.x,p.y); if(Math.round(p.x)==p.x2&&Math.round(p.y)==p.y2){ p.x=Math.round(p.x); p.y=Math.round(p.y); p.setp(p.x,p.y); p.playing=false; clearInterval(p.tid); } }; p.setpos=function(n){p.x2=p.px*n;p.y2=p.py*n;}; p.setp=function(x,y){ // p.style.filter='alpha(opacity='+((Math.abs(p.x2-x)/200)*100)+')'; p.style.position='absolute'; p.style.left=x+'px';p.style.top=y+'px'; }; } p.nwno=p.nwno+nx; if(p.nwno>p.mxno)p.nwno=0; if(p.nwno<0)p.nwno=p.mxno; p.spdslide(p.nwno-(p.nwno*2)); } function clip(s){ var x=window.clipboardData; if(!x)return alert('Ŭ¸³º¸µå¸¦ Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÁ®ÀÔ´Ï´Ù.'); if(s){ x.setData('Text',s); alert('Ŭ¸³º¸µå¿¡ ÀúÀåÇÏ¿´½À´Ï´Ù. (Ctrl+V·Î ºÙ¿©³Ö±â Çϼ¼¿ä ^^)'); } else return x.getData('Text'); } // IE Begining Here !! function _windowStart() { var s=(!isIE)?'opacity:0;':'filter:alpha(opacity=0);'; var a='position:absolute;left:0px;top:0px;'; document.write('
'); document.write(''); document.write(''); try{ var a=document.images; for(var i=0;i=fig.length||!fig['i'+p.nimgchg])p.nimgchg=0; p.imgChange(p.nimgchg); p.nimgchg++; } },ival); } function addNewValue(p,addId,maxAdd) { p=$(p); if($p(p).childNodes.length>maxAdd){ alert('ÃÖ´ë '+maxAdd+' °³ ±îÁö¸¸ Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.'); return false; } else{ var e=$(addId).innerHTML.replace(/\[0\]/ig,'\['+$p(p).childNodes.length+'\]'); $i(p,$n('p',e)); } } function delNewValue(p) { p=$(p); if($p(p).childNodes.length>2) $p(p).removeChild($p(p).childNodes[1]); else alert('´õ ÀÌ»ó »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù.'); } function moveStart(p,tm,bm,spd,spd2,mv) { p=$(p); if(!p)return false; p.tm=(!tm)?118:tm; p.bm=(!bm)?118:bm; p.spd=(!spd)?10:spd; p.spd2=(!spd2)?2:spd2; p.mv=(!mv)?1:mv; p.mvspd=0; p.moving=function(){ try{ var db=document.body; p.spx=db.scrollTop; p.gtpos=p.spx; p.gbpos=p.spx; if(p.spx=p.offsetTop+p.offsetHeight){ if(p.style.pixelTopp.gtpos)p.style.pixelTop-=(p.style.pixelTop-p.gtpos)/p.spd; p.loop=setTimeout(function(){p.moving()},p.spd2); }catch(e){} } p.moving(); } var PageTotal = ''; var PageList = ''; function ceilS(num){ var tempVal = parseInt(num); var ReVal = (tempVal == num) ? num : tempVal + 1; return ReVal; } function docSetListAjax(p,q) { p=$(p); p.id=$b(p); if(!p)return; p.Qry=q; p.Qry.page=1; var di="$('"+p.id+"')."; p.pageAllList=function(q){ var d=[]; /* ¾Æ·¡ºÎÅÍ Page ¼ö·® ¸¸Å­ Ãâ·Â!! */ var page = (!q) ? 1 : q; var total_page = ceilS(PageTotal / PageList); var first_page = page; var last_page = ((page + 9) >= total_page) ? total_page : page + 9; last_page = (last_page <= 1) ? 0 : last_page ; if(first_page >= 10) d.push('[ÀÌÀü]'); for(var i=first_page;i<=last_page;i++)d.push(''+(i)+''); if(last_page >= 1 && last_page != total_page) d.push('[´ÙÀ½]'); $ih('pageAllList',d.join(' ¡¤ ')); }; p.pageAllChange=function(pp,np){ $$('span.pageno',function(x){ x.style.fontWeight='normal'; x.style.color='#000000'; },'pageAllList'); pp.style.fontWeight='bold'; pp.style.color='#ff2200'; p.Qry.page=np; p.loadAjax(null,'paging'); }; p.loadAjax=function(f,mode,fnc,sf){ var d=null; if(f&&mode=='search'){ p.Qry.page=1; p.Qry.search=encodeURIComponent($fData(f,'&',function(n,v){return n+'='+v})); } else if(f&&mode=='sort'){ p.Qry.page=1; p.Qry.sort=$atr(f,'name'); p.Qry.sortkey=(f.desc?'desc':'asc'); $$('th',function(r){$g((r==f?'on on'+p.Qry.sortkey:'off'),r)},p); } if(mode=='sort'||mode=='search'){ if($('pageAllList')){ $$('span.pageno',function(x){ if(x.innerHTML==1){ x.style.fontWeight='bold'; x.style.color='#ff2200'; } else{ x.style.fontWeight='normal'; x.style.color='#000000'; } },'pageAllList'); } } var er=[]; var url=p.Qry.url+'?'; if(mode)er.push('mode='+p.Qry.mode+'_'+mode); if(p.Qry.page)er.push('page='+p.Qry.page); if(p.Qry.sort)er.push('sort='+p.Qry.sort); if(p.Qry.sortkey)er.push('sortkey='+p.Qry.sortkey); if(p.Qry.search)er.push('search='+p.Qry.search); if(p.Qry.Q)er.push(p.Qry.Q); url+=er.join('&'); $s('loadingBox'); $ajax(url,function(dat){ $ih('sunHere',dat); if(fnc)fnc(); $h('loadingBox'); },sf); /*var check = $ajax(url,function(dat){ $ih('sunHere',dat); if(fnc)fnc(); $h('loadingBox'); },sf); alert(check);*/ return false; }; $$('th',function(w){ if($atr(w,'name')){ w.style.cursor='pointer'; w.onclick=function(){ if(this.asc){ this.asc=0; this.desc=1; }else{ this.asc=1; this.desc=0; } p.loadAjax(this,'sort'); }; } },'sunWay'); if($('pageAllList'))p.pageAllList(1); if($('sunForm')){ $('sunForm').onsubmit=function(){ p.loadAjax(this,'chkmod',function(){alert('¼öÁ¤ÇÏ¿´½À´Ï´Ù.');},'sunForm'); return false; }; } } function autoSelall(p,da){ var i=0,e=''; p.dOvr=[]; if(!p.doOvrColor){ p.doOvrColor=function(r){ p.dOvr[r].style.backgroundColor='#ff6600'; p.dOvr[r].style.color='#ffffff'; setTimeout(function(){ p.dOvr[r].style.backgroundColor='#ffffff'; p.dOvr[r].style.color='#000000'; },1000); }; } while(1){ var d=$(da+i); if(!d||!d.nodeName)break; e=d.nodeName.toLowerCase(); if(e=='select'){ p.dOvr.push(d); p.doOvrColor(p.dOvr.length-1); for(var c=0;c0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i