var d = document;
function geID(el_id, obj){
	return obj.getElementById(el_id);
}
function geTN(el_tn, obj){
	return obj.getElementsByTagName(el_tn);
}
function geAT(el_at, obj){
	return obj.getAttribute(el_at);
}
function geTTN(el_tn, el_id, obj){
	return obj.getElementsByTagName(el_tn)[el_id];
}
function mousePoint(){
	d.body.style.cursor 															= 'pointer';
	return;
}
function mouseDefault(){
	d.body.style.cursor 															= 'default';
	return;
}
function nopx(what){
	return (what.replace(/px/gi,""))*1;
}
function trim(s)
{
  return s.replace(/^\s+|\s+$/, '');
} 
function nospace(s){
	var str = "";
	for(i=0;i<s.length;i++){
		if(s.charAt(i) != " "){
			str += s.charAt(i);
		}
	}
	return str;
}
function create_element(obj, etype, id, styles, actions, disp_id){
	var my_ele 																		= d.createElement(etype);
	var my_style 																	= styles.split(";");
	my_ele.id 																		= id;
	for(var i=0; i<my_style.length; i++){
		var my_props 																= my_style[i].split(":");
		my_ele.style[my_props[0]] 													= my_props[1];
	}
	obj.appendChild(my_ele);
}
function alphas(obj, amt){
	obj.style.opacity																= (obj.style.opacity*1) + (amt/100);
	obj.style.filter 																= "alpha(opacity="+((obj.style.opacity*100) + amt)+")";
}
function return_i(array, disp_id){
	for(var i = 0; i < array.length;i ++){
		if(array[i].disp_id == disp_id){
			return i;
		}
	}
	return false;
}
Array.prototype.remove = function(from, to) {
	var rest 																		= this.slice((to || from) + 1 || this.length);
	this.length 																	= from < 0 ? this.length + from : from;
	return this.push.apply(this, rest);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
