// We define the function first
function LogoMapControl() {
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
LogoMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
LogoMapControl.prototype.initialize = function(map) {
  var logo = new Element("div", {'ID':'logo', 'STYLE':'z-index: 100'});
  GEvent.addDomListener(logo, "click", function() {
    //main.jumpToMe();
  });

  map.getContainer().appendChild(logo);
  return logo;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
LogoMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10, 10));
}

// We define the function first
function ContentMapControl(content) {
	me = this;
	this.content = content;
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
ContentMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
ContentMapControl.prototype.initialize = function(map) {
  var div = new Element("div", {'ID':'page_content', 'STYLE':'z-index: 100; display:none;'});
  
  div.update(me.content);

  map.getContainer().appendChild(div);
  
  div.appear();
  
  return div;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
ContentMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(350, 80));
}


// We define the function first
function DivMapControl(ids, hideSlider) {
	this.ids = ids;
	this.hideSlider = hideSlider;
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
DivMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
DivMapControl.prototype.initialize = function(map) {

	var div = new Element("div");

	this.ids.each(function(id) {
		var box = new Element("div", {'CLASS': 'boxRight', 'ID':'boxRight'+id.capitalize()});
		var inner = new Element("div", {'ID':id});
		
		if (this.hideSlider || true)
			var boxTop = new Element("div", {'CLASS':'boxTop'});
		else
			var boxTop = new Element("div", {'CLASS':'boxTopUp'});
		
		var boxBg = new Element("div", {'CLASS':'boxBg', 'ID':'boxContent'+id.capitalize()});
		var boxBottom = new Element("div", {'CLASS':'boxBottom'});
		
		boxBg.appendChild(inner);
		
		box.appendChild(boxTop);
		box.appendChild(boxBg);
		box.appendChild(boxBottom);

		
		div.appendChild(box);
	});

  map.getContainer().appendChild(div);
  return div;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
DivMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10, 10));
}

// We define the function first
function FooterMapControl() {
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
FooterMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
FooterMapControl.prototype.initialize = function(map) {
  var box = new Element("div", {'ID': 'footer'});

  var mStart = new Element("div", {'CLASS':'start'});
  var mBlue = new Element("div", {'CLASS':'blue', 'ID':'footerBlue'});
  var mBreak = new Element("div", {'CLASS':'break'});
  var mGreen = new Element("div", {'CLASS':'green', 'ID':'footerGreen'});
  var mEnd = new Element("div", {'CLASS':'end'});
  
  box.appendChild(mStart);
  box.appendChild(mBlue);
  box.appendChild(mBreak);
  box.appendChild(mGreen);
  box.appendChild(mEnd);
  
  map.getContainer().appendChild(box);
  return box;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
FooterMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10, 10));
}

// We define the function first
function MenuMapControl() {
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
MenuMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
MenuMapControl.prototype.initialize = function(map) {
  var box = new Element("div", {'ID': 'header'});

  var mStart = new Element("div", {'CLASS':'start'});
  var mBlue = new Element("div", {'CLASS':'blue', 'ID':'menuStart'});
  var mBreak = new Element("div", {'CLASS':'break'});
  var mGray = new Element("div", {'CLASS':'gray', 'ID':'menuNavi'});
  var mEnd = new Element("div", {'CLASS':'end'});
  
  box.appendChild(mStart);
  box.appendChild(mBlue);
  box.appendChild(mBreak);
  box.appendChild(mGray);
  box.appendChild(mEnd);
  
  map.getContainer().appendChild(box);
  return box;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
MenuMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10, 10));
}


// We define the function first
function MessageMapControl() {
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object
MessageMapControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. 
MessageMapControl.prototype.initialize = function(map) {
  var box = new Element("div", {'ID': 'system_messages', 'STYLE':'z-index: 110; display:none;'});
  map.getContainer().appendChild(box);
  return box;
}

// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
MessageMapControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10, 10));
}

