
if(!window.neocgs){window.neocgs={};}
neocgs.addEventListener=function(elm,event,callback){if(elm.addEventListener){elm.addEventListener(event,function(event){callback.call(neocgs);},false);}else if(elm.attachEvent){elm.attachEvent('on'+event,function(){callback.call(neocgs);});}}
neocgs.iframe_reportSize=function(){if(this.sizeReported||!this.iframeid||!this.rootUrl){return;}
this.sizeReported=true;try{var height=document.body.scrollHeight;var elm=document.createElement('iframe');elm.setAttribute("src",this.rootUrl+'crossdomain.html?frame='+this.iframeid+'&height='+height);elm.style.display="none";document.body.appendChild(elm);}catch(e){}}
neocgs.iframe_register=function(iframeid){this.iframeid=iframeid;this.addEventListener(window,'load',this.iframe_reportSize);}
neocgs.iframe_setRoot=function(url){this.rootUrl=url;}
neocgs.delayedFocus=function(id){this.addEventListener(window,'load',function(){setTimeout(function(){var elm=document.getElementById(id);if(elm)elm.focus();},100);});}