
<!--
// (c) 2000, WishWorld. All rights reserved.
// contact: wishworld@wishworld.com

// get's over written each load (no frame version)
var g_wishWin = new Object();

function closeWishWorld(wishObj) {
	if(wishObj && wishObj.win && !wishObj.win.closed) {
		wishObj.win.close();
	}
}

// initWishWorld: initial kick off of wishWorld windo
function initWishWorld(wishObj) {
	if (!wishObj.win || (wishObj.win && wishObj.win.closed)) {
		wishObj.width = 400;
		wishObj.height = 212;
		wishObj.left = window.screen.width - 420;
		wishObj.top = 10;
		wishObj.name = "wwGiftReg";

		var attr = "left=" + wishObj.left + ",top=" +
		   wishObj.top + ",resizable=1,width=" + wishObj.width +
		   ",height=" + wishObj.height + ",scrollbars=yes"

		wishObj.win = window.open(wishObj.url, wishObj.name, attr);
		//wishObj.win.focus();
	} else {
		//wishObj.win.focus();
	}
}

// initial function to setup the wishWorld object
function initWishObject(wishObj, storeCode) {
	if (!wishObj.win) {
		wishObj.initStoreCode = storeCode;
		wishObj.url= "http://www.wishworld.com/giftreg/LoginFrame.asp?storecode=" + storeCode;
	}
}

// add a product to their gift registry
function addProduct(storeCode, prod) {

	// set up window (one time shot)
	g_wishWin.initStoreCode = storeCode;
	g_wishWin.width = 400;
	g_wishWin.height = 200;
	g_wishWin.left = (window.screen.width -g_wishWin.width) /2;
	g_wishWin.top = (window.screen.height -g_wishWin.height) /2;
	g_wishWin.url = "http://www.wishworld.com/giftreg/addProduct.asp?storeCode=" + storeCode + "&prod=" + escape(prod);
	g_wishWin.name = "wwAddGift";

	var attr = "left=" + g_wishWin.left + ",top=" + g_wishWin.top +
		",resizable=1,width=" + g_wishWin.width +
		",height=" + g_wishWin.height + ",scrollbars=no"

	g_wishWin.win = window.open(g_wishWin.url, g_wishWin.name, attr);
	//g_wishWin.win.focus();

}

function initWishWorldHelp(store, type)
{
	var m_winpos = "";

	// if DHMTL (i.e., browser version 4+)
	if (document.all || document.layers)
	{
		var m_leftpos = window.screen.width/2 - 320;
		var m_toppos = window.screen.height/2 - 240;
		var m_winpos = 'resizable=1,status=1,width=640,height=480,left=' + m_leftpos + ',top=' + m_toppos;
		m_href = "http://www.wishworld.com/Help/help.asp?store=" + store + "&type=" + type;
	}
	else
		m_href = "http://www.wishworld.com/giftreg/updateBrowser.htm";

	window.open(m_href, "RegistryHelp", m_winpos);
}


//-->