
typeof defaultRegistry!='undefined'?defaultRegistry.addEntry({fileName:'jquery.cdb.popup.js',url:'/ccf/plugins/js/jquery.cdb.popup.js',plugins:[{"name":"popup","alias":"popup"}]}):true;jQuery.fn.popup=function(options){var defaults={url:'#',name:'',event:'click',onload:false,checkurl:true,focus:true,preventDefault:true,extraParams:[],formData:[],features:{height:600,width:600,toolbar:0,scrollbars:0,status:0,resizable:1,left:0,top:0,location:0,menubar:0,center:0}};features=jQuery.extend(defaults.features,options.features);var opts=jQuery.extend(defaults,options);opts.features=features;if(opts.features.center==1){opts.features.left=(screen.width/2)-(opts.features.width/2);opts.features.top=(screen.height/2)-(opts.features.height/2);}return this.each(function(){var _this=this;jQuery(this).bind(opts.event,function(evt){var win;var urlToOpen=opts.url+getAllParams();parameters="location="+opts.features.location+",menubar="+opts.features.menubar+",height="+opts.features.height+",width="+opts.features.width+",toolbar="+opts.features.toolbar+",scrollbars="+opts.features.scrollbars+",status="+opts.features.status+",resizable="+opts.features.resizable+",left="+opts.features.left+",screenX="+opts.features.left+",top="+opts.features.top+",screenY="+opts.features.top;!opts.checkurl||checkUrl(urlToOpen)?win=window.open(urlToOpen,opts.name,parameters):win=undefined;opts.focus&&win?win.focus():true;opts.preventDefault?evt.preventDefault():true;});if(defaultRegistry.timesDomChanged==0){opts.onload?defaultRegistry.addPostReadyProcess(function(){$(_this).trigger(opts.event);}):true;}});function getAllParams(){var allParams='';var allParamsArr=$.merge(getFormData(),opts.extraParams);if(allParamsArr.length>0){allParams=opts.url.indexOf('?')!=-1?'&'+$.param(allParamsArr):'?'+$.param(allParamsArr);}return allParams;}function getFormData(){!(opts.formData instanceof Array)?opts.formData=[opts.formData]:true;var parameterArray=[];var formParams='';for(var i=0;i<opts.formData.length;i++){if(opts.formData[i]instanceof Array){var tmpArr=$(opts.formData[i][0]).serializeArray();if(opts.formData[i][1]){tmpArr[0].name=opts.formData[i][1];}if(opts.formData[i][2]&&!tmpArr[0].value){tmpArr[0].value=!tmpArr[0].value?opts.formData[i][2]:true;}parameterArray=$.merge(parameterArray,tmpArr);}else{parameterArray=$.merge(parameterArray,$(opts.formData[i]).serializeArray());}}return parameterArray;}function checkUrl(url){var fullQDom=url.match(/^http[s]?:\/\/[^\/]*/);if(!fullQDom)return true;var theDomain=fullQDom[0].split("://")[1];if(theDomain.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)){return theDomain==document.domain?true:false;}else{return theDomain.split(".").slice(-2).join(".")==document.domain.split(".").slice(-2).join(".")?true:false;}}};var initPopup={};initPopup.postboxReminder={height:330,width:335,toolbar:0,scrollbars:0,status:0,resizable:0,left:50,top:50,location:0,menubar:0};initPopup.logoffReminder={height:390,width:490,toolbar:0,scrollbars:0,status:0,resizable:0,left:50,top:50,location:0,menubar:0};initPopup.help={height:471,width:580,toolbar:0,scrollbars:0,status:0,resizable:0,left:(screen.width/2)-235,top:(screen.height/2)-290,location:0,menubar:0};initPopup.tan={height:350,width:590,toolbar:0,scrollbars:1,status:0,resizable:0,left:50,top:50,location:0,menubar:0};
