function resizeFullImage(path, width, height)
{

	width=parseInt(width);
	height=parseInt(height);
	
	var allImageContainer = $$('#wtgallery_singlepic_area .wtgallery_singlepic');
	var imageContainer = allImageContainer[0];
	
	var newWidth;		
	var newHeight;
	var resolutionWidth;
	var resolutionHeight;
	var tempVar;
	
	
	var newWidthLightbox;
	var newHeightLightbox;
	var resolutionWidthLightbox;
	var resolutionHeightLightbox;
	
	resolutionWidth = '490';
	resolutionHeight = '270';
	
	resolutionWidthLightbox = '800';
	resolutionHeightLightbox = '600';
	
	
	
	if(width>height)//querformat
	{		
		tempVar= (width / resolutionWidth);
		newWidth=resolutionWidth;
		newHeight=height/tempVar;
		//alert(width + " x " + height + " breiter als hoch");
		
		if	(resolutionHeight<height){		// falls immernoch zu hoch
			tempVar= (newHeight / resolutionHeight);
			newHeight=resolutionHeight;
		    newWidth=newWidth/tempVar;
		  //  alert(width + " x " + height + " breiter als hoch2");
		}
		else{}		
	}
	
	else if (width<height) //hochformat
	{	
		tempVar= (height/ resolutionHeight);
		newHeight=resolutionHeight;
		newWidth=width/tempVar;		
		//alert(width + " x " + height + " höher als breiter");
	}
	
	else if (width == height) //quadrat
	{
		newWidth=resolutionHeight;
		newHeight=resolutionHeight;
	//	alert(width + " x " + height + " quadrat");
	}
	
	 else{ //zu klein
	 	newWidth=resolutionWidth;
	 	newHeight=resolutionHeight;
	 //	alert(width + " x " + height + " zu klein");
	 
	 }
	 
	 
	 //Lightbox größen Änderung
	 
	 
	 
	 if(width>height)//querformat
	{		
		tempVar= (width / resolutionWidthLightbox);
		newWidthLightbox=resolutionWidthLightbox;
		newHeightLightbox=height/tempVar;
		//alert(width + " x " + height + " breiter als hoch");
		
		if	(resolutionHeightLightbox<height){		// falls immernoch zu hoch
			tempVar= (newHeightLightbox / resolutionHeightLightbox);
			newHeightLightbox=resolutionHeightLightbox;
		    newWidthLightbox=newWidthLightbox/tempVar;
		  //  alert(width + " x " + height + " breiter als hoch2");
		}
		else{}		
	}
	
	else if (width<height) //hochformat
	{	
		tempVar= (height/ resolutionHeightLightbox);
		newHeightLightbox=resolutionHeightLightbox;
		newWidthLightbox=width/tempVar;		
		//alert(width + " x " + height + " höher als breiter");
	}
	
	else if (width == height) //quadrat
	{
		newWidthLightbox=resolutionHeightLightbox;
		newHeightLightbox=resolutionHeightLightbox;
	//	alert(width + " x " + height + " quadrat");
	}
	
	 else{ //zu klein
	 	newWidthLightbox=resolutionWidthLightbox;
	 	newHeightLightbox=resolutionHeightLightbox;
	 //	alert(width + " x " + height + " zu klein");
	 
	 }
	 
	
/*	
	if (width>resolutionWidth) 
	{
	alert("zu breit")
	}
	
	if (height>resolutionHeigth) 
	{
	alert("zu Hoch")
	}
*/	






	var tempString = "<div>";

	tempString = tempString + "</div>";
	tempString = tempString + "<img id='mergedPicLightbox' style='border:5px solid #D6D6D6; display :none; margin-top:100px; position:absolute;top:0px; left:15%;z-index:111;' src='"  + path + "' width='"+newWidthLightbox+"' height='"+newHeightLightbox+"'/>";

	
		
	tempString = tempString + "<img id='mergedPic' src='"  + path + "' width='"+newWidth+"' height='"+newHeight+"' onclick='$(\"lightbox2\").appear({from: 0.0, to: 0.7,duration: 1 }); $(\"mergedPicLightbox\").appear({from: 0.0, to: 1.0,duration: 1 });'/>";
	tempString = tempString + "";

	imageContainer.innerHTML = tempString;	


	
/*
	var allImageLinks = $$('.wtgallery_singlepic a');
	sourceImagePath = "file://localhost:8503/smi_cms/" + filepath;
	document.write(sourceImagePath);
//	sourceImagePath = "http://localhost:8503/smi_cms/uploads/tx_wtgallery/popup/ce0951e6c5549c697641de9e5dde2f23.jpg";
//                       http://localhost:8503/smi_cms/uploads/tx_wtgallery/popup/ce0951e6c5549c697641de9e5dde2f23.jpg
	
	var newImg = new Image();
	newImg.src = sourceImagePath;
	var height = newImg.height;
	var width = newImg.width;
	allImageLinks[0].innerHTML = newImg;
	alert ('The image size is '+width+' x '+height);
	
	alert(sourceImagePath);
*/

}