function abs_height(){
	if (ie4) return parseInt(document.all[this.LA_name].scrollHeight);
	if (ns4)	return this.document.height;
	if (ns6) return document.getElementById(this.LA_name).offsetHeight;
	
}

function abs_width(){
	if (ie4) return parseInt(document.all[this.LA_name].offsetWidth);
	if (ns4)	return this.document.width;
	if (ns6) return document.getElementById(this.LA_name).offsetWidth;
}

function abs_left(){
	if (ie4) return parseInt(document.all[this.LA_name].offsetLeft);
	if (ns4)	return this.pageX;
	if (ns6) return document.getElementById(this.LA_name).offsetLeft;
}

function abs_top(){
	if (ie4) return parseInt(document.all[this.LA_name].offsetTop);
	if (ns4)	return this.pageY;
	if (ns6) return document.getElementById(this.LA_name).offsetTop;
}


function lay_obj_clip(ip_l,ip_r,ip_t,ip_b){
	if (ns4){
		if (ip_l!="auto") this.clip.left = ip_l;
		if (ip_r!="auto") this.clip.right = ip_r;	
		if (ip_t!="auto") this.clip.top = ip_t;
		if (ip_b!="auto") this.clip.bottom = ip_b;
	}
	if (ie ||ns6 ){
	 this.clip="rect("+ip_t+","+ip_r+","+ip_b+","+ip_l+")";
	 
	 }
}

function lay_obj_write(ip_str){
	if (ie4) document.all[this.LA_name].innerHTML = ip_str;
	if (ns4){
		this.document.open();	
		this.document.write(ip_str);	
		this.document.close();
	}
	if (ns6) document.getElementById(this.LA_name).innerHTML = ip_str;
}

function get_layer(ip_name,ip_z_index){
	var lay_obj;
	
	if (ie4){
		if (!document.all[ip_name]) return false;
		lay_obj=document.all[ip_name].style;
	}
	if (ns4){
		if (!document.layers[ip_name]) return false;
		lay_obj=document.layers[ip_name];
	}
	if (ns6){
		if (!document.getElementById(ip_name)) return false;
		lay_obj=document.getElementById(ip_name).style;
	}
	if (lay_obj){
		lay_obj.LA_name = ip_name;
		lay_obj.LA_write = lay_obj_write;
		if (ie4) lay_obj.name = ip_name;
		lay_obj.LA_height = abs_height;
		lay_obj.LA_left = abs_left;
		lay_obj.LA_top = abs_top;
		lay_obj.LA_width = abs_width;
		lay_obj.LA_clip = lay_obj_clip;
		lay_obj.LA_top_start = parseInt(lay_obj.top);
		lay_obj.LA_left_start = parseInt(lay_obj.left);
		if (ie4) lay_obj.layer =  document.all[ip_name];
		if (ns4) lay_obj.layer =  document.layers[ip_name];
		if (ns6) lay_obj.layer= document.getElementById(ip_name);
	}
	return lay_obj;
}

var	ns4=false;
var ie4=false;
var ns6=false;

function DetectBrowser()
{
if ( navigator.appName == 'Netscape' && document.layers != null) { ns4 = true } else if ( document.all != null ) { ie4 = true };
ns6 = ( navigator.userAgent.indexOf("Gecko") > 0 ) ? true:false

}

DetectBrowser();