Ext.override(Ext.dd.DragSource,{afterDragDrop:function(c,b,d){save_layout.call(mainPortal);
leftSidePortal=Ext.select("div.x-portal-column").first();
rightSidePortal=Ext.select("div.x-portal-column").last();
var a=this.el.dom.parentNode.id==leftSidePortal.dom.id?"left":"right";
reArrangeAllBlocks(this.id,a);
setMainPortalHeight();
_gaq.push(["_trackEvent","Layout Event","Drag Portlet",this.el.dom.id])
},afterDragOver:function(c,b,f){leftSidePortal=Ext.select("div.x-portal-column").first();
rightSidePortal=Ext.select("div.x-portal-column").last();
if(document.getElementById("in-spacer1")!=null){var a;
var d=document.getElementById("in-spacer1").parentNode.parentNode.id;
if(d==leftSidePortal.dom.id){a=document.getElementById(leftSidePortal.dom.id).style.width;
a=parseInt(a)-10+"px"
}else{if(d==rightSidePortal.dom.id){a=document.getElementById(rightSidePortal.dom.id).style.width;
a=parseInt(a)-10+"px"
}}document.getElementById("in-spacer1").style.width=a
}}});
var makeNewLayout=function(){var b=0;
var a=0;
for(var c=0;
c<allBlocks.length;
c++){if(document.getElementById(allBlocks[c][0])!=null){if(allBlocks[c][1]=="left"){leftContentArray[b++]=allBlocks[c][0]
}if(allBlocks[c][1]=="right"){rightContentArray[a++]=allBlocks[c][0]
}}}drawPortalLayout()
};
alignComponentsOnRoutePageOnResize=function(){if(fromStationConverted!=null&&fromStationConverted.isExpanded()){fromStationConverted.fireEvent("windowResize",this)
}if(fromStationConverted!=null&&toStationConverted.isExpanded()){toStationConverted.fireEvent("windowResize",this)
}};
function alignDropDown(){this.list.alignTo(this.wrap,this.listAlign)
}var mainPortal;
var routePanel;
var leftSidePortal=null;
var rightSidePortal=null;
var jcheckContainerPanel;
var executionNumber=0;
var mainPortalParentDiv="";
var minHeightForPotal=screen.height;
var fromStationConverted,toStationConverted;
Ext.onReady(function(){if(executionNumber==0){executionNumber++;
if(Ext.isIE){minHeightForPotal=minHeightForPotal-450
}else{if(Ext.isSafari){minHeightForPotal=minHeightForPotal-400
}else{if(Ext.isOpera){minHeightForPotal=minHeightForPotal-390
}else{minHeightForPotal=minHeightForPotal-500
}}}getAllBlocks();
makeNewLayout();
fromStationConverted=new Ext.JC.CustomizedComboBox({triggerAction:"all",forceSelection:true,typeAhead:true,transform:"fromSelectBox",triggerClass:Ext.isSafari?"routeTrigger":"",width:routeSelectWidth,listWidth:routeListWidth,listAlign:"tl-bl",shadow:Ext.isIE9?false:true,listeners:{windowResize:alignDropDown,expand:alignDropDown}});
fromStationConverted.el.addListener("click",function a(){fromStationConverted.selectText()
},this);
toStationConverted=new Ext.JC.CustomizedComboBox({triggerAction:"all",forceSelection:true,typeAhead:true,transform:"toSelectBox",triggerClass:Ext.isSafari?"routeTrigger":"",width:routeSelectWidth,listWidth:routeListWidth,listAlign:"tl-bl",shadow:Ext.isIE9?false:true,listeners:{windowResize:alignDropDown,expand:alignDropDown}});
toStationConverted.el.addListener("click",function a(){toStationConverted.selectText()
},this)
}fixPng()
});
function onKeyPress(b){var a;
if(window.event){a=window.event.keyCode
}else{if(b){a=b.which
}else{return true
}}if(a==13){return false
}return true
}if(document.layers){document.captureEvents(Event.KEYPRESS)
}document.onkeypress=onKeyPress;
