//
//
// Jump Menu Class
//
//
JumpMenu = function(){};
//
JumpMenu.prototype.init = function(id)
{
	this.id = id;
	this.setOnLoad(this, "create");
}
JumpMenu.prototype.setOnLoad = function(scope, func)
{
	if(window.addEventListener)
	{
		window.addEventListener('load', function(){ scope[func](); }, false);
	} else {
		window.attachEvent('onload', function(){ scope[func](); });
	}
}
JumpMenu.prototype.create = function()
{
	this.slct = document.getElementById(this.id);
	//debug.p(this.slct.id);
	this.setOnChange(this, "jumpMenu", "parent", 0);
}
JumpMenu.prototype.setOnChange = function(scope, func, targetWindow, restore)
{
	var callback = function(){ scope[func](targetWindow, restore); };
	//
	if(this.slct.addEventListener)
	{
		this.slct.addEventListener('change', callback, false);
	} else {
		this.slct.attachEvent('onchange', callback);
	}
}
JumpMenu.prototype.jumpMenu = function(targetWindow, restore)
{
	eval(targetWindow+".location='"+this.slct.options[this.slct.selectedIndex].value+"'");
	if (restore) this.slct.selectedIndex=0;
}
