
function toShowView(src,iMouseX,iMouseY,sPosX,sPosY,zoomH,zoomW,zoomL,zoomR,zoomT,zoomB)
{	
	var sFileName=src.bigimg;
	var iMultiple = 2.05;	//·Å´ó±¶Êý

	var zoomL = Max(iMouseX - zoomW/2, 1);
	var zoomR = Min(zoomL + zoomW, src.clientWidth-1);
	var zoomT = Max(iMouseY - zoomH/2 ,1);
	var zoomB = Min(zoomT + zoomH, src.clientHeight-1);

	if(zoomR >= src.clientWidth-1)
	{
		zoomL = zoomR - zoomW;
	}
	if(zoomB >= src.clientHeight-1)
	{
		zoomT = zoomB - zoomH;
	}

	//alert("zoomL"+zoomL+"zoomR"+zoomR+"zoomT"+zoomT+"zoomB"+zoomB);
	layerTop.style.left= sPosX;
	layerTop.style.top = sPosY;
	layerTop.style.width  = src.clientWidth;
	layerTop.style.height = zoomT;

	layerBottom.style.left= sPosX ;
	layerBottom.style.top = sPosY + zoomB ;
	layerBottom.style.width  = src.clientWidth;
	layerBottom.style.height = src.clientHeight -zoomB ;

	layerLeft.style.left= sPosX ;
	layerLeft.style.top = sPosY + zoomT;
	layerLeft.style.width  = zoomL ;
	layerLeft.style.height = zoomH ;


	layerRight.style.left= sPosX + zoomR;
	layerRight.style.top = sPosY + zoomT;
	layerRight.style.width  = src.clientWidth - zoomR;
	layerRight.style.height = zoomH;

	if (document.all.bigPicture.innerHTML == "")
	{
		document.all.bigPicture.style.left   = sPosX + src.clientWidth ;
		document.all.bigPicture.style.top    = sPosY + src.clientHeight - zoomH * iMultiple;
		document.all.bigPicture.style.width  = zoomW * iMultiple;
		document.all.bigPicture.style.height = zoomH * iMultiple;
		document.all.bigPicture.innerHTML    = "<img id=BigImg style='position:relative'>";
		document.all.BigImg.src              =  sFileName;
	}

	document.all.BigImg.width      = src.clientWidth * iMultiple ;
	document.all.BigImg.height     = src.clientHeight * iMultiple ;
	document.all.BigImg.style.top  = -zoomT * iMultiple ;
	document.all.BigImg.style.left = -zoomL * iMultiple ;
	if(document.all.ddlClothSize)
	document.all.ddlClothSize.style.display="none";
}

function hideView(src)
{
	if(document.all.ddlClothSize)
	document.all.ddlClothSize.style.display="block";
	layerTop.style.left     = 0;
	layerTop.style.top      = 0;
	layerTop.style.width    = 0;
	layerTop.style.height   = 0;

	layerBottom.style.left  = 0;
	layerBottom.style.top   = 0;
	layerBottom.style.width = 0;
	layerBottom.style.height= 0;

	layerLeft.style.left    = 0;
	layerLeft.style.top     = 0;
	layerLeft.style.width   = 0;
	layerLeft.style.height  = 0;


	layerRight.style.left   = 0;
	layerRight.style.top    = 0;
	layerRight.style.width  = 0;
	layerRight.style.height = 0;

	document.all.bigPicture.style.left   = 0;
	document.all.bigPicture.style.top    = 0;
	document.all.bigPicture.style.width  = 0;
	document.all.bigPicture.style.height = 0;

	document.all.bigPicture.innerHTML    = "";
}
function ShowMyDetail(strdetail,str)
{
	img=document.getElementById("smallImage");
	img.src=str;
	img.bigimg=strdetail;
}
function getElementDefineLeft(vObject)
{
	var iElementLeft=vObject.offsetLeft;
	while(vObject=vObject.offsetParent)
	{
		iElementLeft+=vObject.offsetLeft;
	}
	return iElementLeft;
}

function getElementDefineTop(vObject)
{
	var iElementTop=vObject.offsetTop;
	while(vObject=vObject.offsetParent)
	{
		iElementTop+=vObject.offsetTop;
	}
	return iElementTop;
}
function Min(A,B)
{
	return A<B?A:B
}

function Max(A,B)
{
	return A>B?A:B
}
document.write('<div style="filter:alpha(opacity=50); background-color:#808080; overflow: hidden; position:absolute; left:0px; top:0px; height:0px; width:0px" id="layerTop"></div>');
document.write('<div style="filter:alpha(opacity=50); background-color:#808080; overflow: hidden; position:absolute; left:0px; top:0px; height:0px; width:0px" id="layerBottom"></div>');
document.write('<div style="filter:alpha(opacity=50); background-color:#808080; overflow: hidden; position:absolute; left:0px; top:0px; height:0px; width:0px" id="layerLeft"></div>');
document.write('<div style="filter:alpha(opacity=50); background-color:#808080; overflow: hidden; position:absolute; left:0px; top:0px; height:0px; width:0px" id="layerRight"></div>')
document.write('<div id="bigPicture" name="bigPicture" style="position:absolute; width:100px; height:100px; z-index:1; left: 100px; top: 100px; OVERFLOW: hidden;"></div>');