function fixSizeHeight71(id, height) {
		if(height < 71) {
			$("#"+id).css("bottom", "0px");
		} else {
			var padHeight = (height-71)/2;
			$("#"+id).css("bottom", padHeight);
		}
	}
	
function OpenWindow(windowUri, windowName, windowWidth, windowHeight, property )
{
	var centerWidth = (window.screen.width - windowWidth) / 2;
	var centerHeight = (window.screen.height - windowHeight - 60) / 2;

	newWindow = window.open(windowUri, windowName, 'width=' + windowWidth +
	',height=' + windowHeight + ',left=' + centerWidth + ',top=' + centerHeight+ ',' + property);

	newWindow.focus();
	 //return newWindow.name;
}

//BEGIN FUNCTION RESISE 3 IMAGES INDEX
var saveWidth3n = 0;
var saveHeight3n = 0;

function scaleImg3n(whatinput)
{
var maxWidth3n = 90;
var maxHeight3n = 70;
var ratio = 1;

what = document.getElementById(whatinput);

if (what.width > maxWidth3n || what.height > maxHeight3n)
{
if ((maxHeight3n / what.height) <= (maxWidth3n / what.width))
{
saveWidth3n = what.width;
saveHeight3n = what.height;
ratio = what.width / what.height; 
what.height = maxHeight3n;
what.width = maxHeight3n * ratio;
what.style.cursor = "pointer";
}
else
{
saveWidth3n = what.width;
saveHeight3n = what.height;
ratio = what.height / what.width; 
what.height = maxWidth3n * ratio ;
what.width = maxWidth3n;
what.style.cursor = "pointer";
}
}
else if (saveWidth3n > maxWidth3n || saveHeight3n > maxHeight3n)
{
what.width = saveWidth3n;
what.height = saveHeight3n;
what.style.cursor = "pointer";
}

}
//BEGIN FUNCTION RESISE



//BEGIN FUNCTION RESISE
var saveWidth = 0;
var saveHeight = 0;

function scaleImgphoto(what)
{
var maxWidthPhoto = 520;
var maxHeightPhoto = 1000;
var ratio = 1;

what = document.getElementById(what);

if (what.width > maxWidthPhoto || what.height > maxHeightPhoto)
{
if ((maxHeightPhoto / what.height) <= (maxWidthPhoto / what.width))
{
saveWidth = what.width;
saveHeight = what.height;
ratio = what.width / what.height; 
what.height = maxHeightPhoto;
what.width = maxHeightPhoto * ratio;
what.style.cursor = "pointer";
}
else
{
saveWidth = what.width;
saveHeight = what.height;
ratio = what.height / what.width; 
what.height = maxWidthPhoto * ratio ;
what.width = maxWidthPhoto;
what.style.cursor = "pointer";
}
}
else if (saveWidth > maxWidthPhoto || saveHeight > maxHeightPhoto)
{
what.width = saveWidth;
what.height = saveHeight;
what.style.cursor = "pointer";
}

}
//BEGIN FUNCTION RESISE


//BEGIN FUNCTION RESISE
var saveWidth = 0;
var saveHeight = 0;

function scaleImg(what)
{
var maxWidth = 250;
var maxHeight = 250;
var ratio = 1;

what = document.getElementById(what);

if (what.width > maxWidth || what.height > maxHeight)
{
if ((maxHeight / what.height) <= (maxWidth / what.width))
{
saveWidth = what.width;
saveHeight = what.height;
ratio = what.width / what.height; 
what.height = maxHeight;
what.width = maxHeight * ratio;
what.style.cursor = "pointer";
}
else
{
saveWidth = what.width;
saveHeight = what.height;
ratio = what.height / what.width; 
what.height = maxWidth * ratio ;
what.width = maxWidth;
what.style.cursor = "pointer";
}
}
else if (saveWidth > maxWidth || saveHeight > maxHeight)
{
what.width = saveWidth;
what.height = saveHeight;
what.style.cursor = "pointer";
}

}
//BEGIN FUNCTION RESISE


