	/********************************************************************************	
	// JAVASCRIPT SOURCE
	// Main Module of Standard and useful Function for DHTML object modelling.
	//                                    merge with heats technologies .:
	// .Light Version of original dHTML API - HEATS tech 2k1 by Matteo Ferretti
	********************************************************************************/
	
	var _by=1,_to=2;
	
	function browser(){
		function _interfaceSet(id){return new _setObject(id)}
		function _getPage(url,bNoExt){
			url=url.toLowerCase();
			var ofs=url.lastIndexOf("/")+1;
			if (ofs>0){
				url=url.substr(ofs,url.length-ofs);
				ofs=url.indexOf("?");
				ofs=((ofs>url.indexOf("#") && url.indexOf("#")>-1)?url.indexOf("#"):ofs);
				url=(ofs>=0)?url.substr(0,ofs):url;
				if (bNoExt) url=url.substr(0,url.lastIndexOf("."))
				return url;
			}
			return "";
		}
		var arrImg=[];
		function _preloadImg(){
			for(i=0; i<arguments.length;i++){
				arrImg[i]= new Image();
				arrImg[i].src=arguments[i];
			}
		}
		this.op=window.opera?1:0;
		this.ie=document.all?1:0;
		this.n=(navigator.appName=="Netscape")?1:0;
		this.dom=document.getElementById?1:0;
		this.op4=(this.op&&!window.moveTo)?1:0;
		this.op5=(this.op&&!window.print)?1:0;
		this.op6=(this.op&&window.print)?1:0;
		this.op7=(this.op&&document.createComment)?1:0;
		this.ns4=document.layers?1:0;
		this.ns5=(this.n && this.dom)?1:0;
		this.ie4=(this.ie && !this.dom)?1:0;
		this.ie5=(this.ie && this.dom)?1:0;

		this.isMac=navigator.userAgent.search(/mac/i)<0?0:1;
				
		this.set=_interfaceSet;
		this.getPage=_getPage;
		this.preloadImg=_preloadImg;
		
		return this;
	}
	
	function _ns_findDHTMLelement(id, ref) {
		ref=!ref?document.layers:ref;
		var _l=ref[id];	if (_l) return _l
		for (var i = 0; i < ref.length; i++)
	    	if (ref[i].layers.length > 0 && (_l = _ns_findDHTMLelement(id, ref[i].layers)) != null)
	        	return _l;
	  	return null;
	}
	
	function _setObject(id){
		function m_write(_string){		
			if (typeof(this.obj.innerHTML)!="undefined") 
				this.obj.innerHTML=_string;
			else if(bw.ns4){
				this.obj.document.open("text/html");
				this.obj.document.write(_string);
				this.obj.document.close();
			}
		}
		function m_move(x,y,method){method=!method?_to:method;this.css.left=this.x= ( (method==_to)?0:this.x)+ x;this.css.top=this.y=( (method==_to)?0:this.y)+ y;}
		function m_visible(bState){	if (typeof(bState)!="undefined") this.css.visibility=(bw.ns4)?(bState?"show":"hide"):(bState?"visible":"hidden"); return (this.css.visibility=="show"||this.css.visibility=="visible");}
		function m_setClip(t,r,b,l){if(bw.ns4){this.css.clip.top=t;this.css.clip.right=r;this.css.clip.bottom=b;this.css.clip.left=l}else{this.css.clip="rect("+t+","+r+","+b+","+l+")";}}
		
		_pntObject=bw.dom?document.getElementById(id):bw.ie?document.all[id]:bw.ns4?_ns_findDHTMLelement(id):null;
	
		this.obj=_pntObject;if(!_pntObject){return null}
		this.ref=bw.ns4?_pntObject.document:document;
		this.css=bw.ns4?_pntObject:_pntObject.style;
		this.x=this.css.left||this.css.pixelLeft||this.obj.offsetLeft||0
		this.y=this.css.top||this.css.pixelTop||this.obj.offsetTop||0
		this.w=this.obj.offsetWidth||this.ref.width||this.obj.pixelWidth||0
		this.h=this.obj.offsetHeight||this.ref.height||this.obj.pixelHeight||0
	
		this.write=m_write;
		this.move=m_move;
		this.visible=m_visible;
		this.setClip=m_setClip;
	
		return this;
	}
	
	var bw = new browser();
	
	function main(){if (typeof(init)!="undefined") init()}
	onload=main;

