var vSwitch_Menu = 1;
-var FrameSize = (parent.document.getElementById('menuframe').cols);
+var Frame;
+var FrameSize;
-function Switch_Menu()
-{
- if (vSwitch_Menu)
- {
- vSwitch_Menu=false;
- parent.document.getElementById('menuframe').setAttribute('cols','30,*');
- }
- else
- {
- vSwitch_Menu=true;
- parent.document.getElementById('menuframe').setAttribute('cols',FrameSize);
- }
- return;
+function Switch_Menu() {
+ if (Frame) {
+ Frame.attr('cols',vSwitch_Menu ? '30,*' : FrameSize);
+ vSwitch_Menu=!vSwitch_Menu;
+ }
}
+
+$(function(){
+ Frame = $(parent.document.getElementById('menuframe'));
+ FrameSize = Frame.attr('cols');
+})