function objResizer(obj,mW,mH)
{
	
	this.minH = mH;
	this.minW = mW;
	this.obj = document.getElementById(obj);
	
	var tObj;
	
	if(tObj = this.getWindowProps()){
		this.currheight = tObj.h;
		this.currwidth = tObj.w;

		delete tObj;
		
		/*
		window.onresize = function(myclass){
			var tObj = myclass.getWindowProps();
			if(myclass.currheight != tObj.h || myclass.currwidth != tObj.w)
			{
				this.resize();
			}
			this.currheight = tObj.h;
			this.currwidth = tObj.w;
		}
		*/

	}else{
		alert('this browser is not compatible');
	}
	
}

objResizer.prototype.getWindowProps = function()
{
	var tObj = {};
	var wPage;
	var hPage;
	
	if (self.innerWidth)
	{
		wPage = self.innerWidth;
		hPage = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		wPage = document.documentElement.clientWidth;
		hPage = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		wPage = document.body.clientWidth;
		hPage = document.body.clientHeight;
	}else return false;	
	
	tObj.w = wPage;
	tObj.h = hPage;
	
	return tObj;
}

objResizer.prototype.setHeight = function(h)
{

	hPage = this.getWindowProps().h;
	minH = h;

	switch(true)
	{

		case h >= hPage:
			this.obj.style.height = h + 'px';
			this.obj.height = h + 'px';
		break;

		case h <= hPage:
			this.obj.style.height = '100%';
			this.obj.height = '100%';
		break;

	}	


}

objResizer.prototype.resize = function()
{
	var tObj = this.getWindowProps();
	var hPage = tObj.h;
	var wPage = tObj.w;
	
	switch(true){
		
		case (wPage >= minW && hPage >= minH) :
			this.doResize("100%", "100%");
		break;
	
		case (wPage < minW && hPage >= minH) :
			this.doResize(minW + 'px', "100%");
		break;
	
		case (wPage >= minW && hPage < minH) :
			doResize("100%", minH + 'px');
		break;
	
		default:
			doResize(minW, minH);
		break;
		
	}
	
}

objResizer.prototype.doResize = function(w,h)
{
	this.obj.style.width = w;
	this.obj.style.height = h;
}