
function PopupPic(sPicURL) { 
	var strURL = "/ecom/PopUp.html?" + escape(sPicURL);
	var popW = 200;
	var popH = 200;
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',resizable=1';
	//alert(strURL);
	pic_window = window.open(strURL,'pic_window',winProp);
	pic_window.focus();
}

//var temp=self.location.href.split("?");
//var picUrl = (temp.length>1)?temp[1]:"";

function fitPic() {
	var NS = (navigator.appName=="Netscape")?true:false;

	iWidth = (NS)?window.innerWidth:document.body.clientWidth;
	iHeight = (NS)?window.innerHeight:document.body.clientHeight;
	iImageWidth = document.images[0].width;
	iImageHeight = document.images[0].height;
	
	if (iImageWidth <= 80)
		iImageWidth = 100;
		
	if (iImageHeight <= 80)
		iImageHeight = 100;
			
	iWidth = iImageWidth - iWidth + 10;
	iHeight = iImageHeight - iHeight + 10;
		
	window.resizeBy(iWidth, iHeight-1);
	self.focus();
}

function OpenWin(strURL, popW, popH) {
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars=yes,resizable=yes';
	popWin = window.open(strURL,'popWin',winProp);
	popWin.focus();
}

function navigateToParent(strUrl) {
	self.opener.location = strUrl;
	self.opener.focus();
	
}