//makes dynamic layer
function makeLayer(id, position, left, top, width, height, visibility, c_effect) {
	this.obj = document.getElementById(id).style;
	this.obj.position = position;
	this.obj.left = parseInt(left*x_scale);
	this.obj.top = parseInt(top*y_scale);
	this.obj.width = parseInt(width*x_scale);
	this.obj.height = parseInt(height*y_scale);
	this.obj.visibility = visibility;
	
	if (constraint)
	{
		if (c_effect.charAt(0)=="1")
			this.obj.left = parseInt(left*constraint);
		if (c_effect.charAt(1)=="1")
			this.obj.top = parseInt(top*constraint);
		if (c_effect.charAt(2)=="1")
			this.obj.width = parseInt(width*constraint);
		if (c_effect.charAt(3)=="1")
			this.obj.height = parseInt(height*constraint);
	}	
	
	if (id=='content' && constraint)
	{
		if (constraint)
		{
			sp_left = left*constraint;
			sp_top = top*constraint;
		}
		else
		{
			sp_left = left*x_scale;
			sp_top = top*y_scale;
		}
		this.obj.width = parseInt(pageWidth-sp_left);
		this.obj.height = parseInt(pageHeight-sp_top);
	}
	return this.obj;
}
