//==================================================================
//	Create BUTTON class
//==================================================================


//------------------------------------------------------------------
//	class
//------------------------------------------------------------------
function xMMS_BUTTON(){
	//--------------------------------------------------------------
	// variables
	//--------------------------------------------------------------
		var isIE			= false;
		var jumpToDisplay	= "";
		var jumpToFile		= "";


	//--------------------------------------------------------------
	// arrays
	//--------------------------------------------------------------
		

	//--------------------------------------------------------------
	// constructor
	//--------------------------------------------------------------
		if(window.ActiveXObject){isIE = true;}

		//------------------------------------------------
		//	add and set SUBMIT button
		//------------------------------------------------
		this.addSubmit = function(){
			this.SUBMIT = getObject("Button");

			if(!getObject("jump")){

			// create elements and ready for append
			//---------------------------------------------
					if(isIE){
						//	this is for IE
						//	IE 5.5 and 6 cannot append additional data 
						//	at a later state, so a blank one is created for now!
						//---------------------------------------------
						var OBJ = document.createElement("<input type='button' name='jump' id='jump' value='GO!' style='height:18px;' onclick='goURL()'>");
					} 
					else{
						//	catch all (any other browser)
						//---------------------------------------------
						var OBJ = document.createElement('input');
						OBJ.setAttribute("type", 'button');
						OBJ.setAttribute("name", 'jump');
						OBJ.setAttribute("id", 'jump');
						OBJ.setAttribute("value", 'GO!');
						OBJ.setAttribute("style", "height:18px;");
						OBJ.setAttribute("onclick", "goURL()");
					}
					//	append the parent with the newly created object
					//	object created is assigned above with OBJ
					//	SUBMIT is assigned in setGlobals
					//-------------------------------------------------
					this.SUBMIT.appendChild(OBJ);


					//	first time run
					//	disabled = true
					//-------------------------------------------------
					OBJ.disabled = true;
					OBJ.style.visbility = 'hidden';
					OBJ.style.display = 'none';
			}
		}

		this.setURL = function(jumpToDisplay, jumpToFile){
			OBJ = getObject("jump");
			OBJ.disabled			= false;
			//OBJ.value				= "Go to - " +  jumpToDisplay;
			//OBJ.style.visbility		= 'visible';
			//OBJ.style.display		= 'block';

			this.jumpToDisplay		= jumpToDisplay;
			this.jumpToFile			= jumpToFile;

			//	usefull alert tracing alert
			//-------------------------------------------
			altTXT = "setURL() vars\n";
			altTXT += "--------------------------\n";
			altTXT += "TXT:\t" + this.jumpToDisplay + "\n";
			altTXT += "XML:\t" + this.jumpToFile + "\n";

			//alert(altTXT)
		}

		this.goURL = function(){
			//	usefull alert tracing alert
			//-------------------------------------------
			altTXT = "goURL() vars\n";
			altTXT += "--------------------------\n";
			altTXT += "TXT:\t" + this.jumpToDisplay + "\n";
			altTXT += "XML:\t" + this.jumpToFile + "\n";

			alert(altTXT)
		}
}

//==================================================================
//	Other DOM and MISC functions
//==================================================================


//------------------------------------------------
//	jump navigation
//------------------------------------------------
function goURL(){
	xBUTTON.goURL();
}