//----------------100*80-----------------
function resizeM_100_80(el)
{

 if(el.runtimeStyle)
 {
	el.runtimeStyle.behavior="none";
 }

 var tempM = new Image();
 tempM.src = el.src ;
 tempM.el = el;
 tempM.onload = resizeMonLoad_100_80;
 tempM.doload = resizeMonLoad_100_80;
 if(el.fileSize && (el.fileSize>0)){; tempM.doload();};
}

function resizeMonLoad_100_80()
{
     var el = this.el;
	 var maxW = 100;
	 var maxH = 80;
	 el.style.visibility="visible";

	 if(this.width < maxW)
	 {
		el.style.width = this.width + "px";
	 }

	 if(this.height < maxH)
	 {
		el.style.height = this.height + "px";
	 }
	 
	 if(this.width>this.height)
	 {
		  if(this.width >= maxW)
		  {; 
			  var r = maxW / this.width;
			  el.style.height = (this.height * r ) + "px";
			  el.style.width = maxW + "px";
		  }
	 }
	 else
	 {
		if(this.height >= maxH)
		{
			var r = maxH / this.height;
			el.style.width = (this.width * r )+ "px";
			el.style.height = maxH + "px";
		}
	 }
}
//----------------157*170-----------------
function resizeM_153_170(el)
{

 if(el.runtimeStyle)
 {
	el.runtimeStyle.behavior="none";
 }

 var tempM = new Image();
 tempM.src = el.src ;
 tempM.el = el;
 tempM.onload = resizeMonLoad_153_170;
 tempM.doload = resizeMonLoad_153_170;
 if(el.fileSize && (el.fileSize>0)){; tempM.doload();};
}

function resizeMonLoad_153_170()
{
     var el = this.el;
	 var maxW = 153;
	 var maxH = 170;
	 el.style.visibility="visible";

	 if(this.width < maxW)
	 {
		el.style.width = this.width + "px";
	 }

	 if(this.height < maxH)
	 {
		el.style.height = this.height + "px";
	 }
	 
	 if(this.width>this.height)
	 {
		  if(this.width >= maxW)
		  {; 
			  var r = maxW / this.width;
			  el.style.height = (this.height * r ) + "px";
			  el.style.width = maxW + "px";
		  }
	 }
	 else
	 {
		if(this.height >= maxH)
		{
			var r = maxH / this.height;
			el.style.width = (this.width * r )+ "px";
			el.style.height = maxH + "px";
		}
	 }
}

//----------------130*100-----------------
function resizeM_130_100(el)
{

 if(el.runtimeStyle)
 {
	el.runtimeStyle.behavior="none";
 }

 var tempM = new Image();
 tempM.src = el.src ;
 tempM.el = el;
 tempM.onload = resizeMonLoad_130_100;
 tempM.doload = resizeMonLoad_130_100;
 if(el.fileSize && (el.fileSize>0)){; tempM.doload();};
}

function resizeMonLoad_130_100()
{
	 var el = this.el;
	 var maxW = 130;
	 var maxH = 100;
	 el.style.visibility="visible";

	 if(this.width < maxW)
	 {
		el.style.width = this.width + "px";
	 }

	 if(this.height < maxH)
	 {
		el.style.height = this.height + "px";
	 }
	 
	 if(this.width>this.height && this.width/this.height > 1.3)
	 {
		  if(this.width >= maxW)
		  {; 
			  var r = maxW / this.width;
			  el.style.height = (this.height * r ) + "px";
			  el.style.width = maxW + "px";
		  }
	 }
	 else
	 {
		if(this.height >= maxH)
		{
			var r = maxH / this.height;
			el.style.width = (this.width * r )+ "px";
			el.style.height = maxH + "px";
		}
	 }	
}
//----------------575*435-----------------
function resizeM_575_435(el)
{

 if(el.runtimeStyle)
 {
	el.runtimeStyle.behavior="none";
 }

 var tempM = new Image();
 tempM.src = el.src ;
 tempM.el = el;
 tempM.onload = resizeMonLoad_575_435;
 tempM.doload = resizeMonLoad_575_435;
 if(el.fileSize && (el.fileSize>0)){; tempM.doload();};
}

function resizeMonLoad_575_435()
{
	 var el = this.el;
	 var maxW = 575;
	 var maxH = 435;
	 el.style.visibility="visible";

	if(this.width < maxW)
	 {
		el.style.width = this.width + "px";
	 }

	 if(this.height < maxH)
	 {
		el.style.height = this.height + "px";
	 }
	 
	 if(this.width>this.height && this.width/this.height > 1.32)
	 {
		  if(this.width >= maxW)
		  {; 
			  var r = maxW / this.width;
			  el.style.height = (this.height * r ) + "px";
			  el.style.width = maxW + "px";
		  }
	 }
	 else
	 {
		if(this.height >= maxH)
		{
			var r = maxH / this.height;
			el.style.width = (this.width * r )+ "px";
			el.style.height = maxH + "px";
		}
	 }
	 
}

