function openLocator() 
{
    window.open("http://samsclub.com/eclub/main_clublocator.jsp", "ClubLocator","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}


function openMemberServices()
{
    window.open("http://www.samsclubmemberservices.com", "MemberServices","toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}


function openMemberBusCompare()
{
    window.open("http://www.samsclubmemberservices.com/business_compare.html", "Business Compare","toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}


function openMemberAdvCompare()
{
    window.open("http://www.samsclubmemberservices.com/advantage_compare.html", "Advantage Compare","toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}


function openTireHelp(cnpTirePath, cnpTirePage)
{
    window.open(cnpTirePath + "/popup_tire_help.jsp?page=" + cnpTirePage, "helppage", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=540,height=520,top=110,left=275");s
}

function openWalmart() 
{
	window.open("http://www.walmart.com", "walmart","toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=740,height=350,top=0,left=0");
}

function openProductRecalls() 
{
	window.open("http://walmartstores.com/GlobalWMStoresWeb/navigate.do?catg=51", "recalls","toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=740,height=350,top=0,left=0");
}

function openPhoto()
{
	window.open("http://www.samsclub.com/sci/photo_jump.html", "PhotoCenter","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=792,height=400,top=0,left=0");
}

function openRedCross()
{
	window.open("http://www.redcross.org/metadata/IRF/Tsunami/04/Walmart.html", "RedCross","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=792,height=400,top=0,left=0");
}

function openChat(strLinkString)
{
	window.open(strLinkString, "MemberServiceChat","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}

function openZoomProductImage(strLinkString)
{
	window.open(strLinkString, "img","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=513,height=520,top=0,left=0");
}

function openAccessoryInfo(strLinkString)
{
	window.open(strLinkString, "img","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=366,height=400,top=0,left=0");
}

function openMediaWin(qfile,ifile,desc)
{
	window.open("popup_media.jsp?qfile="+qfile+"&ifile="+ifile+"&desc="+desc,"media","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=368,height=420,top=0,left=0"); 
}

function openMapPrice(strLinkString)
{
	window.open("popup_mapPrice.jsp?"+strLinkString,"Price","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=300,height=300,top=0,left=0"); 
}

function openURL(sURL,sTitle,l,t,w,h)
{
	window.open(sURL,sTitle,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+w+",height="+h+",top="+t+",left="+l); 
}

function openGEDelivery(upc)
{
	window.open("popup_frameset.jsp?url=deliver2yourhome.com%3fupc%3d"+escape(upc)+"&title=Product+Delivery+Availability","Delivery","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=640,height=400,top=0,left=0"); 
}

function openCheckworks(strSession)
{
	var strURL = "checkworks_jump.jsp?" + strSession;
	window.open(strURL, "Checkworks","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=400,top=0,left=0");
}

function openCatalogAd(strTitle, strImage)
{
	window.open("popup_catalog_image.jsp?image="+strImage+"&title="+strTitle, "catalogad","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=657,height=420,top=0,left=0"); 
}

function openCatalogPage(strTitle, strImage)
{
	if ((strImage == "catalog/Holiday2002/page44.jpg") || (strImage == "catalog%2fHoliday2002%2fpage44.jpg")) {
 		window.open("popup_catalog_image.jsp?image="+strImage+"&title="+strTitle+"&width=722&height=539", "catalogpage","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=722,height=560,top=0,left=0"); 
	} else {
		window.open("popup_catalog_image.jsp?image="+strImage+"&title="+strTitle+"&width=539&height=730", "catalogpage","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=552,height=735,top=0,left=0"); 
	}
}

function getCookieValue(strValueName)
{
	var strResult = null;
	var nValueEnd = 0;
	strValueName += "=";
	var nValueNameLen = strValueName.length;
	var nTotalCookieLen = document.cookie.length;
	var nValueStart = document.cookie.indexOf(strValueName, 0);

	if (nValueStart != -1)
	{
		nValueEnd = document.cookie.indexOf(";", nValueStart);
		if (nValueEnd == -1) nValueEnd = document.cookie.length;
		strResult = unescape(document.cookie.substring(nValueStart+nValueNameLen,nValueEnd));
	}

	return strResult;
}

function openStdTemplate(cntID)
{
	window.open("popup_std_template.jsp?CntId=" + cntID, "template", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=400,top=110,left=275");
}

function openCNPTutorial(cnpPath, cnpPage)
{
	window.open(cnpPath + "/popup_cnp_tutorial.jsp?page=" + cnpPage, "tutorialpage", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=250,height=520,top=110,left=275");
}

function openGenericEmail()
{
	if ((getCookieValue('popupgenericemail') != 'off') && (getCookieValue('kioskclubnbr') == null) && (getCookieValue('acceptcookies') != null)){
		openURL('popup_email.jsp?title=E-mail&width=247&height=370','email',window.screen.width/2-100,window.screen.height/2-150,276,374);
		}
}

function goToHomePage()
{
        var dtNow = new Date();
        var nMsec = 0;
        var bn = 1;
        var mt = getCookieValue("mt");
        if (mt != "b") mt="a";

        if (mt == "b")
           bn="1";
        else
           bn="0";

        if (dtNow != null) nMsec = dtNow.valueOf();

        window.location = "/eclub/main_home.jsp?mt="+mt+"&bn="+bn+"&ts="+nMsec;
}
