/**
 * @class PlayerModeControl
 * IE throws a fit if we attempt to do this Prototype's way, which is too bad because I like that so much more
 * This class adds the Small/Large buttons to the Google Map, and sets up the listeners on them 
 */
function PlayerModeControl() {};
PlayerModeControl.prototype = new GControl();

	/**
	 * This class adds the Small/Large buttons to the Google Map, and sets up the listeners on them 
	 * @constructor
	 * @member PlayerModeControl
	 */
    PlayerModeControl.prototype.initialize = function(map) {
        log('got in the player mode control');
        var container = document.createElement("div");
        
        var playerSpan = document.createElement("div");
        innerPlayer = document.createElement("div");
        playerSpan.className = "gmapControl";
        innerPlayer.className = "gmapControlSelected";
        playerSpan.style.right = "6em";

        innerPlayer.appendChild(document.createTextNode("Small"));
        GEvent.addDomListener(playerSpan, "click", function() {
            this.firstChild.className = "gmapControlSelected";
            this.nextSibling.firstChild.className = "gmapControlNotSelected";
            player.mc.enterPlayerMode();
        });
        playerSpan.appendChild(innerPlayer);


        var compactSpan = document.createElement("div");
        innerCompact = document.createElement("div");
        compactSpan.className = "gmapControl";
        innerCompact.className = "gmapControlNotSelected";

        innerCompact.appendChild(document.createTextNode("Large"));
        GEvent.addDomListener(compactSpan, "click", function() {
            this.firstChild.className = "gmapControlSelected";
            this.previousSibling.firstChild.className = "gmapControlNotSelected";
            player.mc.enterFullScreen();
        });
        compactSpan.appendChild(innerCompact);


        container.appendChild(playerSpan);
        container.appendChild(compactSpan);
        map.getContainer().appendChild(container);
        return container;
    }

	/**
	 * Gets the default position for the control, which is currently just below the map type controls
	 * @member PlayerModeControl
	 */
    PlayerModeControl.prototype.getDefaultPosition = function() {
        return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 33));
    }
