
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function setTips(page) {
	switch(page) {
		case 'new': 
			new Tip('dailyProdImgRight', 'New Ultra&trade;  Rapid Action Treatment Cream: fights your acne fast. Visibly reduces redness and pimple size in as little as 4 hours. ', { offset:{x:-28, y:-95 } });
			new Tip('penProdImgLeft', 'Introducing the new Ultra&trade;  Pimple Blocker Pen: apply as soon as you feel a pimple coming. Helps stop a pimple in its tracks. ', { offset:{x:-28, y:-95 } });
			break;
		case 'cleansers': 
			new Tip('skin-perfectingProdImgLeft', 'Skin Perfecting Wash gently cleanses and exfoliates with moisturizing ingredients to help maintain soft and clear skin.  Easy-to-use pump. ', { offset:{x:-28, y:-95 } });
			new Tip('oil-free-gelProdImgRight', 'Oil-Free Gel Wash has a gentle formula to cleanse and help clear and prevent breakouts.  Easy-to-use pump. ', { offset:{x:-28, y:-95 } }); 
			new Tip('dailyProdImgLeft', 'StayClear&reg; Daily Face Wash gives you visibly clearer skin. Gentle cleanser cleans pores without overdrying skin. ', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'StayClear&reg; Daily Face Wash for Sensitive Skin has a unique fragrance-free cream for sensitive skin. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgLeft', 'Get clear fast with Ultra&trade; Daily Face Wash, a medicated formula that starts working instantly to help eliminate pimples and oil. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgRight', 'Ultra&trade; Acne Clearing Gel Wash starts working instantly. Cleans and exfoliates to help prevent acne. ', { offset:{x:-28, y:-95 } });
			new Tip('oilProdImgRight', 'Daily Oil Control Cream Cleanser with green tea and peppermint extracts helps to balance oil for hours. ', { offset:{x:-28, y:-95 } });
			new Tip('oilProdImgLeft', 'Oil Control Gel Wash is oil-free and helps clear excess oil build-up. Easy-to-use pump. ', { offset:{x:-28, y:-95 } });
			break;
		case 'scrubs':
			new Tip('dailyfacialscrub', 'Daily Facial Scrub, gentle enough for everday use, cleanses and exfoliates with tiny microbeads.', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgLeft', 'Ultra&trade;  Acne Clearing Scrub exfoliates skin and fights acne fast. Medicated formula starts working instantly.', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'Daily Blackhead Control Scrub for blackhead-prone skin. Purifying Sea Salt helps clear blackheads and purify skin.', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgLeft', 'Deep Cleansing Scrub with micro-beads exfoliates and deep cleans pores to help clear acne.', { offset:{x:-28, y:-95 } });
			break;	
		case 'pads':
			new Tip('dailyProdImgLeft', 'StayClear&reg; Daily Pore Cleansing Pads for a deep clean on-the-go. Gentle enough to use throughout the day. ', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'Ultra&trade;  Deep Pore Cleansing Pads start working instantly to fight pimples fast. Helps prevent acne on the go.  ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgLeft', 'StayClear&reg; Acne Fighting Cleansing Wipes remove makeup, oil, dirt, and bacteria. Helps keep skin oil and shine-free. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgRight', 'Blackhead Control Pads have purifying sea salts to tighten pores and cleans to help prevent blackheads. ', { offset:{x:-28, y:-95 } });
			new Tip('oilProdImgRight', 'Oil Control Cleansing Wipes with green tea and peppermint extracts clean excess oil at home or on-the-go.', { offset:{x:-28, y:-95 } });
			break;	
		case 'creams':
			new Tip('dailyProdImgLeft', 'StayClear&reg; Vanishing Acne Treatment Cream is maximum strength without a prescription to help you get visibly clearer skin. ', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'New Ultra&trade;  Rapid Action Treatment Cream fights your acne fast. Visibly reduces redness and pimple size in as little as 4 hours. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgLeft', 'StayClear&reg; Tinted Acne Treatment Cream is maximum strength without prescription to help heal pimples while concealing them. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgRight', 'StayClear&reg; Adult Acne Treatment Cream is specially made for adult skin. This light cream heals pimples fast. ', { offset:{x:-28, y:-95 } });
			new Tip('penProdImg', 'Introducing the new Ultra&trade;  Pimple Blocker Pen: apply as soon as you feel a pimple coming. Helps stop a pimple in its tracks. ', { offset:{x:-28, y:-95 } });
			break;
		case 'kits':
			new Tip('dailyProdImgLeft', 'Ultra&trade;  Acne Solution System helps you get clear fast and stay clear. Get a skin care routine in 3 easy steps. ', { offset:{x:-28, y:-95 } });
			break;
		case 'astringents':
			new Tip('dailyProdImgLeft', 'Ultra&trade;  Acne Clearing Astringent exfoliates and deep cleans to treat and prevent acne. ', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'Blackhead Control Astringent has purifying sea salt and acne medication for blackhead-prone skin. ', { offset:{x:-28, y:-95 } });
			break;
		case 'mens':
			new Tip('dailyProdImgLeft', 'Energizing Acne Scrub deep cleans pores and exfoliates while preparing skin for a closer shave. ', { offset:{x:-28, y:-95 } });
			new Tip('dailyProdImgRight', 'Skin Clearing Shave Gel reduces razor burn for a low-irritation and smoother shave. ', { offset:{x:-28, y:-95 } });
			new Tip('ultraProdImgLeft', 'Skin Clearing After Shave Balm can be used after shaving or as daily moisturizer. Helps keep skin clear. ', { offset:{x:-28, y:-95 } });
			break;
	}
}

function openGuarantee() {
	document.getElementById('guaranteeBox').className = "guaranteeBox";
}

function closeGuarantee() {
	document.getElementById('guaranteeBox').className = "hidden";
}

function dropDown(id) {
	switch(id) {
		case 'topnav_products': id = 'topNavDropDown_products'; break;
	}
	
	content = new Array("check out our products", "Cleansers", "Scrubs", "Transparent Creams", "Pads and Wipes", "Kits", "Astringents", "Men's");
	
	html = "<div><div class=\"dropdown_title\" id=\"dropdown_title\">" + content[0] + "</div>";
	
	
	for (i = 1; i < content.length; i++) {
		html += "<div class=\"dropdown_content\" onmouseover=\"ddover(this.id);\" onmouseout=\"ddout(this.id);\" id=\"maindrop_" + i + "\">" + content[i] + "</div>";
	}	

	html += "</div>";
	
	elem = document.getElementById(id);
	elem.className = "topNavDropDown";
	elem.style.height = "" + (content.length * 31 - 1) + "px";
	elem.innerHTML = html;
}

function ddover(id) {
	document.getElementById(id).className = "dropdown_content_over";
}

function ddout(id) {
	document.getElementById(id).className = "dropdown_content";
}
