function DIVnewBgcolor(div,c){
	object=DIVgetDivision(div);
	if(chk.ns4&&!chk.ns6){object.bgColor=c;}
	if(chk.ie || chk.ns6){object.style.backgroundColor=c;}		
}

function DIVgetDivision(div,st){
 divLength=(div.length)-1;
    if(chk.ie){
		diV='document.all.'+div[divLength];
		}
		if(chk.ns6){
			diV='document.getElementById("'+div[divLength]+'")';
		}
		if(chk.ns4){
			for(var i=0;i<=divLength;i++){
			if(i==0){diV='document.layers.'+div[i];}
			else{
			diV=diV+'.document.layers.'+div[i];
			}
		}
    }
	if(st){
		return diV;
		return false;
	}
    diV=eval(diV);
    return diV;
}

function DIVmove(div,x,y,z){
object=DIVgetDivision(div);
	if(chk.ie || chk.ns6){
		if(x!=null){object.style.left=x+"px";}
		if(y!=null){object.style.top=y+"px";}
		if(z!=null){object.style.zIndex=z;}
	}
	if(chk.ns && !chk.ns6){
		if(x!=null){object.left=x;}
		if(y!=null){object.top=y;}
		if(z!=null){object.zIndex=z;}
	}
}

function DIVsize(div){
	var h=null;
	var w=null;
	object=DIVgetDivision(div);
	if(chk.ie||chk.ns6){
		h=object.offsetHeight;
		w=object.offsetWidth;
	}
	if(chk.ns&&!chk.ns6){
		h=object.document.height;
		w=object.document.width;
	}
	if(h!=null && w!=null){
		return [h,w];
	}
}

function DIVwrite(div,txt){
	object=DIVgetDivision(div);
	if(chk.ie || chk.ns6 || chk.ns7|| chk.moz){
		object.innerHTML=txt;
	}
	if(chk.ns4&&!chk.ns6){
		object.document.open();
		object.document.write(txt);
		object.document.close();
	}
}
