
function ResolveURL(value){
var re;
re=/~/g;
var _root=$('__applicationPath');
if(_root!=null){
_root=_root.value;
if(_root=="/")_root="";
return value.replace(re,_root);}
else{
return value;}}
function MepTestEnterClickButton(e,buttonid){
var bt=document.getElementById(buttonid);
if(typeof bt=='object'){
if(navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){
if(event.keyCode==13){
bt.click();
return false;}}
else{
if(e.keyCode==13){
if(bt&&typeof(bt.click)=='undefined'){
bt.click=MepAddClickFunction(bt)
return false;}}}}}
function MepAddClickFunction(bt){
var result=true;
if(bt.onclick)result=bt.onclick();
if(typeof(result)=='undefined'||result){
eval(bt.href);}}
function MepEndWith(str1,str){
var offset=str1.length-str.length;
return offset>=0&&str1.lastIndexOf(str)===offset;}
function OnFocusTextHandler(elementID,elementText){
var _txtNewsLetter=document.getElementById(elementID);
if(_txtNewsLetter&&_txtNewsLetter.value==elementText){
_txtNewsLetter.value='';}}
function OnBlurTextHandler(elementID,elementText){
var _txtNewsLetter=document.getElementById(elementID);
if(_txtNewsLetter&&_txtNewsLetter.value==''){
_txtNewsLetter.value=elementText;}}
function highlightSearchTerms(searchText,treatAsPhrase,warnOnFailure,highlightStartTag,highlightEndTag)
{
if(treatAsPhrase){
searchArray=[searchText];}else{
searchArray=searchText.split(" ");}
if(!document.body||typeof(document.body.innerHTML)=="undefined"){
if(warnOnFailure){
alert("Sorry, for some reason the text of this page is unavailable. Searching will not work.");}
return false;}
var oRange=document.body.createTextRange();
while(oRange.findText(searchText)){
oRange.execCommand('BackColor',false,'yellow');
oRange.execCommand('ForeColor',false,'blue');
oRange.moveStart('character',1);}
return true;}
var postBackElement;
var postBackElementID;
function InitializeRequest(sender,args){
if(prm.get_isInAsyncPostBack()){
args.set_cancel(true);}
postBackElement=args.get_postBackElement();
try{
postBackElementID=postBackElement.id;}catch(e){}
ShowProgress(postBackElement);}
function EndRequest(sender,args){
HideProgress();}
function ShowProgress(element){
$("#__AjaxProgress").css("width",$(element).width());
$("#__AjaxProgress").css("height",$(element).height());
$("#__AjaxProgress").css({"left":$(element).offset().left+"px","top":$(element).offset().top+"px"});
$("#__AjaxProgress").show();}
function HideProgress(){
$("#__AjaxProgress").hide();}
function ShowMessageBox(title,description,delay){
MepMessageBox.msg(title,description,delay);}
MepMessageBox=function(){
var msgCt;
function createBox(t,s){
return['<div class="x-box-blue msg">','<div class="x-box-blue x-box-tl"><div class="x-box-blue x-box-tr"><div class="x-box-blue x-box-tc"></div></div></div>','<div class="x-box-blue x-box-ml"><div class="x-box-blue x-box-mr"><div class="x-box-blue x-box-mc"><h3>',t,'</h3>',s,'</div></div></div>','<div class="x-box-blue x-box-bl"><div class="x-box-blue x-box-br"><div class="x-box-blue x-box-bc"></div></div></div>','</div>'].join('');}
return{
msg:function(title,format,delay){
if(typeof delay=="undefined")
delay=5;
if(!msgCt){
msgCt=Ext.DomHelper.insertFirst(document.body,{id:'msg-div'},true);}
msgCt.alignTo(document,'t-t');
var s=String.format.apply(String,Array.prototype.slice.call(arguments,1));
var m=Ext.DomHelper.append(msgCt,{html:createBox(title,s)},true);
m.slideIn('t').pause(delay).ghost("t",{remove:true});},
init:function(){
var s=Ext.get('extlib'),t=Ext.get('exttheme');}};}();
function MepInit(){
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);}
function mepRestartTimeline(){
document.body.resumeElement();}
function mepExecuteVerb(verb){
var _args='';
_args+=verb+'?';
for(var i=1;i<arguments.length;i=i+2)
if(i<arguments.length-1)
_args+=arguments[i]+'='+arguments[i+1]+'&';
__doPostBack(_mepVerbHandlerID,_args);}
function mepRefreshModuleDetail(id){
mepExecuteVerb('ShowModuleDetails','mid',id);}
function mepGetTimestamp(){
var _value=new Date();
return _value.getTime();}
function mepACLCreateGenericRule(prefix,permissionType,permit){
_mepActionType='CreateRule';
_mepActionData='permit='+permit+'&permissionType='+permissionType;
var _chkCanPropagate=document.all[prefix+'_chkCanPropagate'];
if(_chkCanPropagate)
_mepActionData+='&canPropagate='+_chkCanPropagate.checked;
_mepActionData+='&actor=';
var _rbtAllRoles=document.all[prefix+'_rbtAllRoles'];
var _rbtAllUsers=document.all[prefix+'_rbtAllUsers'];
var _rbtRoles=document.all[prefix+'_rbtRoles'];
var _rbtUsers=document.all[prefix+'_rbtUsers'];
var _wcRolesId;
if(_rbtRoles)
_wcRolesId=_rbtRoles.attachedCombo;
var _wcUsersId=_rbtUsers.attachedCombo;
var _actor;
var _actorId;
if(_rbtAllRoles.checked)
_actor='AllRoles';
else if(_rbtAllUsers.checked)
_actor='AllUsers';
else if(_rbtRoles&&_rbtRoles.checked)
_actor='Role&actorId='+wc_getValue(_wcRolesId);
else if(_rbtUsers.checked)
_actor='User&actorId='+wc_getValue(_wcUsersId);
_mepActionData+=_actor;
var grid=ISGetObject(prefix+'_wgPermissions');
grid.SendCustomRequest();}
function mepACLCreateRule(prefix,permit){
_mepActionType='CreateRule';
_mepActionData='permit='+permit;
var _chkCanPropagate=document.all[prefix+'_chkCanPropagate'];
if(_chkCanPropagate)
_mepActionData+='&canPropagate='+_chkCanPropagate.checked;
_mepActionData+='&actor=';
var _rbtAllRoles=document.all[prefix+'_rbtAllRoles'];
var _rbtAllUsers=document.all[prefix+'_rbtAllUsers'];
var _rbtRoles=document.all[prefix+'_rbtRoles'];
var _rbtUsers=document.all[prefix+'_rbtUsers'];
var _wcRolesId;
if(_rbtRoles)
_wcRolesId=_rbtRoles.attachedCombo;
var _wcUsersId=_rbtUsers.attachedCombo;
var _actor;
var _actorId;
if(_rbtAllRoles.checked)
_actor='AllRoles';
else if(_rbtAllUsers.checked)
_actor='AllUsers';
else if(_rbtRoles&&_rbtRoles.checked)
_actor='Role&actorId='+wc_getValue(_wcRolesId);
else if(_rbtUsers.checked)
_actor='User&actorId='+wc_getValue(_wcUsersId);
_mepActionData+=_actor;
var grid=ISGetObject(prefix+'_wgPermissions');
grid.SendCustomRequest();}
function mepACLRadioChanged(prefix){
var _rbtAllRoles=document.all[prefix+'_rbtAllRoles'];
var _rbtAllUsers=document.all[prefix+'_rbtAllUsers'];
var _rbtRoles=document.all[prefix+'_rbtRoles'];
var _rbtUsers=document.all[prefix+'_rbtUsers'];
var _wcRoles;
if(_rbtRoles){
_wcRoles=wcGetComboById(_rbtRoles.attachedCombo);
_wcRoles.Disable();
if(_rbtRoles.checked)
_wcRoles.Enable();
_rbtRoles.nextSibling.style.fontWeight='normal';}
var _wcUsers=wcGetComboById(_rbtUsers.attachedCombo);
_wcUsers.Disable();
if(_rbtUsers.checked)
_wcUsers.Enable();
_rbtAllRoles.nextSibling.style.fontWeight='normal';
_rbtAllUsers.nextSibling.style.fontWeight='normal';
_rbtUsers.nextSibling.style.fontWeight='normal';
if(_rbtAllRoles.checked)
_rbtAllRoles.nextSibling.style.fontWeight='bold';
else if(_rbtAllUsers.checked)
_rbtAllUsers.nextSibling.style.fontWeight='bold';
else if(_rbtRoles&&_rbtRoles.checked)
_rbtRoles.nextSibling.style.fontWeight='bold';
else if(_rbtUsers.checked)
_rbtUsers.nextSibling.style.fontWeight='bold';}
function manageControlPanelClick(id,MepRedirectUrl){
var _dialogOptions="dialogHeight: 260px; dialogWidth: 480px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; scroll:off";
switch(id)
{
case'designmode':
mepExecuteVerb('PageMode');
break;
case'viewmode':
mepExecuteVerb('PageMode');
break;
case'saveview':
YAHOO.example.DDModules.save();
break;
case'modulestoolbox':
mepExecuteVerb('ShowModules');
break;
case'layoutstoolbox':
mepExecuteVerb('ShowLayouts');
break;
case'MenuUp':
mepExecuteVerb('MenuUp');
break;
case'MenuDown':
mepExecuteVerb('MenuDown');
break;
case'AddSubMenu':
_modalRetValue='';
_retVal=window.showModalDialog(MepRedirectUrl,null,_dialogOptions);
if(_retVal&&_retVal=='update'){
window.location=document.location.toString();}
else if(_modalRetValue&&_modalRetValue=='update'){
window.location=document.location.toString();}
break;
case'AddSiblingMenu':
_modalRetValue='';
_retVal=window.showModalDialog(MepRedirectUrl,null,_dialogOptions);
if(_retVal&&_retVal=='update'){
window.location=document.location.toString();}
else if(_modalRetValue&&_modalRetValue=='update'){
window.location=document.location.toString();}
break;
case'EditMenu':
_modalRetValue='';
_retVal=window.showModalDialog(MepRedirectUrl,null,_dialogOptions);
if(_retVal&&_retVal=='update'){
window.location=document.location.toString();}
else if(_modalRetValue&&_modalRetValue=='update'){
window.location=document.location.toString();}
break;
case'DeleteMenu':
var _targetURL=MepRedirectUrl;
_modalRetValue='';
_retVal=OpenMenuDeletion(_targetURL);
if(_retVal&&_retVal!=''){
mepExecuteVerb('DeleteMenu','deleteMenus',_retVal.replace('menus=',''));}
else if(_modalRetValue&&_modalRetValue!=''){
mepExecuteVerb('DeleteMenu','deleteMenus',_modalRetValue.replace('menus=',''));}
break;
case'AdminLayouts':
window.location='DesktopPortalMain.aspx?Action=ManageLayouts';
break;
case'AdminMenus':
mepExecuteVerb('AdminMenus');
break;
case'AdminUsers':
window.location='DesktopPortalMain.aspx?Action=ManageUsers';
break;
case'AdminEvents':
window.location='DesktopPortalMain.aspx?Action=ManageEvents';
break;
case'AdminRoles':
window.location='DesktopPortalMain.aspx?Action=ManageRoles';
break;
case'AdminModules':
window.location='DesktopPortalMain.aspx?Action=ManageModules';
break;
case'AdminFrames':
window.location='DesktopPortalMain.aspx?Action=ManageFrames';
break;
case'AdminSections':
window.location='DesktopPortalMain.aspx?Action=ManageSections';
break;
case'AdminThemes':
window.location='DesktopPortalMain.aspx?Action=ManageThemes';
break;
case'AdminCultures':
window.location='DesktopPortalMain.aspx?Action=ManageCultures';
break;
case'AdminLibraries':
window.location='DesktopPortalMain.aspx?Action=ManageLibraries';
break;
default:
break;}}
function OpenRequestInfo()
{
var _top=(window.screen.height-480)/2;
var _left=(window.screen.width-640)/2;
window.open("Themes/Default/CommonModules/RequestInfo/RequestInfo.aspx",null,"height=480,width=560,resizable=yes,scrollbars=yes,left="+_left+",top="+_top);}
function Browseris(){
var agt=navigator.userAgent.toLowerCase();
this.osver=1.0;
if(agt)
{
var stOSVer=agt.substring(agt.indexOf("windows ")+11);
this.osver=parseFloat(stOSVer);}
this.major=parseInt(navigator.appVersion);
this.nav=((agt.indexOf('mozilla')!=-1)&&((agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)));
this.nav2=(this.nav&&(this.major==2));
this.nav3=(this.nav&&(this.major==3));
this.nav4=(this.nav&&(this.major==4));
this.nav6=this.nav&&(this.major==5);
this.nav6up=this.nav&&(this.major>=5);
this.nav7up=false;
if(this.nav6up)
{
var navIdx=agt.indexOf("netscape/");
if(navIdx>=0)
this.nav7up=parseInt(agt.substring(navIdx+9))>=7;}
this.ie=(agt.indexOf("msie")!=-1);
this.aol=this.ie&&agt.indexOf(" aol ")!=-1;
if(this.ie)
{
var stIEVer=agt.substring(agt.indexOf("msie ")+5);
this.iever=parseInt(stIEVer);
this.verIEFull=parseFloat(stIEVer);}
else
this.iever=0;
this.ie3=(this.ie&&(this.major==2));
this.ie4=(this.ie&&(this.major==4));
this.ie4up=this.ie&&(this.major>=4);
this.ie5up=this.ie&&(this.iever>=5);
this.ie55up=this.ie&&(this.verIEFull>=5.5);
this.ie6up=this.ie&&(this.iever>=6);
this.win16=((agt.indexOf("win16")!=-1)||(agt.indexOf("16bit")!=-1)||(agt.indexOf("windows 3.1")!=-1)||(agt.indexOf("windows 16-bit")!=-1));
this.win31=(agt.indexOf("windows 3.1")!=-1)||(agt.indexOf("win16")!=-1)||
(agt.indexOf("windows 16-bit")!=-1);
this.win98=((agt.indexOf("win98")!=-1)||(agt.indexOf("windows 98")!=-1));
this.win95=((agt.indexOf("win95")!=-1)||(agt.indexOf("windows 95")!=-1));
this.winnt=((agt.indexOf("winnt")!=-1)||(agt.indexOf("windows nt")!=-1));
this.win32=this.win95||this.winnt||this.win98||
((this.major>=4)&&(navigator.platform=="Win32"))||
(agt.indexOf("win32")!=-1)||(agt.indexOf("32bit")!=-1);
this.os2=(agt.indexOf("os/2")!=-1)||(navigator.appVersion.indexOf("OS/2")!=-1)||(agt.indexOf("ibm-webexplorer")!=-1);
this.mac=(agt.indexOf("mac")!=-1);
this.mac68k=this.mac&&((agt.indexOf("68k")!=-1)||
(agt.indexOf("68000")!=-1));
this.macppc=this.mac&&((agt.indexOf("ppc")!=-1)||
(agt.indexOf("powerpc")!=-1));
this.w3c=this.nav6up;}
var browseris=new Browseris();
function Trim(s){
while((s.substring(0,1)==' ')||(s.substring(0,1)=='\n')||(s.substring(0,1)=='\r')){
s=s.substring(1,s.length);}
while((s.substring(s.length-1,s.length)==' ')||(s.substring(s.length-1,s.length)=='\n')||(s.substring(s.length-1,s.length)=='\r')){
s=s.substring(0,s.length-1);}
return s;}
function ConfirmDelete(){
if(window.event.button==1){
var rsp=confirm(GetResourceString('{1}'));
if(rsp==true)
event.srcElement.click();}}
function BasicConfirmDelete(){
var rsp=confirm(GetResourceString('{1}'));
if(rsp==true)
return true;
return false;}
function ConfirmDuplicate(){
if(window.event.button==1){
var rsp=confirm(GetResourceString('{2}'));
if(rsp==true)
event.srcElement.click();}}
function PageIsDirt(UseKeyBoard)
{
var i;
var objs;
var pageIsDirt=false;
var check=false;
if(UseKeyBoard==-2)
check=true;
else
if(UseKeyBoard)
{
if(window.event.keyCode==13)
check=true;}else{
if(window.event.button==1)
check=true;}
if(check){
objs=window.document.getElementsByTagName("SPAN");
for(i=0;i<objs.length;i++)
{
if(objs[i].IsDirt){
if(objs[i].IsDirt==true)
pageIsDirt=true;}}
objs=document.getElementsByTagName("INPUT");
for(i=0;i<objs.length;i++)
{
if(objs[i].IsDirt){
if(objs[i].IsDirt==true)
pageIsDirt=true;}}
objs=document.getElementsByTagName("SELECT");
for(i=0;i<objs.length;i++)
{
if(objs[i].IsDirt){
if(objs[i].IsDirt==true)
pageIsDirt=true;}}
if(pageIsDirt)
{
var rsp=confirm(GetResourceString('{3}'));
if(!UseKeyBoard){
if(rsp==true)
event.srcElement.click();}else{
if(rsp==false)
event.returnValue=false;}
return rsp;}else
return true;}}
function AskToProceed(){
if(window.event.button==1){
var rsp=confirm(GetResourceString('{4}'));
if(rsp==true)
event.srcElement.click();}}
function KeyAskToProceed(){
if(window.event.keyCode==13||window.event.keyCode==20){
var rsp=confirm(GetResourceString('{4}'));
if(rsp==false)
event.returnValue=false;}}
function AskToReset(UseKeyBoard)
{
var check=false;
if(UseKeyBoard)
{
if(window.event.keyCode==13)
check=true;}else{
if(window.event.button==1)
check=true;}
if(check){
var rsp=confirm(GetResourceString('{5}'));
if(UseKeyBoard)
{
if(rsp==false)
event.returnValue=false;}else{
if(rsp)
window.event.srcElement.click();}}}
function OpenCalendar(calendarPath,hostCtrl,x,y)
{
if(window.event.srcElement.parentElement.disabled)return;
_modalRetValue='';
calendarPath+='?selected='+document.all[hostCtrl].value;
var dialogParams='dialogHeight: 250px; dialogWidth: 220px;edge: Raised; center:No; help: No; resizable: No; status: No; scroll:off;dialogTop:'+y+'px; dialogLeft:'+x+'px;';
var retValue=window.showModalDialog(calendarPath,null,dialogParams);
if(retValue&&retValue!=''){
document.all[hostCtrl].value=retValue;}
else if(_modalRetValue&&_modalRetValue!=''){
document.all[hostCtrl].value=_modalRetValue;}}
var _modalRetValue;
function SetModalRetValue(retValue){
_modalRetValue=retValue;}
function OpenResource(resourcePath,destCtrl,hidCtrl,exposed)
{
if(window.event.srcElement.parentElement.disabled)return;
var dstCtl=document.all[destCtrl];
var hidCtl=document.all[hidCtrl];
if(exposed=='False'){
resourcePath+='&StorageItemID='+hidCtl.value;}
else{
resourcePath+='&SelectedItemName='+dstCtl.value;}
resourcePath+='&Exposed='+exposed;
var dialogParams='dialogHeight: 480px; dialogWidth: 640px;edge: Raised; center:Yes; help: No; resizable: Yes; status: No;scroll:off';
_modalRetValue='';
var retValue=window.showModalDialog(resourcePath,null,dialogParams);
if(retValue&&retValue!=''){
var retValues=retValue.split(';');
if(exposed=='False'){
hidCtl.value=retValues[0];
dstCtl.value=retValues[1];}
else{
hidCtl.value=retValues[0];
dstCtl.value=retValues[2];}
dstCtl.focus();
dstCtl.blur();}
else if(_modalRetValue&&_modalRetValue!=''){
var retValues=_modalRetValue.split(';');
if(exposed=='False'){
hidCtl.value=retValues[0];
dstCtl.value=retValues[1];}
else{
hidCtl.value=retValues[0];
dstCtl.value=retValues[2];}
dstCtl.focus();
dstCtl.blur();}}
function OpenColor(resourcePath,destCtrl)
{
if(window.event.srcElement.parentElement.disabled)return;
var dstCtl=document.all[destCtrl];
var dialogParams='dialogHeight:455px;dialogWidth:370px;center:Yes;help:No;scroll:No;resizable:No;status:No;';
_modalRetValue='';
var retValue=window.showModalDialog(resourcePath,dstCtl.value,dialogParams);
if(retValue&&retValue!=''){
dstCtl.value=retValue;}
else if(_modalRetValue&&_modalRetValue!=''){
dstCtl.value=_modalRetValue;}
dstCtl.focus();
dstCtl.blur();}
function OpenMenuSelection(resourcePath,destCtrl,hidCtrl)
{
if(window.event.srcElement.parentElement.disabled)return;
var dstCtl=document.all[destCtrl];
var hidCtl=document.all[hidCtrl];
resourcePath+='&currentmenuid='+hidCtl.value;
var dialogParams='dialogHeight: 528px; dialogWidth: 250px;edge: Raised; center:Yes; help: No; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(resourcePath,null,dialogParams);
if(retValue){
hidCtl.value=retValue.value;
dstCtl.value=retValue.text;}}
function OpenModuleDeletion(path,postbackId,params)
{
var dialogParams='dialogHeight: 480px; dialogWidth: 640px;edge: Raised; center:Yes; help: Yes; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(path,null,dialogParams);
if(retValue){
params+=retValue+'&';
__doPostBack(postbackId,params);}}
function OpenItemDeletion(path,postbackId,params)
{
var dialogParams='dialogHeight: 480px; dialogWidth: 640px;edge: Raised; center:Yes; help: Yes; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(path,null,dialogParams);
return retValue;}
function OpenMenuDeletion(path)
{
var dialogParams='dialogHeight: 480px; dialogWidth: 640px;edge: Raised; center:Yes; help: Yes; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(path,null,dialogParams);
return retValue;}
function OpenSectionDeletion(path)
{
var dialogParams='dialogHeight: 480px; dialogWidth: 640px;edge: Raised; center:Yes; help: Yes; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(path,null,dialogParams);
return retValue;}
function OpenWizardDialog(path,dwidth,dheight)
{
var dialogParams='dialogHeight: '+dheight+'px; dialogWidth: '+dwidth+'px;edge: Raised; center:Yes; help: Yes; resizable: No; status: No;scroll:off';
var retValue=window.showModalDialog(path,null,dialogParams);
return retValue;}
function BrowseResources(hostCtrl,rootAppPath,ResourceType)
{
var _absModalDialogPath=rootAppPath+'/Admin/Resources/ModalDialogTarget.htm'
var _absResourcesBrowserPath=rootAppPath+'/Admin/Resources/ResourcesBrowser.aspx?Selected='+hostCtrl.value+'&ResourceType='+ResourceType
var retValue=window.showModalDialog(_absModalDialogPath,_absResourcesBrowserPath,"dialogHeight: 400x; dialogWidth: 640px; edge: Raised; center: Yes; help: No; status: No;");
if(retValue!=''&&retValue!=null)
hostCtrl.value=retValue;}
var popUp;
function OpenCalendarXY(idname,postBack,rootAppPath,offsetX,offsetY)
{
popUp=window.open(rootAppPath+'/Admin/Calendar/Calendar.aspx?formname='+document.forms[0].name+'&id='+idname+'&selected='+document.forms[0].elements[idname].value+'&postBack='+postBack,'popupcal','width=165,height=208,left='+offsetX+',top='+offsetY);}
function SetDate(formName,id,newDate,postBack)
{
eval('var theform = document.'+formName+';');
popUp.close();
theform.elements[id].value=newDate;
if(postBack)
__doPostBack(id,'');}
function SelectProductTour(idname,postBack,ProductTourPath)
{
popUp=window.open(ProductTourPath+'ProductsTourList.aspx?formname='+document.forms[0].name+'&id='+idname+'&selected='+document.forms[0].elements[idname].value+'&postBack='+postBack,'popupcal','width=600,height=400,left=200,top=150');}
function ReturnSelectedPT(formName,id,ptString,postBack)
{
eval('var theform = document.'+formName+';');
popUp.close();
theform.elements[id].value=ptString;
if(postBack)
__doPostBack(id,'');}
function GenericToolbarClick(customBehavior){
var _e=window.event.srcNode;
switch(_e.id)
{
case'btnBack':
if(PageIsDirt(-2))
window.event.srcToolbar.PropagateEvents();
break;
case'btnClose':
if(PageIsDirt(-2)){
if(window.parent.dialog!=null)
window.parent.dialog.hide();
else
window.close();}
break;
case'btnDelete':
if(BasicConfirmDelete())
window.event.srcToolbar.PropagateEvents();
break;
case'btnSave':
var _isValid=true;
if(typeof(Page_ClientValidate)=='function')
_isValid=Page_ClientValidate();
if(_isValid)
window.event.srcToolbar.PropagateEvents();
break;
case'btnSaveClose':
var _isValid=true;
if(typeof(Page_ClientValidate)=='function')
_isValid=Page_ClientValidate();
if(_isValid)
window.event.srcToolbar.PropagateEvents();
break;
default:
if(customBehavior)
eval(customBehavior);
else
window.event.srcToolbar.PropagateEvents();
break;}}
function GetContentWidth(container){
var _sibling=container.offsetParent.nextSibling;
if(_sibling)
return document.body.clientWidth-_sibling.offsetWidth;
else
return document.body.clientWidth;}
function AskToResetPollToolbar(){
var rsp=confirm(GetResourceString('{5}'));
if(rsp==true)
return true;
return false;}
function HtmlDecode(s)
{
var out="";
if(s==null)return;
var l=s.length;
for(var i=0;i<l;i++)
{
var ch=s.charAt(i);
if(ch=='&')
{
var semicolonIndex=s.indexOf(';',i+1);
if(semicolonIndex>0)
{
var entity=s.substring(i+1,semicolonIndex);
if(entity.length>1&&entity.charAt(0)=='#')
{
if(entity.charAt(1)=='x'||entity.charAt(1)=='X')
ch=String.fromCharCode(eval('0'+entity.substring(1)));
else
ch=String.fromCharCode(eval(entity.substring(1)));}
else
{
switch(entity)
{
case'quot':ch=String.fromCharCode(0x0022);break;
case'amp':ch=String.fromCharCode(0x0026);break;
case'lt':ch=String.fromCharCode(0x003c);break;
case'gt':ch=String.fromCharCode(0x003e);break;
case'nbsp':ch=String.fromCharCode(0x00a0);break;
case'iexcl':ch=String.fromCharCode(0x00a1);break;
case'cent':ch=String.fromCharCode(0x00a2);break;
case'pound':ch=String.fromCharCode(0x00a3);break;
case'curren':ch=String.fromCharCode(0x00a4);break;
case'yen':ch=String.fromCharCode(0x00a5);break;
case'brvbar':ch=String.fromCharCode(0x00a6);break;
case'sect':ch=String.fromCharCode(0x00a7);break;
case'uml':ch=String.fromCharCode(0x00a8);break;
case'copy':ch=String.fromCharCode(0x00a9);break;
case'ordf':ch=String.fromCharCode(0x00aa);break;
case'laquo':ch=String.fromCharCode(0x00ab);break;
case'not':ch=String.fromCharCode(0x00ac);break;
case'shy':ch=String.fromCharCode(0x00ad);break;
case'reg':ch=String.fromCharCode(0x00ae);break;
case'macr':ch=String.fromCharCode(0x00af);break;
case'deg':ch=String.fromCharCode(0x00b0);break;
case'plusmn':ch=String.fromCharCode(0x00b1);break;
case'sup2':ch=String.fromCharCode(0x00b2);break;
case'sup3':ch=String.fromCharCode(0x00b3);break;
case'acute':ch=String.fromCharCode(0x00b4);break;
case'micro':ch=String.fromCharCode(0x00b5);break;
case'para':ch=String.fromCharCode(0x00b6);break;
case'middot':ch=String.fromCharCode(0x00b7);break;
case'cedil':ch=String.fromCharCode(0x00b8);break;
case'sup1':ch=String.fromCharCode(0x00b9);break;
case'ordm':ch=String.fromCharCode(0x00ba);break;
case'raquo':ch=String.fromCharCode(0x00bb);break;
case'frac14':ch=String.fromCharCode(0x00bc);break;
case'frac12':ch=String.fromCharCode(0x00bd);break;
case'frac34':ch=String.fromCharCode(0x00be);break;
case'iquest':ch=String.fromCharCode(0x00bf);break;
case'Agrave':ch=String.fromCharCode(0x00c0);break;
case'Aacute':ch=String.fromCharCode(0x00c1);break;
case'Acirc':ch=String.fromCharCode(0x00c2);break;
case'Atilde':ch=String.fromCharCode(0x00c3);break;
case'Auml':ch=String.fromCharCode(0x00c4);break;
case'Aring':ch=String.fromCharCode(0x00c5);break;
case'AElig':ch=String.fromCharCode(0x00c6);break;
case'Ccedil':ch=String.fromCharCode(0x00c7);break;
case'Egrave':ch=String.fromCharCode(0x00c8);break;
case'Eacute':ch=String.fromCharCode(0x00c9);break;
case'Ecirc':ch=String.fromCharCode(0x00ca);break;
case'Euml':ch=String.fromCharCode(0x00cb);break;
case'Igrave':ch=String.fromCharCode(0x00cc);break;
case'Iacute':ch=String.fromCharCode(0x00cd);break;
case'Icirc':ch=String.fromCharCode(0x00ce);break;
case'Iuml':ch=String.fromCharCode(0x00cf);break;
case'ETH':ch=String.fromCharCode(0x00d0);break;
case'Ntilde':ch=String.fromCharCode(0x00d1);break;
case'Ograve':ch=String.fromCharCode(0x00d2);break;
case'Oacute':ch=String.fromCharCode(0x00d3);break;
case'Ocirc':ch=String.fromCharCode(0x00d4);break;
case'Otilde':ch=String.fromCharCode(0x00d5);break;
case'Ouml':ch=String.fromCharCode(0x00d6);break;
case'times':ch=String.fromCharCode(0x00d7);break;
case'Oslash':ch=String.fromCharCode(0x00d8);break;
case'Ugrave':ch=String.fromCharCode(0x00d9);break;
case'Uacute':ch=String.fromCharCode(0x00da);break;
case'Ucirc':ch=String.fromCharCode(0x00db);break;
case'Uuml':ch=String.fromCharCode(0x00dc);break;
case'Yacute':ch=String.fromCharCode(0x00dd);break;
case'THORN':ch=String.fromCharCode(0x00de);break;
case'szlig':ch=String.fromCharCode(0x00df);break;
case'agrave':ch=String.fromCharCode(0x00e0);break;
case'aacute':ch=String.fromCharCode(0x00e1);break;
case'acirc':ch=String.fromCharCode(0x00e2);break;
case'atilde':ch=String.fromCharCode(0x00e3);break;
case'auml':ch=String.fromCharCode(0x00e4);break;
case'aring':ch=String.fromCharCode(0x00e5);break;
case'aelig':ch=String.fromCharCode(0x00e6);break;
case'ccedil':ch=String.fromCharCode(0x00e7);break;
case'egrave':ch=String.fromCharCode(0x00e8);break;
case'eacute':ch=String.fromCharCode(0x00e9);break;
case'ecirc':ch=String.fromCharCode(0x00ea);break;
case'euml':ch=String.fromCharCode(0x00eb);break;
case'igrave':ch=String.fromCharCode(0x00ec);break;
case'iacute':ch=String.fromCharCode(0x00ed);break;
case'icirc':ch=String.fromCharCode(0x00ee);break;
case'iuml':ch=String.fromCharCode(0x00ef);break;
case'eth':ch=String.fromCharCode(0x00f0);break;
case'ntilde':ch=String.fromCharCode(0x00f1);break;
case'ograve':ch=String.fromCharCode(0x00f2);break;
case'oacute':ch=String.fromCharCode(0x00f3);break;
case'ocirc':ch=String.fromCharCode(0x00f4);break;
case'otilde':ch=String.fromCharCode(0x00f5);break;
case'ouml':ch=String.fromCharCode(0x00f6);break;
case'divide':ch=String.fromCharCode(0x00f7);break;
case'oslash':ch=String.fromCharCode(0x00f8);break;
case'ugrave':ch=String.fromCharCode(0x00f9);break;
case'uacute':ch=String.fromCharCode(0x00fa);break;
case'ucirc':ch=String.fromCharCode(0x00fb);break;
case'uuml':ch=String.fromCharCode(0x00fc);break;
case'yacute':ch=String.fromCharCode(0x00fd);break;
case'thorn':ch=String.fromCharCode(0x00fe);break;
case'yuml':ch=String.fromCharCode(0x00ff);break;
case'OElig':ch=String.fromCharCode(0x0152);break;
case'oelig':ch=String.fromCharCode(0x0153);break;
case'Scaron':ch=String.fromCharCode(0x0160);break;
case'scaron':ch=String.fromCharCode(0x0161);break;
case'Yuml':ch=String.fromCharCode(0x0178);break;
case'fnof':ch=String.fromCharCode(0x0192);break;
case'circ':ch=String.fromCharCode(0x02c6);break;
case'tilde':ch=String.fromCharCode(0x02dc);break;
case'Alpha':ch=String.fromCharCode(0x0391);break;
case'Beta':ch=String.fromCharCode(0x0392);break;
case'Gamma':ch=String.fromCharCode(0x0393);break;
case'Delta':ch=String.fromCharCode(0x0394);break;
case'Epsilon':ch=String.fromCharCode(0x0395);break;
case'Zeta':ch=String.fromCharCode(0x0396);break;
case'Eta':ch=String.fromCharCode(0x0397);break;
case'Theta':ch=String.fromCharCode(0x0398);break;
case'Iota':ch=String.fromCharCode(0x0399);break;
case'Kappa':ch=String.fromCharCode(0x039a);break;
case'Lambda':ch=String.fromCharCode(0x039b);break;
case'Mu':ch=String.fromCharCode(0x039c);break;
case'Nu':ch=String.fromCharCode(0x039d);break;
case'Xi':ch=String.fromCharCode(0x039e);break;
case'Omicron':ch=String.fromCharCode(0x039f);break;
case'Pi':ch=String.fromCharCode(0x03a0);break;
case' Rho ':ch=String.fromCharCode(0x03a1);break;
case'Sigma':ch=String.fromCharCode(0x03a3);break;
case'Tau':ch=String.fromCharCode(0x03a4);break;
case'Upsilon':ch=String.fromCharCode(0x03a5);break;
case'Phi':ch=String.fromCharCode(0x03a6);break;
case'Chi':ch=String.fromCharCode(0x03a7);break;
case'Psi':ch=String.fromCharCode(0x03a8);break;
case'Omega':ch=String.fromCharCode(0x03a9);break;
case'alpha':ch=String.fromCharCode(0x03b1);break;
case'beta':ch=String.fromCharCode(0x03b2);break;
case'gamma':ch=String.fromCharCode(0x03b3);break;
case'delta':ch=String.fromCharCode(0x03b4);break;
case'epsilon':ch=String.fromCharCode(0x03b5);break;
case'zeta':ch=String.fromCharCode(0x03b6);break;
case'eta':ch=String.fromCharCode(0x03b7);break;
case'theta':ch=String.fromCharCode(0x03b8);break;
case'iota':ch=String.fromCharCode(0x03b9);break;
case'kappa':ch=String.fromCharCode(0x03ba);break;
case'lambda':ch=String.fromCharCode(0x03bb);break;
case'mu':ch=String.fromCharCode(0x03bc);break;
case'nu':ch=String.fromCharCode(0x03bd);break;
case'xi':ch=String.fromCharCode(0x03be);break;
case'omicron':ch=String.fromCharCode(0x03bf);break;
case'pi':ch=String.fromCharCode(0x03c0);break;
case'rho':ch=String.fromCharCode(0x03c1);break;
case'sigmaf':ch=String.fromCharCode(0x03c2);break;
case'sigma':ch=String.fromCharCode(0x03c3);break;
case'tau':ch=String.fromCharCode(0x03c4);break;
case'upsilon':ch=String.fromCharCode(0x03c5);break;
case'phi':ch=String.fromCharCode(0x03c6);break;
case'chi':ch=String.fromCharCode(0x03c7);break;
case'psi':ch=String.fromCharCode(0x03c8);break;
case'omega':ch=String.fromCharCode(0x03c9);break;
case'thetasym':ch=String.fromCharCode(0x03d1);break;
case'upsih':ch=String.fromCharCode(0x03d2);break;
case'piv':ch=String.fromCharCode(0x03d6);break;
case'ensp':ch=String.fromCharCode(0x2002);break;
case'emsp':ch=String.fromCharCode(0x2003);break;
case'thinsp':ch=String.fromCharCode(0x2009);break;
case'zwnj':ch=String.fromCharCode(0x200c);break;
case'zwj':ch=String.fromCharCode(0x200d);break;
case'lrm':ch=String.fromCharCode(0x200e);break;
case'rlm':ch=String.fromCharCode(0x200f);break;
case'ndash':ch=String.fromCharCode(0x2013);break;
case'mdash':ch=String.fromCharCode(0x2014);break;
case'lsquo':ch=String.fromCharCode(0x2018);break;
case'rsquo':ch=String.fromCharCode(0x2019);break;
case'sbquo':ch=String.fromCharCode(0x201a);break;
case'ldquo':ch=String.fromCharCode(0x201c);break;
case'rdquo':ch=String.fromCharCode(0x201d);break;
case'bdquo':ch=String.fromCharCode(0x201e);break;
case'dagger':ch=String.fromCharCode(0x2020);break;
case'Dagger':ch=String.fromCharCode(0x2021);break;
case'bull':ch=String.fromCharCode(0x2022);break;
case'hellip':ch=String.fromCharCode(0x2026);break;
case'permil':ch=String.fromCharCode(0x2030);break;
case'prime':ch=String.fromCharCode(0x2032);break;
case'Prime':ch=String.fromCharCode(0x2033);break;
case'lsaquo':ch=String.fromCharCode(0x2039);break;
case'rsaquo':ch=String.fromCharCode(0x203a);break;
case'oline':ch=String.fromCharCode(0x203e);break;
case'frasl':ch=String.fromCharCode(0x2044);break;
case'euro':ch=String.fromCharCode(0x20ac);break;
case'image':ch=String.fromCharCode(0x2111);break;
case'weierp':ch=String.fromCharCode(0x2118);break;
case'real':ch=String.fromCharCode(0x211c);break;
case'trade':ch=String.fromCharCode(0x2122);break;
case'alefsym':ch=String.fromCharCode(0x2135);break;
case'larr':ch=String.fromCharCode(0x2190);break;
case'uarr':ch=String.fromCharCode(0x2191);break;
case'rarr':ch=String.fromCharCode(0x2192);break;
case'darr':ch=String.fromCharCode(0x2193);break;
case'harr':ch=String.fromCharCode(0x2194);break;
case'crarr':ch=String.fromCharCode(0x21b5);break;
case'lArr':ch=String.fromCharCode(0x21d0);break;
case'uArr':ch=String.fromCharCode(0x21d1);break;
case'rArr':ch=String.fromCharCode(0x21d2);break;
case'dArr':ch=String.fromCharCode(0x21d3);break;
case'hArr':ch=String.fromCharCode(0x21d4);break;
case'forall':ch=String.fromCharCode(0x2200);break;
case'part':ch=String.fromCharCode(0x2202);break;
case'exist':ch=String.fromCharCode(0x2203);break;
case'empty':ch=String.fromCharCode(0x2205);break;
case'nabla':ch=String.fromCharCode(0x2207);break;
case'isin':ch=String.fromCharCode(0x2208);break;
case'notin':ch=String.fromCharCode(0x2209);break;
case'ni':ch=String.fromCharCode(0x220b);break;
case'prod':ch=String.fromCharCode(0x220f);break;
case'sum':ch=String.fromCharCode(0x2211);break;
case'minus':ch=String.fromCharCode(0x2212);break;
case'lowast':ch=String.fromCharCode(0x2217);break;
case'radic':ch=String.fromCharCode(0x221a);break;
case'prop':ch=String.fromCharCode(0x221d);break;
case'infin':ch=String.fromCharCode(0x221e);break;
case'ang':ch=String.fromCharCode(0x2220);break;
case'and':ch=String.fromCharCode(0x2227);break;
case'or':ch=String.fromCharCode(0x2228);break;
case'cap':ch=String.fromCharCode(0x2229);break;
case'cup':ch=String.fromCharCode(0x222a);break;
case'int':ch=String.fromCharCode(0x222b);break;
case'there4':ch=String.fromCharCode(0x2234);break;
case'sim':ch=String.fromCharCode(0x223c);break;
case'cong':ch=String.fromCharCode(0x2245);break;
case'asymp':ch=String.fromCharCode(0x2248);break;
case'ne':ch=String.fromCharCode(0x2260);break;
case'equiv':ch=String.fromCharCode(0x2261);break;
case'le':ch=String.fromCharCode(0x2264);break;
case'ge':ch=String.fromCharCode(0x2265);break;
case'sub':ch=String.fromCharCode(0x2282);break;
case'sup':ch=String.fromCharCode(0x2283);break;
case'nsub':ch=String.fromCharCode(0x2284);break;
case'sube':ch=String.fromCharCode(0x2286);break;
case'supe':ch=String.fromCharCode(0x2287);break;
case'oplus':ch=String.fromCharCode(0x2295);break;
case'otimes':ch=String.fromCharCode(0x2297);break;
case'perp':ch=String.fromCharCode(0x22a5);break;
case'sdot':ch=String.fromCharCode(0x22c5);break;
case'lceil':ch=String.fromCharCode(0x2308);break;
case'rceil':ch=String.fromCharCode(0x2309);break;
case'lfloor':ch=String.fromCharCode(0x230a);break;
case'rfloor':ch=String.fromCharCode(0x230b);break;
case'lang':ch=String.fromCharCode(0x2329);break;
case'rang':ch=String.fromCharCode(0x232a);break;
case'loz':ch=String.fromCharCode(0x25ca);break;
case'spades':ch=String.fromCharCode(0x2660);break;
case'clubs':ch=String.fromCharCode(0x2663);break;
case'hearts':ch=String.fromCharCode(0x2665);break;
case'diams':ch=String.fromCharCode(0x2666);break;
default:ch='';break;}}
i=semicolonIndex;}}
out+=ch;}
return out;}
var resourcesDom;
function InitResources(filename){
if(browseris.ie5up){
resourcesDom=new ActiveXObject("Microsoft.XMLDOM");
resourcesDom.async="false";
resourcesDom.load(filename);}
if(browseris.nav6up)
if(document.implementation&&document.implementation.createDocument){
var xmlhttp=new window.XMLHttpRequest();
xmlhttp.open("GET",filename,false);
xmlhttp.send(null);
resourcesDom=xmlhttp.responseXML.documentElement;}}
function GetResourceString(key){
key=key.substring(1,key.length-1);
if(browseris.nav6up)
{
var _resources=resourcesDom.getElementsByTagName("resource");
for(var i=0;i<_resources.length;i++){
if(_resources[i].getAttribute("key")==key){
return _resources[i].getAttribute("value");}}}else
if(browseris.ie5up){
if(resourcesDom!=null){
var _node=resourcesDom.selectSingleNode("//resource[@key="+key+"]");
if(_node)
return _node.selectSingleNode("@value").value;}
else
return'Client resource not found!';}
return"";}
function OpenAboutPage(AboutPageUrl)
{
var LeftPos;
var TopPos;
var w=640;
var h=480;
LeftPos=(screen.width)?(screen.width-w)/2:100;
TopPos=(screen.height)?(screen.height-h)/2:100;
window.open(AboutPageUrl,null,'fullscreen=no, toolbar=no,width = '+w+' ,height = '+h+' , resizable = yes, status = no,titlebar = no, menubar=no,location=no, left = '+LeftPos+' ,top = '+TopPos);}
function FCKUpdateLinkedField(id)
{
try
{
if(typeof(FCKeditorAPI)=="object")
{
FCKeditorAPI.GetInstance(id).UpdateLinkedField();}}
catch(err)
{}}
function AjaxRefresh(){
if(postbackcall!=null)
var statements=postbackcall.split(";");
for(var i=0;i<statements.length;i++){
eval(statements[i]);}
YAHOO.util.Dom.get('__lazyLoading').value='';}
var dialog;
var dialogMod;
var dialogNotMod;
var currentPath;
var dialogIframe;
var dialogLoading;
var dialogCaller;
var prevCaller;
var postbackcall;
var timeoutID;
function showDialog(callerid,title,path,postback){
if(!dialog){
dialog=new Ext.Window({
width:800,
height:600,
minWidth:400,
minHeight:200,
contentEl:"markup-win",
modal:false,
stateful:true,
constrain:false,
maximizable:true,
closeAction:'hide',
bodyStyle:'background-color:white;',
keys:[{
key:27,
fn:function(){
dialog.hide();}}]});
dialog.on('minimize',function(){
dialog.toggleCollapse();});
dialogIframe=document.getElementById('normal-iframe-dlg');
dialogLoading=document.getElementById('normal-dlg-loading');
dialog.addListener("beforeshow",IframeBeforeShow);
dialog.addListener("show",IframeShow);
dialog.addListener("hide",IframeHide);}
if(dialogCaller)
$(dialogCaller).removeClass("frmselected");
dialogCaller=document.getElementById(callerid);
if(prevCaller==null)
prevCaller=dialogCaller;
if(document.all){
dialogIframe.onreadystatechange=IframeStateChangeIE;}
else{
timeoutID=window.setTimeout(IframeStateChange,1500);}
postbackcall=postback;
currentPath=path;
dialog.setTitle(title);
if(dialog.isVisible()==true){
dialog.hide();
dialog.addListener("hide",IframeShowOnce);}
else
dialog.show(dialogCaller.id);}
function showDialog(callerid,title,path,postback,isModal){
if(isModal=='true'){
if(!dialogMod){
dialogMod=new Ext.Window({
width:800,
height:600,
minWidth:400,
minHeight:200,
contentEl:"markup-win",
modal:true,
stateful:true,
constrain:false,
maximizable:true,
closeAction:'hide',
bodyStyle:'background-color:white;',
keys:[{
key:27,
fn:function(){
dialog.hide();}}]});}
dialog=dialogMod;}
else{
if(!dialogNotMod){
dialogNotMod=new Ext.Window({
width:800,
height:600,
minWidth:400,
minHeight:200,
contentEl:"markup-win",
modal:false,
stateful:true,
constrain:false,
maximizable:true,
closeAction:'hide',
bodyStyle:'background-color:white;',
keys:[{
key:27,
fn:function(){
dialog.hide();}}]});}
dialog=dialogNotMod;}
dialog.on('minimize',function(){
dialog.toggleCollapse();});
dialogIframe=document.getElementById('normal-iframe-dlg');
dialogLoading=document.getElementById('normal-dlg-loading');
dialog.addListener("beforeshow",IframeBeforeShow);
dialog.addListener("show",IframeShow);
dialog.addListener("hide",IframeHide);
if(dialogCaller)
$(dialogCaller).removeClass("frmselected");
dialogCaller=document.getElementById(callerid);
if(prevCaller==null)
prevCaller=dialogCaller;
if(document.all){
dialogIframe.onreadystatechange=IframeStateChangeIE;}
else{
timeoutID=window.setTimeout(IframeStateChange,1500);}
postbackcall=postback;
currentPath=path;
dialog.setTitle(title);
if(dialog.isVisible()==true){
dialog.hide();
dialog.addListener("hide",IframeShowOnce);}
else
dialog.show(dialogCaller.id);}
function IframeHide(){
if(dialogCaller)
$(dialogCaller).removeClass("frmselected");
return true;}
function IframeShowOnce(){
dialog.removeListener("hide",IframeShowOnce);
window.setTimeout(DialogShowOnce,50);
return true;}
function DialogShowOnce(){
dialog.show(dialogCaller.id);}
function IframeBeforeShow(){
if(dialogLoading!=null){
dialogLoading.style.display="block";
dialogIframe.style.display="none";}
$(dialogCaller).addClass("frmselected");
return true;}
function IframeStateChange(){
dialogIframe.style.display="block";
dialogLoading.style.display="none";
window.clearTimeout(timeoutID);}
function IframeStateChangeIE(){
if(dialogIframe!=null){
if(dialogIframe.readyState=='complete'){
dialogIframe.style.display="block";
dialogLoading.style.display="none";}}
return true;}
function IframeShow(){
if(dialogIframe!=null&&currentPath!=null)
dialogIframe.src=currentPath;
return true;}
function MepRemoveHtmlElement(elementclientId){
var _el=YAHOO.util.Dom.get(elementclientId);
if(_el){
_el.outerHTML='';}}
function RegisterYuiHorizontalMenu(menuid){
YAHOO.example.onMenuBarReady=function(p_oEvent){
var oMenuBar=new YAHOO.widget.MenuBar(menuid,{autosubmenudisplay:true,hidedelay:750,lazyload:true,iframe:true});
oMenuBar.render();
oMenuBar.cfg.setProperty("iframe",true);};
YAHOO.util.Event.addListener(window,"load",YAHOO.example.onMenuBarReady);}
function RegisterYuiVerticalMenu(menuid){
YAHOO.example.onMenuReady=function(p_oEvent){
var oMenu=new YAHOO.widget.Menu(
menuid,
{
position:"static",
hidedelay:750,
lazyload:true,
iframe:true});
oMenu.render();
oMenu.cfg.setProperty("iframe",true);};
YAHOO.util.Event.addListener(window,"load",YAHOO.example.onMenuReady);}
function RegisterYuiVerticalMenuWithAnimation(menuid){
YAHOO.example.onMenuAnimReady=function(p_oEvent){
var oMenu=new YAHOO.widget.Menu(
menuid,
{
position:"static",
hidedelay:750,
lazyload:true,
iframe:true,
effect:{
effect:YAHOO.widget.ContainerEffect.FADE,
duration:0.25}});
oMenu.render();
oMenu.cfg.setProperty("iframe",true);};
YAHOO.util.Event.addListener(window,"load",YAHOO.example.onMenuAnimReady);}
function RegisterYuiHorizontalMenuWithAnimation(menuid){
YAHOO.example.onMenuBarAnimReady=function(p_oEvent){
var oAnim;
function setupMenuAnimation(p_oMenu){
if(!p_oMenu.animationSetup){
var aItems=p_oMenu.getItemGroups();
if(aItems&&aItems[0]){
var i=aItems[0].length-1;
var oSubmenu;
do{
oSubmenu=p_oMenu.getItem(i).cfg.getProperty("submenu");
if(oSubmenu){
oSubmenu.beforeShowEvent.subscribe(onMenuBeforeShow,oSubmenu,true);
oSubmenu.showEvent.subscribe(onMenuShow,oSubmenu,true);}}
while(i--);}
p_oMenu.animationSetup=true;}}
function onMenuBeforeShow(p_sType,p_sArgs,p_oMenu){
if(oAnim&&oAnim.isAnimated()){
oAnim.stop();
oAnim=null;}
YAHOO.util.Dom.setStyle(this.element,"overflow","hidden");
YAHOO.util.Dom.setStyle(this.body,"marginTop",("-"+this.body.offsetHeight+"px"));}
function onMenuShow(p_sType,p_sArgs,p_oMenu){
oAnim=new YAHOO.util.Anim(
this.body,
{marginTop:{to:0}},.5,
YAHOO.util.Easing.easeOut);
oAnim.animate();
var me=this;
function onTween(){
me.cfg.refireEvent("iframe");}
function onAnimationComplete(){
YAHOO.util.Dom.setStyle(me.body,"marginTop",("0px"));
YAHOO.util.Dom.setStyle(me.element,"overflow","visible");
setupMenuAnimation(me);}
if(this.cfg.getProperty("iframe")==true){
oAnim.onTween.subscribe(onTween);}
oAnim.onComplete.subscribe(onAnimationComplete);}
function onMenuRender(p_sType,p_sArgs,p_oMenu){
setupMenuAnimation(p_oMenu);}
var oMenuBar=new YAHOO.widget.MenuBar(menuid,{autosubmenudisplay:true,hidedelay:750,lazyload:true,iframe:true});
oMenuBar.renderEvent.subscribe(onMenuRender,oMenuBar,true);
oMenuBar.render();
oMenuBar.cfg.setProperty("iframe",true);};
YAHOO.util.Event.addListener(window,"load",YAHOO.example.onMenuBarAnimReady);}
function MepPopUp(buttonId,popUpDiv,popUpContainer){
this.buttonId=buttonId;
this.popUpDiv=popUpDiv;
this.popUpContainer=popUpContainer;}
function OpenPopUp(p_oEvent,obj){
var button=document.getElementById(obj.buttonId);
var _prop=new Object();
_prop.x=20;
_prop.y=20;
_prop.hidedelay=50;
_prop.constraintoviewport=false;
_prop.iframe=true;
var oMenu=new YAHOO.widget.Menu(obj.popUpDiv,_prop);
oMenu.srcElement.style.display="block";
oMenu.render();
if(obj.popUpContainer!=null){
var _popUpContainer=document.getElementById(obj.popUpContainer);
_popUpContainer.style.position="absolute";
_popUpContainer.style.top="0px";
_popUpContainer.style.left="0px";
_popUpContainer.style.display="block";
_popUpContainer.style.zIndex=1000;}
function MepMenuToggleMouseDown(p_oEvent){
YAHOO.util.Event.stopPropagation(p_oEvent);
var pt=new mepMenuPt(button);
var posX=pt.left+button.offsetWidth-3;
var posY=pt.top+button.offsetHeight;
var div=document.getElementById(obj.popUpDiv);
oMenu.cfg.setProperty("x",posX-div.offsetWidth+15);
var screenh=document.body.clientHeight;
var screenw=document.body.clientWidth;
if((p_oEvent.clientX+div.offsetWidth)>screenw){
oMenu.cfg.setProperty("submenualignment",["tr","tl"]);}
if((p_oEvent.clientY+10+div.offsetHeight)>screenh){
oMenu.cfg.setProperty("y",posY-div.offsetHeight);}
else{
oMenu.cfg.setProperty("y",posY);}
oMenu.srcElement.style.position="absolute";
oMenu.srcElement.style.left=oMenu.cfg.getProperty("x");
oMenu.srcElement.style.top=oMenu.cfg.getProperty("y");
oMenu.show();}
YAHOO.util.Event.addListener(obj.buttonId,"click",MepMenuToggleMouseDown);}
function OpenPopUpNEW(p_oEvent,obj){
var button=document.getElementById(obj.buttonId);
var _prop=new Object();
_prop.hidedelay=50;
_prop.constraintoviewport=false;
_prop.iframe=true;
var oMenu=YAHOO.widget.MenuManager.getMenu(obj.popUpDiv);
if(oMenu!=null){
if(oMenu.srcElement.innerHTML==''){
ResetMenu(obj.popUpDiv);
oMenu=null;}}
if(oMenu==null){
oMenu=new YAHOO.widget.Menu(obj.popUpDiv,_prop);
oMenu.srcElement.style.display="block";
oMenu.render();
if(obj.popUpContainer!=null){
var _popUpContainer=document.getElementById(obj.popUpContainer);
_popUpContainer.style.position="absolute";
_popUpContainer.style.display="block";
_popUpContainer.style.zIndex=1000;}}
YAHOO.util.Event.stopPropagation(p_oEvent);
var div=document.getElementById(obj.popUpDiv);
var screenh=document.body.clientHeight;
var screenw=document.body.clientWidth;
if((p_oEvent.clientX+div.offsetWidth+70)>screenw){
oMenu.cfg.setProperty("submenualignment",["tr","tl"]);}
oMenu.srcElement.style.top=0;
if((p_oEvent.clientY+10+div.offsetHeight)>screenh){
oMenu.srcElement.style.top=-div.offsetHeight-15;}
oMenu.srcElement.style.left=-div.offsetWidth+20;
oMenu.show();}
function ResetMenu(popUpDiv){
var oldMenu=YAHOO.widget.MenuManager.getMenu(popUpDiv);
if(oldMenu!=null)
YAHOO.widget.MenuManager.removeMenu(oldMenu);}
function MepSetPopUp(obj){
YAHOO.util.Event.removeListener(obj.buttonId,'click',OpenPopUpNEW);
YAHOO.util.Event.addListener(obj.buttonId,'click',OpenPopUpNEW,obj);}
function InitializeControlPanel(p_oEvent,obj){
var button=document.getElementById(obj.buttonId);
var inside=0;
var timeout;
var _prop=new Object();
_prop.hidedelay=50;
_prop.trigger=document;
_prop.constraintoviewport=false;
_prop.iframe=true;
_prop.x=20;
_prop.y=20;
var oMenu=new YAHOO.widget.ContextMenu(obj.popUpDiv,_prop);
oMenu.srcElement.style.display="block";
oMenu.render();
if(obj.popUpContainer!=null){
var _popUpContainer=document.getElementById(obj.popUpContainer);
_popUpContainer.style.position="absolute";
_popUpContainer.style.display="block";
_popUpContainer.style.zIndex=1000;}
function MepMenuToggleMouseMove(p_oEvent){
if(timeout!=null)
clearTimeout(timeout);
inside=0;
YAHOO.util.Event.stopPropagation(p_oEvent);
var pts=YAHOO.util.Dom.getXY(button);
var posX=pts[0];
var posY=pts[1]+button.offsetHeight;
oMenu.cfg.setProperty("X",posX);
oMenu.cfg.setProperty("y",posY);
oMenu.show();}
function MepMenuMouseOut(p_oEvent){
timeout=window.setTimeout(CloseMenu,700);}
function MepMenuMouseOver(p_oEvent){
inside=1;}
function CloseMenu(p_oEvent){
if(inside==0)
oMenu.hide();}
YAHOO.util.Event.addListener(obj.buttonId,"mouseout",MepMenuMouseOut);
YAHOO.util.Event.addListener(obj.buttonId,"mousemove",MepMenuToggleMouseMove);
YAHOO.util.Event.addListener(oMenu.srcElement,"mouseover",MepMenuMouseOver);}
function OpenControlPanelPopUp(obj){
OpenPopUpNEW(obj);}
function mepMenuPt(el)
{
this.left=0;
this.top=0;
while(el)
{
this.left+=el.offsetLeft;
this.top+=el.offsetTop;
el=el.offsetParent;}}
EnableExtCookieProvider();
function EnableExtCookieProvider(){
if(Ext){
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Ext.Component.prototype.stateful=false;}}
function printSelection(node){
var content=node.innerHTML
var pwin=window.open('','print_content','width=10,height=10');
pwin.document.open();
pwin.document.write('<html><body onload="window.print()">'+content+'</body></html>');
pwin.document.close();
setTimeout(function(){pwin.close();},1000);}
function pageLoaded(sender,args){
var updatedPanels=args.get_panelsUpdated();
visualUpdate(postBackElementID,updatedPanels,'effect');}
function visualUpdate(elementId,elements,effectClassName){
var source=YAHOO.util.Dom.get(postBackElementID);
if(source==null)
return;
var element;
var attributes;
var anim;
var effect;
var region;
var id;
for(i=0;i<elements.length;i++){
element=elements[i];
if(element.id!='UpdateAlwaysPanel'){
effect=document.createElement("div");
id=YAHOO.util.Dom.generateId(effect,effectClassName);
region=YAHOO.util.Dom.getRegion(elementId);
YAHOO.util.Dom.addClass(effect,effectClassName);
YAHOO.util.Dom.setStyle(effect,'x',region.left);
YAHOO.util.Dom.setStyle(effect,'y',region.top);
YAHOO.util.Dom.setStyle(effect,'width',region.right-region.left+'px');
YAHOO.util.Dom.setStyle(effect,'height',region.bottom-region.top+'px');
document.body.appendChild(effect);
YAHOO.util.Dom.setX(effect,region.left);
YAHOO.util.Dom.setY(effect,region.top);
attributes={
points:{
to:YAHOO.util.Dom.getXY(element.id)},
opacity:{from:0,to:30},
width:{to:element.offsetWidth},
height:{to:element.offsetHeight}};
anim=new YAHOO.util.Motion(id,attributes,0.4,YAHOO.util.Easing.easeInStrong);
anim.onComplete.subscribe(fadeOut,effect);
anim.animate();}}}
fadeOut=function(eventName,duration,element){
var anim=new YAHOO.util.Anim(element.id,{opacity:{to:0}},0.1,YAHOO.util.Easing.easeOut);
anim.onComplete.subscribe(destroy,element);
anim.animate();}
destroy=function(eventName,duration,element){
document.body.removeChild(element);
element=null;}
// 05/09/2010 19.11.52