// JavaScript Document - GENERAL

<!--RANDOM-->
function random_nbr(min_nbr,max_nbr){
	return Math.round((Math.random() * (max_nbr - min_nbr)) + min_nbr);
}

<!--SHOW HIDE-->
function show_hide(Id){	
	obj_status = document.getElementById(Id).style.visibility;
	if(obj_status=="hidden"){document.getElementById(Id).style.visibility = "visible";}
	if(obj_status=="visible"){document.getElementById(Id).style.visibility = "hidden";}	
}

<!--LOAD PAGE-->
function load_page(new_location){
	window.location = new_location;
}

<!--CHANGE CLASS-->
function changeClass(object, newClass){
	object.className = newClass;
}

//---------------------------------------------------------------------------------------------------------------------------------------

function multipleOf(nbrX, nbrY){
	//if X is a multiple of Y return true
	nbr = nbrX/nbrY;
	nbrInteger = Math.floor(nbrX/nbrY);
	if(nbr==nbrInteger){
		//It's a round number, so it was a multiple
		return true;
	}
	else{return false;}

}

//---------------------------------------------------------------------------------------------------------------------------------------
function removeSpaces(string) {
	var tstring = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	return tstring;
}

/*
function defineTopLeft(w,h) {
	//defines the variable left and top when we wants to center a pop up
	var the_left = (screen.width - w) / 2;
	var the_top = (screen.height - h) / 2;
}
*/

