function showDebug() 
{
	alert("products ....: " + sessvars.shoppingCartProduct + "\nquantities ..: " + sessvars.shoppingCartQuantity);
}

function setProductSession(prodList, prodQtd)
{
	sessvars.shoppingCartProduct = prodList;	
	sessvars.shoppingCartQuantity = prodQtd;
	// showDebug();
}

// COOKIES END /////////////////////////////////////////////////////////////////


function addFavourite (querystring, title)
{
	var site = "http://www.ky.com/index_us.jsp?section=";
	if(document.all)
	{
		window.external.AddFavorite (site+querystring, title);
	}
	else
	{
		window.sidebar.addPanel(title, site+querystring, "");
		alert("Remember to uncheck the \"Load this bookmark in the sidebar\" on this bookmark´s properties.");
	}
}

function ReadyToBuy(prodList, quantList) //quantList 1 - without disclaimer //quantList 2 - with disclaimer
{
	var theForm = document.getElementById("frm-drugstore");
	var hdnProdList = document.getElementById("hdnProdList");
	var hdnQuantList = document.getElementById("hdnQuantList");
	
	//alert("prodList = " + prodList);
	//alert("quantList = " + quantList);
	
	hdnProdList.value = prodList;
	hdnQuantList.value = quantList;
	
	if(quantList == 1) {
		window.open("/where-buy.jsp", "_self");
	}
	
	else if(quantList == 2) {
		showDisclaimerBuy();
		//alert("showDisclaimerBuy OK");
	}
}

function whereBuy() {
	var hdnProdList = document.getElementById("hdnProdList").value;
	if(hdnProdList == "shopDrugstore"){
		//pageTracker._trackPageview('/buy/Drugstore/');
		window.open("http://www.drugstore.com/search/search_results.asp?N=0&Ntx=mode%2Bmatchallpartial&Ntk=All&srchtree=1&Ntt=ky","_blank");
	} 	
	else if(hdnProdList == "shopKY"){
		//pageTracker._trackPageview('/buy/KYshopdirect/');
		window.open("http://www.ky.com/shop","_blank");
	} 	 
	else if(hdnProdList == "shopTarget"){
		//pageTracker._trackPageview('/buy/Target');
		window.open("http://www.target.com/gp/search/187-5083472-3194103?field-keywords=ky&url=index%3Dtarget%26search-alias%3Dtgt-index&ref=sr_bx_1_1 ","_blank");
	} 
	else if(hdnProdList == "shopWalgreens"){
		//pageTracker._trackPageview('/buy/Walgreens');
		window.open("http://www.walgreens.com/search/results.jsp?Ntt=ky","_blank");
	} 
	else if(hdnProdList == "shopCVS"){
		//pageTracker._trackPageview('/buy/CVS');
		window.open("http://cvssavingscentral.com/Programs/KYBrandIntense.aspx?WT.ac=B_01182010_04_JNJ_10083_KYIntense_TDM","_blank");
	} 
	else if(hdnProdList == "shopWalmart"){
		//pageTracker._trackPageview('/buy/Walmart');
		window.open("http://instoresnow.walmart.com/EnhancedRenderContent.aspx?id=84064","_blank");
	}
//Products	
	else if(hdnProdList.value == "prodBali"){
		//pageTracker._trackPageview('/buy/Bali-Moonlight');
		window.open("http://www.drugstore.com/products/prod.asp?pid=139741&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodJelly"){
		//pageTracker._trackPageview('/buy/K-Y-Jelly');
		window.open("http://www.drugstore.com/products/prod.asp?pid=12679&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodLiquibeads"){
		//pageTracker._trackPageview('/buy/Liquibeads');
		window.open("http://www.drugstore.com/products/prod.asp?pid=166229&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodNaturalliquid"){
		//pageTracker._trackPageview('/buy/Personal-Lubricant-Liquid');
		window.open("http://www.drugstore.com/products/prod.asp?pid=12684&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodNaturalsilk"){
		//pageTracker._trackPageview('/buy/Sensual-Silk-Liquid');
		window.open("http://www.drugstore.com/products/prod.asp?pid=158787&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodOilvariety"){
		//pageTracker._trackPageview('/buy/Variety-Pack');
		window.open("http://www.drugstore.com/products/prod.asp?pid=148752&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTingling"){
		//pageTracker._trackPageview('/buy/Tingling');
		window.open("http://www.drugstore.com/products/prod.asp?pid=161430&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTinglingJelly"){
		//pageTracker._trackPageview('/buy/Tingling-Jelly');
		window.open("http://www.drugstore.com/products/prod.asp?pid=166230&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTinglingUltra"){
		//pageTracker._trackPageview('/buy/Tingling-Ultra-Gel');
		window.open("http://www.drugstore.com/products/prod.asp?pid=166232&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarming"){
		//pageTracker._trackPageview('/buy/Warming-Body-Massage');
		window.open("http://www.drugstore.com/products/prod.asp?pid=139740&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarmingJelly"){
		//pageTracker._trackPageview('/buy/Warming-Jelly');
		window.open("http://www.drugstore.com/products/prod.asp?pid=90170&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarmingLiquid"){
		//pageTracker._trackPageview('/buy/Sensual-Silk-Liquid');
		window.open("http://www.drugstore.com/products/prod.asp?pid=84333&aid=337919","_blank");
	} 
	else if(hdnProdList.value == "prodYourSmineDetails"){
		//pageTracker._trackPageview('/buy/Yours+Mine');
		window.open("http://www.drugstore.com/products/prod.asp?pid=179545&aid=337919","_blank");
	} 
	else if(hdnProdList.value == "prodIntrigue"){
		//pageTracker._trackPageview('/buy/Intrigue');
		window.open("http://www.drugstore.com/products/prod.asp?pid=161431&aid=337919&aparam=ky","_blank");
	}
	//SPECIAL-OFFERS
	else if(hdnProdList == "specialOffer01"){		
		pageTracker._trackPageview();
		window.open("http://bricks.coupons.com/bstart.asp?o=62171&c=KY&p=n6b7ZwIa","_blank");
	}
	else if(hdnProdList == "specialOffer02"){
		pageTracker._trackPageview();
		window.open("http://bricks.coupons.com/bstart.asp?o=62173&c=YM&p=oXtNkHB0","_blank");
	}
	else if(hdnProdList == "specialOffer03"){
		pageTracker._trackPageview();
		window.open("http://bricks.coupons.com/bstart.asp?o=62172&c=NE&p=E0aZ18g9","_blank");
	}

	closeDisclaimer();
}

function buy()
{
	var hdnProdList = document.getElementById("hdnProdList");
	
	if(hdnProdList.value == "213310"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=213310&aid=337919","_blank");
	} 
	if(hdnProdList.value == "213310"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=213310&aid=337919","_blank");
	} 
	
	else if(hdnProdList.value == "fbShare"){
		window.open("http://www.facebook.com/sharer.php?u=http://www.ky.com/articles.jsp&t=KY","_blank");
	} 
	
	else if(hdnProdList.value == "dlShare"){
		window.open("http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ky.com/articles.jsp&amp;title=KY","_blank");
	} 
	else if(hdnProdList.value == "dgShare"){
		window.open("http://digg.com/submit?url=www.ky.com/articles.jsp&title=KY(R)","_blank");
	} 
	else if(hdnProdList.value == "msShare"){
		window.open("http://www.myspace.com/index.cfm?fuseaction=postto","_blank");
	} 
	
	else if(hdnProdList.value == "fbShare101"){
		window.open("http://www.facebook.com/sharer.php?u=http://www.ky.com/nighttimeus101.jsp&t=KY","_blank");
	} 
	
	else if(hdnProdList.value == "dlShare101"){
		window.open("http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ky.com/nighttimeus101.jsp&amp;title=KY","_blank");
	} 
	else if(hdnProdList.value == "dgShare101"){
		window.open("http://digg.com/submit?url=www.ky.com/nighttimeus101.jsp&title=KY(R)","_blank");
	} 
	else if(hdnProdList.value == "msShare101"){
		window.open("http://www.myspace.com/index.cfm?fuseaction=postto","_blank");
	}  
	else if(hdnProdList.value == "facebook"){
		window.open("http://www.facebook.com/kycouples","_blank");
	} 
	
	else if(hdnProdList.value == "drugstore"){
		window.open("http://www.drugstore.com/","_blank");
	} 
	
	else if(hdnProdList.value == "shopKY"){
		window.open("http://www.ky.com/shop","_blank");
	} 
	
	else if(hdnProdList.value == "shopDrugstore"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=213310&aid=337919","_blank");
	} 
	
	else if(hdnProdList.value == "shopCVS"){
		window.open("http://cvssavingscentral.com/Programs/KYBrandIntense.aspx?WT.ac=B_01182010_04_JNJ_10083_KYIntense_TDM","_blank");
	}  
	
	else if(hdnProdList.value == "shopWalmart"){
		window.open("http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=k-y","_blank");
	} 
	
	else if(hdnProdList.value == "shopTarget"){
		window.open("http://www.target.com/gp/search/187-5083472-3194103?field-keywords=ky&url=index%3Dtarget%26search-alias%3Dtgt-index&ref=sr_bx_1_1","_blank");
	} 
	
	else if(hdnProdList.value == "shopWalgreens"){
		window.open("http://www.walgreens.com/search/results.jsp?Ntt=ky","_blank");
	} 
	
	else if(hdnProdList.value == "shopCvs"){
		window.open("http://www.cvs.com/CVSApp/search/search_results.jsp?oss=1&removeAllFacets=true&addFacet=SRCH:ky","_blank");
	} 
	
	else if(hdnProdList.value == "shopRite"){
		window.open("http://www.riteaidonlinestore.com/search/search.asp?searchtype=1&trx=28198&trxp1=36952&ipp=20&srchtree=5&search=k-y","_blank");
	} 
//Products	
	else if(hdnProdList.value == "prodBali"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=139741&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodJelly"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=12679&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodLiquibeads"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=166229&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodNaturalliquid"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=12684&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodNaturalsilk"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=158787&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodOilvariety"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=148752&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTingling"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=161430&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTinglingJelly"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=166230&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodTinglingUltra"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=166232&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarming"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=139740&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarmingJelly"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=90170&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodWarmingLiquid"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=84333&aid=337919","_blank");
	} 
	else if(hdnProdList.value == "prodYourSmineDetails"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=179545&aid=337919","_blank");
	}
	else if(hdnProdList.value == "prodIntrigue"){
		window.open("http://www.drugstore.com/products/prod.asp?pid=161431&aid=337919&aparam=ky","_blank");
	} 
	else if(hdnProdList.value == "prodYourSmineDetailsKissables"){
		pageTracker._trackPageview('BuyNowKissables');
		window.open("http://www.drugstore.com/products/prod.asp?pid=268157&catid=682","_blank");
	}
	 
	else {
		var theForm = document.getElementById("frm-drugstore");
		theForm.target = "_blank";
		theForm.submit();
	}
	closeDisclaimer();

}

function showDisclaimerBuy(productID)
{
	document.getElementById('disclaimer').style.display = 'block';
	var disclaimerText = "This link will take you to a Web site to which this <a href=\"javascript:NewWindow=window.open('/privacy','_blank','width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);\" title=\"Privacy Policy\">Privacy Policy</a> does not apply. <br />We encourage you to read the <a href=\"javascript:NewWindow=window.open('/privacy','_blank','width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);\" title=\"Privacy Policy\">Privacy Policy</a> of every Web site you visit."
	
	topPosition = (document.all)?document.documentElement.scrollTop:window.pageYOffset; 
	centerPosition = (document.documentElement.clientWidth - document.getElementById('disclaimer').offsetWidth) / 2;
	
	document.getElementById('disclaimer-iframe').style.display = 'block';
	document.getElementById('disclaimer-iframe').style.visibility = 'hidden';
	document.getElementById('disclaimer-iframe').style.zIndex = 10;
	document.getElementById('disclaimer').style.zIndex = 50;
	
	document.getElementById('disclaimer-txt').innerHTML = disclaimerText;
	
	document.getElementById('disclaimer-iframe').style.left = centerPosition + "px";
	document.getElementById('disclaimer-iframe').style.top = topPosition + 250 + "px";
	
	document.getElementById('disclaimer').style.left = centerPosition + "px";
	document.getElementById('disclaimer').style.top = topPosition + 250 + "px";

	document.getElementById("link").style.display = "none";

	document.getElementById("btnAccept").style.display = "block";
	
}

function showDisclaimer (disclaimerText,linkId,type) {

	switch(linkId.substring(8)){
	case ("bali.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=139741&catid=21303&brand=7944&trx=PLST-0-BRAND&trxp1=21303&trxp2=139741&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=139741&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=139741&aid=337919&aparam=ky";
		break;
		
	case ("fireside.swf"):
		linkId = "http://www.drugstore.com/search/search.asp?searchtype=1&trx=28198&trxp1=60&ipp=20&srchtree=1&search=KY";
		break;
	
	case ("fireice.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=139744&catid=21303&brand=7944&trx=PLST-0-BRAND&trxp1=21303&trxp2=139744&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		break;
	
	case ("imc.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=151255&catid=21303&trx=PLST-0-SEARCH&trxp1=21303&trxp2=151255&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=177390&aid=337919";
		break;
	
	case ("jelly.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=12679&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=12679&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=12679&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=12679&aid=337919&aparam=ky";
		break;
	
	case ("liquibeads.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=87142&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=87142&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166229&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=166229&aid=337919&aparam=ky";
		break;
	
	case ("longlasting.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=87142&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=87142&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=87142&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=87142&aid=337919&aparam=ky";
		break;
	
	case ("lotionvariety.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=160929&catid=95636&trx=PLST-0-SEARCH&trxp1=95636&trxp2=160929&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		break;
	
	case ("malibu.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=154844&catid=95636&brand=7944&trx=PLST-0-BRAND&trxp1=95636&trxp2=154844&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		break;
	
	case ("naturalliquid.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=12684&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=12684&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=12684&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=12684&aid=337919&aparam=ky";
		break;
	
	case ("naturalmist.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=156102&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=156102&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		break;
	
	case ("naturalsilk.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=158787&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=158787&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=158787&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=158787&aid=337919&aparam=ky";
		break;
	
	case ("oilvariety.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=148752&catid=21303&trx=PLST-0-SEARCH&trxp1=21303&trxp2=148752&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=148752&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=148752&aid=337919&aparam=ky";
		break;
	
	case ("parislotion.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=154842&catid=95636&brand=7944&trx=PLST-0-BRAND&trxp1=95636&trxp2=154842&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		break;
	
	case ("parisoil.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=139742&catid=21303&brand=7944&trx=PLST-0-BRAND&trxp1=21303&trxp2=139742&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=139742&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=139742&aid=337919&aparam=ky";
		break;
	
	case ("secretlotion.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=154843&catid=95636&brand=7944&trx=PLST-0-BRAND&trxp1=95636&trxp2=154843&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		break;
	
	case ("secretoil.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=139743&catid=21303&brand=7944&trx=PLST-0-BRAND&trxp1=21303&trxp2=139743&trxp3=1&trxp4=0&btrx=BUY-PLST-0-BRAND&cmbProdBrandFilter=7944";
		break;
	
	case ("silk-e.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=38977&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=38977&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=38977&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=38977&aid=337919&aparam=ky";
		break;
	
	case ("tingling.swf"):
		// linkId = "http://www.drugstore.com/templates/brand/default.asp?brand=7944&trx=SEARCH-BNAV-0-BSTORE&trxp2=7944";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=161430&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=161430&aid=337919&aparam=ky";
		break;
	
	case ("tingling_ultra.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166232&catid=72419&trx=PLST-0-CAT&trxp1=72419&trxp2=166232&trxp3=1&trxp4=0&btrx=BUY-PLST-0-CAT";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166232&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=166232&aid=337919&aparam=ky";
		break;
	
	case ("warming.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=139740&catid=21303&trx=PLST-0-SEARCH&trxp1=21303&trxp2=139740&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		if (type == "2.5")
		{
			// linkId = "http://www.drugstore.com/products/prod.asp?pid=148751&aid=337919";
			linkId = "http://www.drugstore.com/products/prod.asp?pid=148751&aid=337919&aparam=ky";
		}
		else
		{
			// linkId = "http://www.drugstore.com/products/prod.asp?pid=139740&aid=337919";
			linkId = "http://www.drugstore.com/products/prod.asp?pid=139740&aid=337919&aparam=ky";
		}
		
		break;
	
	case ("warmingjelly.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=90170&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=90170&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		if (type == "2.5")
		{
			// linkId = "http://www.drugstore.com/products/prod.asp?pid=90169&aid=337919";
			linkId = "http://www.drugstore.com/products/prod.asp?pid=90169&aid=337919&aparam=ky";
		}
		else
		{
			// linkId = "http://www.drugstore.com/products/prod.asp?pid=90170&aid=337919";
			linkId = "http://www.drugstore.com/products/prod.asp?pid=90170&aid=337919&aparam=ky";
		}
		break;
	
	case ("warmingliquid.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=84333&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=84333&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		if (type == "2.5")
		{
			// linkId = "http://www.drugstore.com/products/prod.asp?pid=84333&aid=337919";	
			linkId = "http://www.drugstore.com/products/prod.asp?pid=84333&aid=337919&aparam=ky";
		}
		else
		{
			linkId = "http://www.drugstore.com/products/prod.asp?pid=80872&aid=337919";	
		}

		break;
	
	case ("warmingmist.swf"):
		linkId = "http://www.drugstore.com/products/prod.asp?pid=156101&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=156101&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		break;
	
	case ("warmingsilk.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=158786&catid=682&trx=PLST-0-SEARCH&trxp1=682&trxp2=158786&trxp3=1&trxp4=0&btrx=BUY-PLST-0-SEARCH";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=158786&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=158786&aid=337919&aparam=ky";
		break;
	
	case ("tingling_jelly.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166230&catid=682";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166230&aid=337919";
		linkId = "http://www.drugstore.com/products/prod.asp?pid=166230&aid=337919&aparam=ky";
		break;

	case ("kyintrigue/tantalize.swf"):
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166230&catid=682";
		// linkId = "http://www.drugstore.com/products/prod.asp?pid=166230&aid=337919";
		linkId = "http://www.uol.com.br";
		break;

		
	
	default:
	  
	}

	document.getElementById('disclaimer').style.display = 'block';
	
	topPosition = (document.all)?document.documentElement.scrollTop:window.pageYOffset; 
	centerPosition = (document.documentElement.clientWidth - document.getElementById('disclaimer').offsetWidth) / 2;
	
	document.getElementById('disclaimer-iframe').style.display = 'block';
	document.getElementById('disclaimer-iframe').style.visibility = 'hidden';
	document.getElementById('disclaimer-iframe').style.zIndex = 10;
	document.getElementById('disclaimer').style.zIndex = 50;
	
	document.getElementById('disclaimer-txt').innerHTML = disclaimerText;
	
	document.getElementById('disclaimer-iframe').style.left = centerPosition + "px";
	document.getElementById('disclaimer-iframe').style.top = topPosition + 250 + "px";
	
	document.getElementById('disclaimer').style.left = centerPosition + "px";
	document.getElementById('disclaimer').style.top = topPosition + 250 + "px";

	document.getElementById("link").href = linkId;
}

function closeDisclaimer(){
	document.getElementById('disclaimer').style.display = 'none';
	document.getElementById('disclaimer-iframe').style.display = 'none';
}

function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
}

function comboLinks(){
	
	getPageSizeWithScroll();
	
	document.getElementById('comboLinks').style.display = 'block';

	topPosition = (document.all)?document.documentElement.scrollTop:window.pageYOffset; 
	centerPosition = (document.documentElement.clientWidth - document.getElementById('comboLinks').offsetWidth) / 2;
	
	document.getElementById('comboLinks-iframe').style.display = 'block';
	document.getElementById('comboLinks-iframe').style.visibility = 'hidden';
	document.getElementById('comboLinks-iframe').style.zIndex = 10;
	document.getElementById('comboLinks').style.zIndex = 50;
	
	document.getElementById('comboLinks-iframe').style.left = centerPosition + 5 + "px";
	//document.getElementById('comboLinks-iframe').style.top = topPosition + 250 + "px";
	document.getElementById('comboLinks-iframe').style.top = yWithScroll - 210 + "px";
	
	document.getElementById('comboLinks').style.left = centerPosition + 5 + "px";
	//document.getElementById('comboLinks').style.top = topPosition + 250 + "px";
	document.getElementById('comboLinks').style.top = yWithScroll - 210 + "px";
	
	if(navigator.appName == 'Microsoft Internet Explorer') {
		document.getElementById('comboLinks').style.top = yWithScroll - 240 + "px";
		document.getElementById('comboLinks-iframe').style.top = yWithScroll - 240 + "px";
	}

	
	$("#comboLinks").mouseout(function(){
            $("#comboLinks").hide();
        }).mouseover(function(){
            $("#comboLinks").show();
        });

}

function closeCombo(){
	document.getElementById('comboLinks').style.display = 'none';
	document.getElementById('comboLinks-iframe').style.display = 'none';
}

function link(param){
	domainName = window.location.hostname;
	
	if(domainName == "148.177.2.31"){
		domainLink = "http://148.177.2.31:8171/"+param;
	}
	else if(domainName == "www.k-y.com"){
		domainLink = "http://www.k-y.com/"+param;
	}
	else{
		domainLink = "http://localhost:8171/"+param;
	}
	
	window.open(domainLink,"_self");
	
	//alert(domainName);	
}
