//...................................................
//.............................JSAPIT TAMUGAIA DHTML SCRIPTS
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//					Compatible with IE6+, FF, Opera


/*

first, include the jsapit/jsapit.js file in the html file.
then you can use the funcs

*/



//------------------------------------------Functions for positioning
//Get coords, move them... bla bla
//----------------------------------------------------------------

//------------------------------------------Function to get x coord
function _x(_theObject){

	/*...........Arguments
	_theObject	[dhtml object id. string]
	.......................*/

	return parseInt(document.getElementById(_theObject).style.left);
}

//------------------------------------------Function to get x coord
function _y(_theObject){

	/*...........Arguments
	_theObject	[dhtml object id. string]
	.......................*/

	return parseInt(document.getElementById(_theObject).style.top);
}


//------------------------------------------Function to set coords
function _setxy(_theObject,_xpos,_ypos){

	/*...........Arguments
	_theObject	[dhtml object id. string]
	.......................*/

	document.getElementById(_theObject).style.left=_xpos;
	document.getElementById(_theObject).style.top=_ypos;
}


//------------------------------------------Function to move stuff
function _move(_theObject,_xmove,_ymove){

	/*...........Arguments
	_theObject	[dhtml object id. string]
	_xmove		[how many pixels on each horizontal move. integer]
	_ymove		[how many pixels on each vertical move. integer]
	.......................*/

	//............Move it Horizontally
	document.getElementById(_theObject).style.left=parseInt(document.getElementById(_theObject).style.left)+_xmove;

	//............Move it Vertically
	document.getElementById(_theObject).style.top=parseInt(document.getElementById(_theObject).style.top)+_ymove;
}






//------------------------------------------Function to enterframe
//Put anything you want to enterframe in here
//----------------------------------------------------------------

function enterframe(){
	
	/*...........External Vars
	ef_speed	[1=fastest] [1000=1second]
	.......................*/

	//..........Run the external ef_func
	ef_func.call();

	//..........Repeat the function
	setTimeout("enterframe()",ef_speed);


	/*...........Usage
	ef_speed=miliseconds interval integer
	ef_func=external function you defined, for the enterframe
	enterframe();

	Run the above after all dhtml elements in script tages
	................*/
}