//this function executes on the click  event of 100*100 thumbnil and will help to display selected images
//large view . 
function swapPhoto(ID1,ID2,ID3,ID4,ID5,ID6,ID7, imgpath, hdnCalculatedTitel, intwidth, intheight, hdnCalculatedImgCaption, orgWidth, orgHeight, orgPath, hdnSculpture, hdnMaterial, hdnRun, hdnSignature, hdnMass) 
{
	var imgtext, Caption, strSculpture, strMaterial, strRun, strSignature, strMass;
	
	imgtext = null;
	Caption = null;
	strSculpture = null;
	strMaterial = null;
	strRun= null;
	strSignature= null;
	strMass = null;
	
	imgtext = document.getElementById(hdnCalculatedTitel).value;
	Caption = document.getElementById(hdnCalculatedImgCaption).value;
	strSculpture = document.getElementById(hdnSculpture).value;
	strMaterial = document.getElementById(hdnMaterial).value;
	strRun = document.getElementById(hdnRun).value;
	strSignature = document.getElementById(hdnSignature).value;
	strMass = document.getElementById(hdnMass).value;
	
	window.document.images[ID1].src = imgpath;
	window.document.images[ID1].width = intwidth;
	window.document.images[ID1].height = intheight;
	
	document.getElementById(ID3).value = orgPath;
	
	if(imgpath == '/img/trans.gif')
		document.getElementById(ID7).style.visibility = "hidden";
	else
		document.getElementById(ID7).style.visibility = "visible";
	
	//document.getElementById(ID6).style.visibility = "hidden";
	
	var parentID = null;
	if (document.layers) 
	{
		var oLayer = (parentID)? eval('document.' + parentID + '.document.' + ID2 + '.document') : document.layers[ID2].document;
		oLayer.open();
		oLayer.write(imgtext);
		oLayer.close();
	}
	else if (document.all) 
	{
		document.all[ID2].innerHTML = imgtext;
		document.all[ID4].value = orgWidth;
		document.all[ID5].value = orgHeight;
	}
	else if (parseInt(navigator.appVersion)>=5 && navigator.appName=="Netscape") 
	{
		document.getElementById(ID2).innerHTML = imgtext;
	}
	
	document.getElementById('divCaption').innerHTML = Caption;
	document.getElementById('divSculpture').innerHTML = strSculpture;
	document.getElementById('divMaterial').innerHTML = strMaterial;
	document.getElementById('divRun').innerHTML = strRun;
	document.getElementById('divSignature').innerHTML = strSignature;
	document.getElementById('divMass').innerHTML = strMass;
	
	//if(strSculpture.substr(0, 1)=='#' || (strSculpture == '' && strMaterial == '' && strRun == '' && strSignature == '' && strMass == '' ))
	//{
	//	document.getElementById('InfoLink').style.visibility = "hidden";
	//}
	//else
	//{
	//	document.getElementById('InfoLink').style.visibility = "visible";	
	//}
} // swapPhoto

function swapPhotoRaw(ID1,ID2,ID3,ID4,ID5,ID6, imgpath, hdnCalculatedTitel, intwidth, intheight, orgWidth, orgHeight, orgPath) 
{
	var imgtext, Caption;
	
	imgtext = null;
	Caption = null;
	
	imgtext = document.getElementById(hdnCalculatedTitel).value;
	Caption = document.getElementById(ID6).value;
	
	window.document.images[ID1].src = imgpath;
	window.document.images[ID1].width = intwidth;
	window.document.images[ID1].height = intheight;
	
	document.getElementById(ID3).value = orgPath;
	document.getElementById(ID6).value = Caption;
	
	var parentID = null;
	if (document.layers) 
	{
		var oLayer = (parentID)? eval('document.' + parentID + '.document.' + ID2 + '.document') : document.layers[ID2].document;
		oLayer.open();
		oLayer.write(imgtext);
		oLayer.close();
	}
	else if (document.all) 
	{
		document.all[ID2].innerHTML = imgtext;
		document.all[ID4].value = orgWidth;
		document.all[ID5].value = orgHeight;
	}
	else if (parseInt(navigator.appVersion)>=5 && navigator.appName=="Netscape") 
	{
		document.getElementById(ID2).innerHTML = imgtext;
	}
}

//To get The Full image 
function jWDZoomImg(strPath,intWidth,intHeight,strName)
{
	window.open('/inc/ZoomImg.asp?action=Zoom&strPath=' + strPath + '&strName=' + strName,'Zoom','scrollbars=no,resizable=yes,titlebar=no,statusbar=no,left=20,top=20,height=' + intHeight + ',width=' + intWidth)
}

//It will show the selected image info 
function jWDViewImageInfo(ID)
{
	document.getElementById(ID).style.visibility = "visible";
}
