function changeD(object_item)
{
	var the_item = document.getElementById(object_item);

	if (document.getElementById)
	{ // DOM3 = IE5, NS6
		if (the_item.style.display == 'none')
			the_item.style.display = 'block';
		else
			the_item.style.display = 'none';

	}
	else
	{
		if (document.layers)
		{ // Netscape 4
			if (the_item.display == 'none')
				the_item.display = 'block';
			else
				the_item.display = 'none';
		}
		else
		{ // IE 4
			if (the_item.style.display == 'none')
				the_item.style.display = 'block';
			else
				the_item.style.display = 'none';
		}
	}
}
				
function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',menubar=no,status=no,location=no,resizable=no,toolbar=no'
	win = window.open('', myname, winprops)
	var resizeSource = new Image;
	resizeSource.src = mypage;
	toHeight = resizeSource.height + 50;
	toWidth = resizeSource.width;
	userAgent=navigator.userAgent;
	if (userAgent.indexOf('MSIE') != -1) {
	toHeight = resizeSource.height + 75;
	toWidth = resizeSource.width+6;
	}
	win.document.write('<html><head><title>' + myname + '</title><script language="JavaScript">function resizeWindow(){window.moveTo(20,20); window.resizeTo('+toWidth+','+toHeight+'); }</script></head><body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0><img onclick="window.close();" src="' + mypage + '" onload="resizeWindow()"></body></html>');

	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}

function makePopupWindow(imageSrc,imageName)
{
	imageName = imageName.substring(0,imageName.indexOf("."))
	var theImage = new Image;
	theImage.src = imageSrc;
	NewWindow(imageSrc, imageName, theImage.width, theImage.height, "no");
}

function PopupProductDetail(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',menubar=no,status=no,location=no,resizable=no,toolbar=no'
	win = window.open(mypage, 'NewWindow', winprops)
}
