function alignBorderImgs(objImg, x, y){
		var marginSize = 20;
		var screenWidth = Math.max(document.body.offsetWidth, 406) - (marginSize * 4);
		var screenHeight = Math.max(document.body.scrollHeight, 620);
		switch(x){
			case 'l':
				objImg.style.left = marginSize*2;
				break;
			case 'm':
				objImg.style.left = (screenWidth/2 + marginSize/2) - (parseInt(objImg.width)/2);
				break;
			case 'r':
				objImg.style.left = screenWidth - parseInt(objImg.width);
		}
		
		switch(y){
			case 't':
				objImg.style.top = marginSize;
				break;
			case 'b':
				objImg.style.top = screenHeight - parseInt(objImg.height);
		}
		//window.alert(document.getElementById('content').offsetHeight);
		//window.alert(screenHeight);
	}
	
function repositionImgs(){
	var imgs = document.getElementsByTagName('IMG');
	var functionName = document.all ? 'fireEvent' : 'dispatchEvent';
	for (var i=0; i < imgs.length; i++){
		eval("imgs[i]." + functionName + "('onload')");
	}
}

	var useIndex = 0;
	var calloutHeight;
	var usesText = new Array();
	usesText[0] = '<a href="javascript:playMovie()">EXTRA! EXTRA!<br>READ ALL ABOUT IT!' + 
		'<br>ROSEBUD MAKES HISTORY!</a>';
	usesText[1] = '<b>Cosmetic Uses:</b> Outline lips with lip liner of your choice about ¼ ' + 
		'inches from the outside of your lips toward the center. Then use a lip brush to ' +
		'blend the salve to achieve a “pouty look”.<br>Use Rosebud Salve alone or over your ' +
		'favorite hue of lipstick to moisturize and give a “dewy effect”.<br>Apply Rosebud ' +
		'Salve to eyebrows to tame an unruly brow line while also giving sheen.<br>Rosebud ' +
		'Salve is great on fly-away or frizzy hair. Dab a small amount on the palms of ' +
		'your hands and apply sparingly to tresses.<br>Use Rosebud Salve as a subtle accent ' +
		'to cheek bones, collar bones, shoulders, or any other body part that you want to ' +
		'moisturize or enhance.<br>Apply Rosebud Salve lightly to the skin above the eye as ' +
		'a base for powered eye shadow, and then add the desired colors you wish to ' +
		'dazzle your eyes with. The rich emollient properties of the Salve will help to ' + 
		'hold that look all day.';
	usesText[2] = '<b>All-Purpose Uses:</b> Rosebud Salve is perfect for travel as ' +
		'an eye make-up remover, cuticle softener, sunburn easer, dry skin healer, and ' +
		'frizzy fighter. Use Rosebud Salve around the eyes and on the throat for severely ' +
		'parched, dry, or wrinkled skin. ';
	usesText[3] = '<b>Healing Properties:</b> Rosebud Salve can be used to ' +
		'help relieve hemorrhoids, diaper rash, psoriasis, alopecia, and dry scalp. At ' +
		'night, apply Rosebud Salve generously to rough hands and then cover with gloves ' +
		'for an overnight spa-like treatment. Apply Rosebud Salve generously to heels and ' +
		'elbows as well. Rosebud Salve helps to ease skin irritations due to colds, wind ' +
		'burn, insect bites, and “zits”. Rosebud Salve helps relieve the itch associated ' +
		'with chemical burns on the scalp resulting from over-processing (bleaching and ' +
		'coloring) hair.'
		
	function ShowUses(caller){
		var usesDiv = document.getElementById('usesDiv');
		var usesContent = document.getElementById('usesContent');
		var chin = document.getElementById('chin');
		usesContent.innerHTML = usesText[useIndex];
		//window.alert(caller.parentNode.parentNode.parentNode.offsetLeft);
		usesDiv.style.display = 'block';
		usesDiv.style.left = caller.offsetLeft + 80 + caller.parentNode.parentNode.parentNode.offsetLeft;
		usesDiv.style.top = caller.offsetTop + 70 - usesDiv.clientHeight;
		//chin.style.display = 'block';
		//chin.style.left = caller.offsetLeft + 54 + caller.parentNode.parentNode.parentNode.offsetLeft;
		//chin.style.top = caller.offsetTop + 99;
		if (useIndex == usesText.length - 1)
			useIndex = 0;
		else
			useIndex += 1;
	}
	function HideUses(){
		document.getElementById('usesDiv').style.display = 'none';
		//document.getElementById('chin').style.display = 'none';
	}
	
	function keepShow(el){
		document.getElementById('usesDiv').style.display = 'block';
		//document.getElementById('chin').style.display = 'block';
	}
	
	function ShowProduct(url){
			document.getElementById('catalog').innerHTML = '<iframe src=' + url + ' width=406 height=650 frameborder=0 scrolling=no>';
	}
	
	function GoToFrontPage(){
		document.getElementById('catalog').innerHTML = '<IMG src="images/main.gif" width="406" height="650" border=0 usemap="#products">'
	}
	
	function GoBack(){
	try{
		if (parent.document.getElementById('catalog'))
			parent.GoToFrontPage();
		else
			window.close();
		}
	catch(err){window.alert(err.description);}
	}