function previewImage(src,title,width,height)
{
	var oImageWindow;
	wWidth = (width)?width+4:470;
	wHeight = (height)?height+4:470;
	oImageWindow=window.open("","blankImageWindow", 'status=no,scrollbars=no,resizable=yes,width='+(wWidth)+',height='+(wHeight)+'');
		oImageWindow.document.write("<html><head><meta http-equiv='imagetoolbar' content='false'><title>"+title+"</title>");
		oImageWindow.document.write("<body topmargin=0 marginheight=0 leftmargin=0 marginwidth=0 bgcolor=#ffffff text=black link=black alink=black vlink=black>");
		oImageWindow.document.write("<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr valing=top><td align=center>");
		oImageWindow.document.write("<table border=0 cellspacing=1 cellpadding=1 bgcolor=#ffffff><tr><td>");
		oImageWindow.document.write("<a href='javascript:self.close();'><img src='"+src+"' border=0></a>");
		oImageWindow.document.write("</td></tr></table>");
		oImageWindow.document.write("</td></tr><tr><td align=center><a href='javascript:self.close();'><img src='../../img/pCards/DT/btnClose.jpg' border=0></a></td></tr></table>");
		oImageWindow.document.write("</body></html>");
		oImageWindow.document.close();
	oImageWindow.resizeTo(wWidth+30,wHeight+40);
	oImageWindow.focus();
	return false;
}

function showBigImageInPopUp(oHref){
	if(oHref.href.indexOf(".jpg")>0){
		var html = '<HTML><HEAD>';
		html += '<sc'+'ript language="javascript">var NS = (navigator.appName=="Netscape")?true:false;function fitPic() {iWidth = (NS)?window.innerWidth:document.body.clientWidth;iHeight = (NS)?window.innerHeight:document.body.clientHeight;iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;window.resizeBy(iWidth, iHeight);self.focus();}</sc'+'ript>'
		html +='</HEAD><BODY bgcolor="#FFFFFF" onload="fitPic();" topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">';
		html +='<sc'+'ript language="javascript">document.write("<img src=\''+oHref.href+'\' border=0>");</sc'+'ript>';
		html +='</BODY></HTML>';
		wrImageWindow=window.open("","blankImageWindow", 'status=no,scrollbars=no,resizable=yes,width=50,height=50');
			wrImageWindow.document.write(html);
			wrImageWindow.document.close();
		wrImageWindow.focus();
	}
	return false;
}

function previewImageWithoutReturn(src,title,width,height)
{
	var oImageWindow;
	wWidth = (width)?width+4:604;
	wHeight = (height)?height+4+30:600;
		oImageWindow=window.open("","blankImageWindow", 'status=no,scrollbars=no,resizable=yes,width='+(wWidth)+',height='+(wHeight)+'');
		oImageWindow.document.write("<html><head><meta http-equiv='imagetoolbar' content='false'><title>"+title+"</title>");
		oImageWindow.document.write("<body topmargin=0 marginheight=0 leftmargin=0 marginwidth=0 bgcolor=#ffffff text=black link=black alink=black vlink=black>");
		oImageWindow.document.write("<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr valing=top><td align=center>");
		oImageWindow.document.write("<table border=0 cellspacing=1 cellpadding=1 bgcolor=#ffffff><tr><td>");
		oImageWindow.document.write("<a href='javascript:self.close();'><img src='"+src+"' border=0></a>");
		oImageWindow.document.write("</td></tr></table>");
		oImageWindow.document.write("</td></tr><tr><td align=center><a href='javascript:self.close();'><img src='/img/pCards/DT/btnClose.jpg' border=0></a></td></tr></table>");
		oImageWindow.document.write("</body></html>");
		oImageWindow.document.close();
	oImageWindow.resizeTo(wWidth+30,wHeight+40);
	oImageWindow.focus();
}

function openPopUp(src,width,height)
{
	var oImageWindow;
	if (width == 0 && height == 0)
		oImageWindow=window.open(src);
	else
	{
		wWidth = (width)?width+4:470;
		wHeight = (height)?height+4:470;
		oImageWindow=window.open(src, '_popupWin', 'status=no,scrollbars=no,resizable=yes,width='+(wWidth)+',height='+(wHeight)+'');
		oImageWindow.resizeTo(wWidth+30,wHeight+40);
	}

	oImageWindow.focus();
	return false;
}

function openPopUpScroll(src,width,height)
{
	var oImageWindow;
	wWidth = (width)?width+4:470;
	wHeight = (height)?height+4:470;
	oImageWindow=window.open(src, '_popupWin', 'status=no,scrollbars=yes,resizable=no,width='+(wWidth)+',height='+(wHeight)+'');
	oImageWindow.resizeTo(wWidth+30,wHeight+40);
	oImageWindow.focus();
	return false;
}

function openICPopUp()
{
	var oImageWindow;
	wWidth = 534;
	wHeight = 388;
	oImageWindow=window.open('../../../inc/popups/ciPopup.asp', '_popupWin', 'status=no,scrollbars=no,resizable=no,width='+(wWidth)+',height='+(wHeight)+'');
	//oImageWindow.resizeTo(wWidth+30,wHeight+40);
	oImageWindow.focus();
	return false;
}

function openTagPopUp(dogImageId)
{
	var oImageWindow;
	wWidth = 534;
	wHeight = 388;
	oImageWindow=window.open('../../../inc/popups/tagger.asp?action=show&dogImageId='+(dogImageId)+'', '_popupWin', 'status=no,scrollbars=no,resizable=no,width='+(wWidth)+',height='+(wHeight)+'');
	//oImageWindow.resizeTo(wWidth+30,wHeight+40);
	oImageWindow.focus();
	return false;
}

function popUpPrint(src, width, height)
{
	var oWindow;
	wWidth = (width)?width+4:470;
	wHeight = (height)?height+8:470;

	oWindow=window.open("","blankImageWindow", 'status=no,scrollbars=yes,resizable=yes,width='+(wWidth)+',height='+(wHeight)+'');

		oWindow.document.write("<html><head><title>Duracell Coloring Book</title>");
		oWindow.document.write("<link type='text/css' media='screen' rel='stylesheet' href='../res/cbNormal.css' />");
		oWindow.document.write("<link type='text/css' media='print'  rel='stylesheet' href='../res/cbPrint.css'/>");
		oWindow.document.write("</head>");
		oWindow.document.write("<body topmargin=0 marginheight=0 leftmargin=0 marginwidth=0 bgcolor=white text=orange link=white alink=white vlink=white>");
		oWindow.document.write("<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=center>");
		oWindow.document.write("<table border=0 cellspacing=1 cellpadding=1><tr><td align=left background='../img/printBat.jpg' height='46'>");
		oWindow.document.write("&nbsp;&nbsp;<a href='#'><font face='Arial, Helvetica, sans-serif' color='#fe6700'><span id='btn' name='btn' onClick='javascript:print();'>PRINT</span></font></a></td></tr>");
		oWindow.document.write("<tr><td><img src='"+src+"' border=0>");
		oWindow.document.write("</td></tr><tr><td align=center bgcolor=black><span style='color:#9F550A; font-size:9px;'>© 2006 Procter & Gamble. All rights reserved. Privacy Policy.</span></td></tr></table>");
		oWindow.document.write("</td></tr></table>");
		oWindow.document.write("</body></html>");
		oWindow.document.close();

	oWindow.resizeTo(wWidth,wHeight);
	oWindow.focus();
	return false;
}

