
var MyGadget=function(){};MyGadget.addigoogle=function(s,n)
{if(n){this.sendAttention(n);}
window.open('http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=gtx.helizet.com/'+s);}
MyGadget.openPreview=function(s)
{window.open('http://www.gmodules.com/ig/creator?nocache=1&url=http://gtx.helizet.com/'+s);}
MyGadget.submitGadget=function(s)
{if(!confirm('선택하신 가젯등록을 제출 하시겠습니까?')){return;}
window.open('http://www.google.com/ig/submit?parsed_xml=pass&hl=ko&url=http://gtx.helizet.com/'+s);}
MyGadget.publish=function(nIdx,nVal)
{var func=function(res){alert('done!.');};Parameter.clear();Parameter.push('idx',nIdx);Parameter.push('val',nVal);_NS_FetchUrl('/wizard/asyncs/admin',Parameter.toString(),func);}
MyGadget.sendAttention=function(n)
{var func=function(res){};Parameter.clear();Parameter.push('idx',n);_NS_FetchUrl('/wizard/asyncs/attention',Parameter.toString(),func);}
MyGadget.openSource=function(s)
{window.open('http://gtx.helizet.com/'+s);}
MyGadget._makeDeleteRequest=function(s)
{var func=function(res){if(res.responseText.indexOf('TRUE;')<-1)
{alert(_trim(res.responseText));}
else{alert('삭제요청 되었습니다.');location.reload();}};Parameter.clear();Parameter.push('idx',s);_NS_FetchUrl('/wizard/asyncs/request_deletion',Parameter.toString(),func);}
MyGadget.checkAll=function(s)
{var aChecks=document.getElementsByName(s);for(var i=0,iMax=aChecks.length;i<iMax;i++){aChecks[i].checked=true;}}
MyGadget.requestDeletionAll=function(s)
{var aChecks=document.getElementsByName(s);var sCheckedIdxs='';for(var i=0,iMax=aChecks.length;i<iMax;i++){if(aChecks[i].checked){sCheckedIdxs+=(sCheckedIdxs?',':'')+aChecks[i].value;}}
if(!sCheckedIdxs){alert('삭제하실 가젯을 선택해 주세요.');return;}
if(!confirm('선택하신 가젯등록을 삭제요청 하시겠습니까?')){return;}
this._makeDeleteRequest(sCheckedIdxs);}
MyGadget.requestDeletion=function(n)
{if(!n){return;}
if(!confirm('선택하신 가젯등록을 삭제요청 하시겠습니까?')){return;}
this._makeDeleteRequest(n);}
MyGadget.deleteGadget=function(n)
{if(!n){return;}
if(!confirm('선택하신 가젯등록을 삭제 하시겠습니까?')){return;}
var func=function(res){if(res.responseText.indexOf('TRUE;')<-1)
{alert(_trim(res.responseText));}
else{alert('삭제 되었습니다.');location.reload();}};Parameter.clear();Parameter.push('idx',n);_NS_FetchUrl('/wizard/asyncs/delete',Parameter.toString(),func);}