﻿Type.registerNamespace("PEAB.Base");

PEAB.Base.GoogleMapCheckBox = function(element) {
	this.extenderID = null;
	PEAB.Base.GoogleMapCheckBox.initializeBase(this, [element]);
}

PEAB.Base.GoogleMapCheckBox.prototype =
{
	get_extenderID: function() {
		return this.extenderID;
	},

	set_extenderID: function(value) {
		this.extenderID = value;
	},

	initialize: function() {
		PEAB.Base.GoogleMapCheckBox.callBaseMethod(this, "initialize");
	},

	dispose: function() {
		PEAB.Base.GoogleMapCheckBox.callBaseMethod(this, "dispose");
	},

	click: function() {
		this.toggle();
		$find(this.extenderID).loadurl();
	},

	toggle: function() {
		if (this.get_element().checked) {
			$find(this.extenderID).remove(this.get_element().value);
		}

		PEAB.Base.GoogleMapCheckBox.callBaseMethod(this, "toggle");

		if (this.get_element().checked) {
			$find(this.extenderID).add(this.get_element().value);
		}
	}
}

PEAB.Base.GoogleMapCheckBox.registerClass("PEAB.Base.GoogleMapCheckBox", PEAB.Base.CheckBox);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();