function getid(d){return document.getElementById(d)} function gettag(o,t){return o.getElementsByTagName(t)} function _lowercase(o){return o.toString().toLowerCase()} function _middle(o,l,r){return (o.split(l)[1])?o.split(l)[1].split(r)[0]:''} function _leftback(o,n){return o.substr(0,n)} function _rightback(o,n){return o.substr(o.length-n,n)} function dw(c){document.write(c)} function jumpto(n){return location.href=location.href.split('#')[0]+n} var spacer=''; var _timezones=28800000; var lastmodified='1268389720'; var mgrlink=false; var uris=_lowercase(document.URL); var baseURI=new Array(); baseURI['home']='http://amigo.nicetypo.com/'; baseURI['content']=baseURI['home']+'contentbypermalink'; baseURI['css']=baseURI['home']+'css'; baseURI['js']=baseURI['home']+'js'; baseURI['media']=baseURI['home']+'media'; function qsp(p){return _middle(uris+'&','&'+p+'=','&')} function loadjs(s){ upd=(s.split('comment').length>1)?new Date().getTime():lastmodified; upd='&upd='+upd dw('<'+'script src="'+s+upd+'"><'+'/script>')} function addToFavorite(){ if((navigator.appVersion.indexOf("MSIE")>0) && (parseInt(navigator.appVersion)>=4)){ window.external.AddFavorite(baseURI['home'],this.document.title)}} function asmt(n,d){location.href='mailto:'+n+'@'+d} var dbwr=_lowercase(navigator.appName); var isie=(dbwr=='microsoft internet explorer'); var isff=(dbwr=='netscape'); var isother=(!isie && !isff); ishome=(typeof ishome=='undefined')?false:ishome var isview=(uris.split('openview').length>1||ishome); var isdoc=(uris.split('contentbypermalink').length>1); var issrch=(uris.split('searchview').length>1); var ispreview=(uris.split('preview').length>1); viewtitle=uris.split('/')[uris.split('/').length-1].split('.php')[0]+'.php' _start=(qsp('start')=='')?1:qsp('start'); _count=(qsp('count')=='')?10:qsp('count'); _catid=qsp('catid'); _category=(_catid=='')? '':'&catid='+_catid; function status(s,e){s=s.replace(/-/ig,'/');e=e.replace(/-/ig,'/'); var dt=new Date().getTime(); var sd=new Date(s).getTime(); var ed=new Date(e).getTime(); pub=(sd < dt && ed > dt) return pub} var _permalink='';var _images=[];var _attachments=[];var _created='';var _modified='';var _pubdate='';var _subject='';var _iscomment='n'; var today=new Date(); var thisyear=(today.getYear() < 1900)? 1900+today.getYear():today.getYear(); var thismon=_rightback('00'+(today.getMonth()+1),2) var calendar_mon=["January","February","March","April","May","June","July","August","September","October","November","December"] mon_jan='01';mon_feb='02' ;mon_mar='03';mon_apr='04'; mon_may='05';mon_jun='06';mon_jul='07';mon_aug='08'; mon_sep='09';mon_oct='10';mon_nov='11';mon_dec='12'; var profilestr=new Array(); profilestr['mgrlink']='管理員登入'; profilestr['docempty']='很抱歉!目前沒有相符的文件,請您稍後再來觀看…謝謝。 '; profilestr['navprev']=''; profilestr['navnext']=''; profilestr['commenttitle']='讀者留言'; profilestr['postcommenttitle']='

張貼您的留言'; profilestr['postcommentname']='›› 你的姓名'; profilestr['postcommentemail']='›› email address'; profilestr['postcommenturl']='›› website or blog'; profilestr['postcommentbody']='›› your comment'; profilestr['postcommentbodyalert']='請勿使用 HTML 語法, 字數最多 500'; profilestr['postcommentbtn']='張貼留言'; profilestr['queryempty']='很抱歉 !您並沒有填入任何的搜尋關鍵字,請重新嘗試一次 !謝謝 !'; profilestr['myphoto']='My foto'; profilestr['myattachment']='My files'; profilestr['fullstory']=' ... ‹詳細內容›'; profilestr['soldout']='::本商品已售出,目前缺貨中::'; profilestr['keepshopping']=''; function timemode(t,m,h){ t=t.toString().replace(/-/ig,'/') tz =(m=='gmt')? 0:_timezones ndt=new Date(new Date(t).getTime()+tz).toGMTString().toString(); i=ndt.split(' ') _wk=_lowercase(i[0]); _m=_lowercase(i[2]) var wk=_wk.substring(0,1).toUpperCase()+_wk.substring(1,3); var dy=_rightback('00'+i[1],2); var mn=_m.substring(0,1).toUpperCase()+_m.substring(1,3); var yr=i[3] var _t=i[4].split(':'); var hrs=(_t[0]>12 && m=='num')? _t[0]-12:_t[0]; var ap=(_t[0]>11)? ' PM':' AM' m_num=yr+'/'+eval("mon_"+_m)+'/'+dy ;m_str=wk+', '+dy+' '+mn+' '+yr;m_gmt=wk+', '+dy+' '+mn+' '+yr v=eval('m_'+m)+' '+_rightback('00'+hrs,2)+':'+_t[1] v+=(m=='num')? ap:'' v+=(m=='gmt')? ':'+_t[2]+' GMT':'' if(h==''||typeof h=='undefined'){dw(v)}else{return v}} function viewisempty(){ if(_totalrec==0) getid('contenttable').innerHTML='

'+profilestr['docempty']+'
'} _prev=eval(_start)-eval(_count);_next=eval(_start)+eval(_count); prevUrl=_prev+'&count='+_count+_category;nextUrl=_next+'&count='+_count+_category; prevlink='' nextlink='' function navlink(){ if(isview){ p=(_prev<1)?'':prevlink; n=(_next>_totalrec)?'':nextlink; j2p='' pages=(_totalrec%_count)?(Math.floor(_totalrec/_count)+1):_totalrec/_count; key=10; if(pages>1){ j2p='' } dw(p+j2p+n)} } function shatts(t,d,a){ if(a[0]!==''){ attns=a.sort();_pfiles='';_afiles=''; tub=(attns.join(',').split('thumb.jpg').length>1); _pCount=0;_aCount=0; for(i=0;i < attns.length;i++){ ext=_rightback(attns[i],4); if(ext=='.jpg'||ext=='.gif'||ext=='.png'||ext=='jpeg'){ if(attns[i]!=='thumb.gif'){ _pfiles+='
'; _pCount++ } } else{ _afiles+=' '+decodeURIComponent(attns[i])+'
'; _aCount++ } } _pfiles=(_pCount>0)?'
'+profilestr['myphoto']+'
':'>')+_pfiles+'
':''; _afiles=(_aCount>0)?'
'+profilestr['myattachment']+'
'+_afiles+'
':''; if((tub && isview) || (tub && issrch)){ dw( '
'+ ((_aCount>0)?'
'+_afiles+'
':'') ); } else{ dw('
'+_pfiles+_afiles+'
') } } } function chkSearch(f,srchcounts){var regExp1=/\bfield\b/i;var regExp2=/[(,),<,>,\[,\]]/;var s=f.value; if(trim(s)==''){alert(profilestr['queryempty']);f.focus();return false}else{ if(typeof regExp1.source!='undefined') if(regExp1.test(s)||regExp2.test(s)){ alert('Sorry!\nKeyword can\'t include [, ], (, ), < ? >');f.focus();return false} location.href=baseURI['home']+'contentsearch.php?searchview&what='+getid('srchWhat').value+'&query='+encodeURIComponent(s)+'&start=1&count='+srchcounts}} function trim(s){return s.replace(/^\s{1,}/,"").replace(/\s{1,}$/,"")} function mgrlogin(){if(mgrlink){ dw(''+profilestr['mgrlink']+'')}} function shPrice(p,s,n,o){ if(o=='view'){ _ptag=(s==''||s=='0')?currency(p):currency(s);} else{ _ptag=(s==''||s=='0')?'NTD '+currency(p):'NTD '+currency(p)+' NTD '+currency(s); _ptag+=(n==''||n=='0')?'':' ‹第二件優惠價:NTD '+currency(n)+'›' } dw(_ptag) } // addon for Shopping Bag function currency(n){n=''+n; if(n.length>3){var mod=n.length%3; var output=(mod>0?(n.substring(0,mod)):''); for(crcy=0;crcy< Math.floor(n.length/3);crcy++){ if((mod==0)&&(crcy==0)) output+=n.substring(mod+3*crcy,mod+3*crcy+3); else output+=','+n.substring(mod+3*crcy,mod+3*crcy+3)} return (output)} else return n} function setClass(v){return (v%2)? 'even':'odd'} function updShoppingBag(){ if(getid('bagitem_num')&&getid('shoppingbag')){ var BagCur=getBagCooky('ntbag'); if(BagCur!==''){BagCur=BagCur.split(',');} getid('bagitem_num').innerHTML=BagCur.length getid('shoppingbag').className=(BagCur.length>0)?'full':'empty';} } function setTags(ary){ var tagsVal=ary.split(','); var tagsCode=new Array(); for(t=0;t'+tagsVal[t]+''); } dw('
'+tagsCode.join(',')+'
') } function setbmktag(u,s){ u=encodeURIComponent(u);s=encodeURIComponent(s);b=encodeURIComponent(baseURI['home']); _t='將本商品新增書籤到 '; _title='' _google=''; _yahoo=''; _udn=''; _delicious=''; _hemidemi=''; _myshare=''; _funp=''; _furl=''; dw('
'+_title+_google+_yahoo+_udn+_delicious+_hemidemi+_myshare+_funp+'
') } function setWM(f,w,h){ if(getid('fullsizeArea')){ f=baseURI['home']+f; getid('fullsizeArea').innerHTML+='
' } } var _onload=window.onload||function(){}; function setOnload(){ updShoppingBag(); if(getid('shoppingBagList')&&document.body.className=='shoppingbag'){ShoppingbagList();} } window.onload=function(){setOnload();_onload();}