function default_load(){}
function toggleDisplay(objname){obj=document.getAll(objname);if(obj.style.display=="none"){obj.style.display="";}else{obj.style.display="none";}}
function show1Hide2(objname1,objname2){obj1=document.getElementById(objname1);obj2=document.getElementById(objname2);obj1.style.display="";obj2.style.display="none";}
function expandCollapse(obj,target_name){if(obj!=null){currentSrc=obj.src;newSrc=currentSrc.replace(/\/plus/i,"/min");if(newSrc==currentSrc){newSrc=currentSrc.replace(/\/min/i,"/plus");}
obj.src=newSrc;}
toggleDisplay(target_name);}
function initChecklist(){if(document.all&&document.getElementById){var lists=document.getElementsByTagName("ul");for(i=0;i<lists.length;i++){var theList=lists[i];if(theList.className.indexOf("checklist")>-1){var labels=theList.getElementsByTagName("label");for(var j=0;j<labels.length;j++){var theLabel=labels[j];theLabel.onmouseover=function(){this.className+=" hover";};theLabel.onmouseout=function(){this.className=this.className.replace(" hover","");};}}}}}
function setFieldValue(field,newValue){var r;var checked=0;if((field.type=="text")||(field.type=="textarea")||(field.type=="hidden")){field.value=newValue;}
if((field.type=="select-one")||(field.type=="select")||(field.type=="select-multiple")){for(a=0;a<field.length;a++){if(field.options[a].text==newValue){field.options[a].selected=true;}}}
if(typeof field.type=="undefined"){for(r=0;r<field.length;r++){if((field[r].checked)){field[r].value=newValue;field(r).selected=true;}}
return"";}}
function submitDelete(thisform,form_type){if(form_type==null){form_type="entry";}
if(thisform){var msg="Are you sure you want to delete this "+form_type+"?";if(confirm(msg)){thisform.submit();}}}
function submitForm(){updateRTEs();return true;}
function openrptwindow(){window.open("","reportWindow","width=600,height=600,toolbar=no,location=no,resizable=yes");}
function showReport(){reportFrame=document.getElementById('reportIframe');reportFrame.style.display='';optionsToggle=document.getElementById('bookOptionsToggle');toggleBookOptions(optionsToggle,'sectionOptions');}
function toggleBookOptions(obj,idname){section=document.getElementById(idname);formguide=document.getElementById('form_guide');if(section.style.display=='none'){obj.innerText='hide';section.style.display='';formguide.style.display='';}else{obj.innerText='show';section.style.display='none';formguide.style.display='none';}}
function submitenter(myfield,e){var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13){myfield.form.submit();return false;}else
return true;}
function showRelatedFields(index){if(index==null){return false;}
switch(index){case 1:document.all('sectionEmail').style.display='';document.all('sectionUsername').style.display='none';break;case 2:document.all('sectionEmail').style.display='none';document.all('sectionUsername').style.display='';break;default:document.all('sectionEmail').style.display='none';document.all('sectionUsername').style.display='none';break;}}
var anylinkcssmenu={menusmap:{},effects:{delayhide:200,shadow:{enabled:true,opacity:0.3,depth:[5,5]},fade:{enabled:true,duration:500}},dimensions:{},getoffset:function(what,offsettype){return(what.offsetParent)?what[offsettype]+this.getoffset(what.offsetParent,offsettype):what[offsettype]},getoffsetof:function(el){el._offsets={left:this.getoffset(el,"offsetLeft"),top:this.getoffset(el,"offsetTop"),h:el.offsetHeight}},getdimensions:function(menu){this.dimensions={anchorw:menu.anchorobj.offsetWidth,anchorh:menu.anchorobj.offsetHeight,docwidth:(window.innerWidth||this.standardbody.clientWidth)-20,docheight:(window.innerHeight||this.standardbody.clientHeight)-15,docscrollx:window.pageXOffset||this.standardbody.scrollLeft,docscrolly:window.pageYOffset||this.standardbody.scrollTop}
if(!this.dimensions.dropmenuw){this.dimensions.dropmenuw=menu.dropmenu.offsetWidth
this.dimensions.dropmenuh=menu.dropmenu.offsetHeight}},isContained:function(m,e){var e=window.event||e
var c=e.relatedTarget||((e.type=="mouseover")?e.fromElement:e.toElement)
while(c&&c!=m)try{c=c.parentNode}catch(e){c=m}
if(c==m)
return true
else
return false},setopacity:function(el,value){el.style.opacity=value
if(typeof el.style.opacity!="string"){el.style.MozOpacity=value
if(el.filters){el.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+value*100+")"}}},showmenu:function(menuid){var menu=anylinkcssmenu.menusmap[menuid]
clearTimeout(menu.hidetimer)
this.getoffsetof(menu.anchorobj)
this.getdimensions(menu)
var posx=menu.anchorobj._offsets.left+(menu.orientation=="lr"?this.dimensions.anchorw:0)
var posy=menu.anchorobj._offsets.top+this.dimensions.anchorh-(menu.orientation=="lr"?this.dimensions.anchorh:0)
if(posx+this.dimensions.dropmenuw+this.effects.shadow.depth[0]>this.dimensions.docscrollx+this.dimensions.docwidth){posx=posx-this.dimensions.dropmenuw+(menu.orientation=="lr"?-this.dimensions.anchorw:this.dimensions.anchorw)}
if(posy+this.dimensions.dropmenuh>this.dimensions.docscrolly+this.dimensions.docheight){posy=Math.max(posy-this.dimensions.dropmenuh-(menu.orientation=="lr"?-this.dimensions.anchorh:this.dimensions.anchorh),this.dimensions.docscrolly)}
if(this.effects.fade.enabled){this.setopacity(menu.dropmenu,0)
if(this.effects.shadow.enabled)
this.setopacity(menu.shadow,0)}
menu.dropmenu.setcss({left:posx+'px',top:posy+'px',visibility:'visible'})
if(this.effects.shadow.enabled)
menu.shadow.setcss({left:posx+anylinkcssmenu.effects.shadow.depth[0]+'px',top:posy+anylinkcssmenu.effects.shadow.depth[1]+'px',visibility:'visible'})
if(this.effects.fade.enabled){clearInterval(menu.animatetimer)
menu.curanimatedegree=0
menu.starttime=new Date().getTime()
menu.animatetimer=setInterval(function(){anylinkcssmenu.revealmenu(menuid)},20)}},revealmenu:function(menuid){var menu=anylinkcssmenu.menusmap[menuid]
var elapsed=new Date().getTime()-menu.starttime
if(elapsed<this.effects.fade.duration){this.setopacity(menu.dropmenu,menu.curanimatedegree)
if(this.effects.shadow.enabled)
this.setopacity(menu.shadow,menu.curanimatedegree*this.effects.shadow.opacity)}
else{clearInterval(menu.animatetimer)
this.setopacity(menu.dropmenu,1)
menu.dropmenu.style.filter=""}
menu.curanimatedegree=(1-Math.cos((elapsed/this.effects.fade.duration)*Math.PI))/2},setcss:function(param){for(prop in param){this.style[prop]=param[prop]}},hidemenu:function(menuid){var menu=anylinkcssmenu.menusmap[menuid]
clearInterval(menu.animatetimer)
menu.dropmenu.setcss({visibility:'hidden',left:0,top:0})
menu.shadow.setcss({visibility:'hidden',left:0,top:0})},getElementsByClass:function(targetclass){if(document.querySelectorAll)
return document.querySelectorAll("."+targetclass)
else{var classnameRE=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)","i")
var pieces=[]
var alltags=document.all?document.all:document.getElementsByTagName("*")
for(var i=0;i<alltags.length;i++){if(typeof alltags[i].className=="string"&&alltags[i].className.search(classnameRE)!=-1)
pieces[pieces.length]=alltags[i]}
return pieces}},addEvent:function(targetarr,functionref,tasktype){if(targetarr.length>0){var target=targetarr.shift()
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent('on'+tasktype,function(){return functionref.call(target,window.event)})
this.addEvent(targetarr,functionref,tasktype)}},setupmenu:function(targetclass,anchorobj,pos){this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body
var relattr=anchorobj.getAttribute("rel")
var dropmenuid=relattr.replace(/\[(\w+)\]/,'')
var menu=this.menusmap[targetclass+pos]={id:targetclass+pos,anchorobj:anchorobj,dropmenu:document.getElementById(dropmenuid),revealtype:(relattr.length!=dropmenuid.length&&RegExp.$1=="click")?"click":"mouseover",orientation:anchorobj.getAttribute("rev")=="lr"?"lr":"ud",shadow:document.createElement("div")}
menu.anchorobj._internalID=targetclass+pos
menu.anchorobj._isanchor=true
menu.dropmenu._internalID=targetclass+pos
menu.shadow._internalID=targetclass+pos
menu.shadow.className="anylinkshadow"
document.body.appendChild(menu.dropmenu)
document.body.appendChild(menu.shadow)
menu.dropmenu.setcss=this.setcss
menu.shadow.setcss=this.setcss
menu.shadow.setcss({width:menu.dropmenu.offsetWidth+"px",height:menu.dropmenu.offsetHeight+"px"})
this.setopacity(menu.shadow,this.effects.shadow.opacity)
this.addEvent([menu.anchorobj,menu.dropmenu,menu.shadow],function(e){var menu=anylinkcssmenu.menusmap[this._internalID]
if(this._isanchor&&menu.revealtype=="mouseover"&&!anylinkcssmenu.isContained(this,e)){anylinkcssmenu.showmenu(menu.id)}
else if(typeof this._isanchor=="undefined"){clearTimeout(menu.hidetimer)}},"mouseover")
this.addEvent([menu.anchorobj,menu.dropmenu,menu.shadow],function(e){if(!anylinkcssmenu.isContained(this,e)){var menu=anylinkcssmenu.menusmap[this._internalID]
menu.hidetimer=setTimeout(function(){anylinkcssmenu.hidemenu(menu.id)},anylinkcssmenu.effects.delayhide)}},"mouseout")
this.addEvent([menu.anchorobj,menu.dropmenu],function(e){var menu=anylinkcssmenu.menusmap[this._internalID]
if(this._isanchor&&menu.revealtype=="click"){if(menu.dropmenu.style.visibility=="visible")
anylinkcssmenu.hidemenu(menu.id)
else
anylinkcssmenu.showmenu(menu.id)
if(e.preventDefault)
e.preventDefault()
return false}
else
menu.hidetimer=setTimeout(function(){anylinkcssmenu.hidemenu(menu.id)},anylinkcssmenu.effects.delayhide)},"click")},init:function(targetclass){var anchors=this.getElementsByClass(targetclass)
for(var i=0;i<anchors.length;i++){this.setupmenu(targetclass,anchors[i],i)}}};(function($){$.fn.jqm=function(o){var p={overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:F,ajaxText:'',target:F,modal:F,toTop:F,onShow:F,onHide:F,onLoad:F};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};if(p.trigger)$(this).jqmAddTrigger(p.trigger);});};$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])L('bind');A.push(s);}
else if(c.overlay>0)h.w.jqmAddClose(o);else o=F;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return F;},close:function(s){var h=H[s];if(!h.a)return F;h.a=F;if(A[0]){A.pop();if(!A[0])L('unbind');}
if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();}return F;},params:{}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),F=false,i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h);},f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r;},hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function(){if(!this[c]){this[c]=[];$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};})(jQuery);;
/*
 * jQuery blockUI plugin
 * Version 2.26 (09-SEP-2009)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.26;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});var themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3;if(opts.theme&&full){var s='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';lyr3=$(s);}
else{lyr3=full?$('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>'):$('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');}
if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}
else
lyr3.css(css);}
if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full?'body':el);if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}
var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){if(opts.theme)
lyr3.find('.ui-widget-content').append(msg);else
lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn);if(msg)
lyr3.fadeIn(opts.fadeIn);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)
els=$('body').children().filter('.blockUI').add('body > .blockUI');else
els=$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(data.el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);;$(document).ready(function(){anylinkcssmenu.init("anchorclass");$('#dialog').jqm({ajax:'copyright.php'});$.blockUI.defaults={pageMessage:'<h3>Please wait...</h3>',pageMessageCSS:{width:'250px',padding:'0.5em',margin:'-50px 0 0 -125px',top:'50%',left:'50%',textAlign:'center',color:'#000',backgroundColor:'#fff',border:'3px solid #aaa'},overlayCSS:{backgroundColor:'#666',opacity:'0.5'}};$(".submitButton").click(function(){$.blockUI();$("#submitType").val("ajax");});$('#<?php echo $page->getFormID() ?>').submit(function(){var submitOptions={beforeSubmit:showProcessing(),success:hideProcessing(),cache:false};$(this).ajaxSubmit(submitOptions);return false;});var myClose=function(hash){hash.w.fadeOut('3000',function(){hash.o.remove();});};var openInIframe=function(hash){var newWidth=0,newHeight=0,newLeft=0,newTop=0;var $trigger=$(hash.t);var $modal=$(hash.w);var myUrl=$trigger.attr('href');var myTitle=$trigger.attr('title');var $modalContent=$("iframe",$modal);$modalContent.html('').attr('src',myUrl);$('#jqmTitleText').text(myTitle);myUrl=(myUrl.lastIndexOf("#")>-1)?myUrl.slice(0,myUrl.lastIndexOf("#")):myUrl;var queryString=(myUrl.indexOf("?")>-1)?myUrl.substr(myUrl.indexOf("?")+1):null;if(queryString!=null&&typeof queryString!='undefined'){var queryVarsArray=queryString.split("&");for(var i=0;i<queryVarsArray.length;i++){if(unescape(queryVarsArray[i].split("=")[0])=='width'){var newWidth=queryVarsArray[i].split("=")[1];}
if(escape(unescape(queryVarsArray[i].split("=")[0]))=='height'){var newHeight=queryVarsArray[i].split("=")[1];}}
if(newHeight!=0){if(newHeight.indexOf('%')>-1){newHeight=Math.floor(parseInt($(window).height())*(parseInt(newHeight)/100));}
var newTop=Math.floor(parseInt($(window).height()-newHeight)/2);}
else{newHeight=$modal.height();}
if(newWidth!=0){if(newWidth.indexOf('%')>-1){newWidth=Math.floor(parseInt($(window).width()/100)*parseInt(newWidth));}
var newLeft=Math.floor(parseInt($(window).width()/2)-parseInt(newWidth)/2);}
else{newWidth=$modal.width();}
$modal.jqmShow().animate({width:newWidth,height:newHeight,top:newTop,left:newLeft,marginLeft:0},2000);}
else{$modal.jqmShow();}}
$('#modalWindow').jqm({modal:false,trigger:'a.cool',target:'#jqmContent',onHide:myClose,onShow:openInIframe});});function showProcessing(){$(".submitButton").attr("disabled",'disabled');$('#submitType').val("ajax");var submit_type=$('#submitType').fieldValue();return true;}
function hideProcessing(responseText){$.unblockUI();$('#dialog').jqm({ajax:'copyright.php'}).jqmShow();$(".submitButton").attr("disabled",false);}