function MenuOn(x){ 
	obj=document.getElementById("submenu"+x).style.visibility="visible";
}

function MenuOff(x){ 
	obj=document.getElementById("submenu"+x).style.visibility="hidden"; 
}



            
$(document).ready(
	function() {
	  $('#windowOpen').bind(
			'click',
			function() {
			  if ($('#window').css('display') == 'none') {
			    $(this).TransferTo(
						{
						  to: 'window',
						  className: 'transferer2',
						  duration: 600,
						  complete: function() {
						    $('#window').show();
						  }
						}
					);
			  }
			  this.blur();
			  return false;
			}
		);
	  $('#windowClose').bind(
			'click',
			function() {
			  $('#window').TransferTo(
					{
					  to: 'windowOpen',
					  className: 'transferer2',
					  duration: 600
					}
				).hide();
			}
		);
	  $('#windowMin').bind(
			'click',
			function() {
			  $('#windowContent').SlideToggleUp(400);
			  $('#windowBottom, #windowBottomContent').animate({ height: 10 }, 400);
			  $('#window').animate({ height: 40 }, 400).get(0).isMinimized = true;
			  $(this).hide();
			  $('#windowResize').hide();
			  $('#windowMax').show();
			}
		);
	  $('#windowMax').bind(
			'click',
			function() {
			  var windowSize = $.iUtil.getSize(document.getElementById('windowContent'));
			  $('#windowContent').SlideToggleUp(400);
			  $('#windowBottom, #windowBottomContent').animate({ height: windowSize.hb + 13 }, 400);
			  $('#window').animate({ height: windowSize.hb + 43 }, 400).get(0).isMinimized = false;
			  $(this).hide();
			  $('#windowMin, #windowResize').show();
			}
		);
	  $('#window').Resizable(
			{
			  minWidth: 200,
			  minHeight: 60,
			  maxWidth: 700,
			  maxHeight: 700,
			  dragHandle: '#windowTop',
			  handlers: {
			    se: '#windowResize'
			  },
			  onResize: function(size, position) {
			    $('#windowBottom, #windowBottomContent').css('height', size.height - 33 + 'px');
			    var windowContentEl = $('#windowContent').css('width', size.width - 25 + 'px');
			    if (!document.getElementById('window').isMinimized) {
			      windowContentEl.css('height', size.height - 48 + 'px');
			    }
			  }
			}
		);
	}
);


$(document).ready(
	function() {
	  $('#windowOpen002').bind(
			'click',
			function() {
			  if ($('#window002').css('display') == 'none') {
			    $(this).TransferTo(
						{
						  to: 'window002',
						  className: 'transferer2',
						  duration: 600,
						  complete: function() {
						    $('#window002').show();
						  }
						}
					);
			  }
			  this.blur();
			  return false;
			}
		);
	  $('#windowClose002').bind(
			'click',
			function() {
			  $('#window002').TransferTo(
					{
					  to: 'windowOpen002',
					  className: 'transferer2',
					  duration: 600
					}
				).hide();
			}
		);
	  $('#windowMin002').bind(
			'click',
			function() {
			  $('#windowContent002').SlideToggleUp(300);
			  $('#windowBottom002, #windowBottomContent002').animate({ height: 10 }, 300);
			  $('#window002').animate({ height: 40 }, 300).get(0).isMinimized = true;
			  $(this).hide();
			  $('#windowResize002').hide();
			  $('#windowMax002').show();
			}
		);
	  $('#windowMax002').bind(
			'click',
			function() {
			  var windowSize = $.iUtil.getSize(document.getElementById('windowContent002'));
			  $('#windowContent002').SlideToggleUp(300);
			  $('#windowBottom002, #windowBottomContent002').animate({ height: windowSize.hb + 13 }, 300);
			  $('#window002').animate({ height: windowSize.hb + 43 }, 300).get(0).isMinimized = false;
			  $(this).hide();
			  $('#windowMin002, #windowResize002').show();
			}
		);
	  $('#window002').Resizable(
			{
			  minWidth: 200,
			  minHeight: 60,
			  maxWidth: 700,
			  maxHeight: 700,
			  dragHandle: '#windowTop002',
			  handlers: {
			    se: '#windowResize002'
			  },
			  onResize: function(size, position) {
			    $('#windowBottom002, #windowBottomContent002').css('height', size.height - 33 + 'px');
			    var windowContentEl = $('#windowContent002').css('width', size.width - 25 + 'px');
			    if (!document.getElementById('window002').isMinimized) {
			      windowContentEl.css('height', size.height - 48 + 'px');
			    }
			  }
			}
		);
	}
);
         
		 
		 
$(document).ready(
	function() {
	  $('#windowOpen003').bind(
			'click',
			function() {
			  if ($('#window003').css('display') == 'none') {
			    $(this).TransferTo(
						{
						  to: 'window003',
						  className: 'transferer2',
						  duration: 600,
						  complete: function() {
						    $('#window003').show();
						  }
						}
					);
			  }
			  this.blur();
			  return false;
			}
		);
	  $('#windowClose003').bind(
			'click',
			function() {
			  $('#window003').TransferTo(
					{
					  to: 'windowOpen003',
					  className: 'transferer2',
					  duration: 600
					}
				).hide();
			}
		);
	  $('#windowMin003').bind(
			'click',
			function() {
			  $('#windowContent003').SlideToggleUp(300);
			  $('#windowBottom003, #windowBottomContent003').animate({ height: 10 }, 300);
			  $('#window003').animate({ height: 40 }, 300).get(0).isMinimized = true;
			  $(this).hide();
			  $('#windowResize003').hide();
			  $('#windowMax003').show();
			}
		);
	  $('#windowMax003').bind(
			'click',
			function() {
			  var windowSize = $.iUtil.getSize(document.getElementById('windowContent003'));
			  $('#windowContent003').SlideToggleUp(300);
			  $('#windowBottom003, #windowBottomContent003').animate({ height: windowSize.hb + 13 }, 300);
			  $('#window003').animate({ height: windowSize.hb + 43 }, 300).get(0).isMinimized = false;
			  $(this).hide();
			  $('#windowMin003, #windowResize003').show();
			}
		);
	  $('#window003').Resizable(
			{
			  minWidth: 200,
			  minHeight: 60,
			  maxWidth: 700,
			  maxHeight: 700,
			  dragHandle: '#windowTop003',
			  handlers: {
			    se: '#windowResize003'
			  },
			  onResize: function(size, position) {
			    $('#windowBottom003, #windowBottomContent003').css('height', size.height - 33 + 'px');
			    var windowContentEl = $('#windowContent003').css('width', size.width - 25 + 'px');
			    if (!document.getElementById('window003').isMinimized) {
			      windowContentEl.css('height', size.height - 48 + 'px');
			    }
			  }
			}
		);
	}
);


$(document).ready(
	function() {
	  $('#windowOpen004').bind(
			'click',
			function() {
			  if ($('#window004').css('display') == 'none') {
			    $(this).TransferTo(
						{
						  to: 'window004',
						  className: 'transferer2',
						  duration: 600,
						  complete: function() {
						    $('#window004').show();
						  }
						}
					);
			  }
			  this.blur();
			  return false;
			}
		);
	  $('#windowClose004').bind(
			'click',
			function() {
			  $('#window004').TransferTo(
					{
					  to: 'windowOpen004',
					  className: 'transferer2',
					  duration: 600
					}
				).hide();
			}
		);
	  $('#windowMin004').bind(
			'click',
			function() {
			  $('#windowContent004').SlideToggleUp(300);
			  $('#windowBottom004, #windowBottomContent004').animate({ height: 10 }, 300);
			  $('#window004').animate({ height: 40 }, 300).get(0).isMinimized = true;
			  $(this).hide();
			  $('#windowResize004').hide();
			  $('#windowMax004').show();
			}
		);
	  $('#windowMax004').bind(
			'click',
			function() {
			  var windowSize = $.iUtil.getSize(document.getElementById('windowContent004'));
			  $('#windowContent004').SlideToggleUp(300);
			  $('#windowBottom004, #windowBottomContent004').animate({ height: windowSize.hb + 13 }, 300);
			  $('#window004').animate({ height: windowSize.hb + 43 }, 300).get(0).isMinimized = false;
			  $(this).hide();
			  $('#windowMin004, #windowResize004').show();
			}
		);
	  $('#window004').Resizable(
			{
			  minWidth: 200,
			  minHeight: 60,
			  maxWidth: 700,
			  maxHeight: 700,
			  dragHandle: '#windowTop004',
			  handlers: {
			    se: '#windowResize004'
			  },
			  onResize: function(size, position) {
			    $('#windowBottom004, #windowBottomContent004').css('height', size.height - 33 + 'px');
			    var windowContentEl = $('#windowContent004').css('width', size.width - 25 + 'px');
			    if (!document.getElementById('window004').isMinimized) {
			      windowContentEl.css('height', size.height - 48 + 'px');
			    }
			  }
			}
		);
	}
);
