var myimages=new Array()

function MM_preloadImages() { 
for (i=0;i<MM_preloadImages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=MM_preloadImages.arguments[i]
}
}

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_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];
}
}

var newWindow

function openPopup(url, popupWidth, popupHeight) {

if (newWindow && !newWindow.closed)	{
newWindow.close()
}		
	 
newWindow = open(url, 'Kiehls', ("toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + popupWidth + ",height=" + popupHeight + "\""));
newWindow.focus();
}


function goselreq(elem){
for (var i = document.f1.subjectLine.options.length; i >= 0; i--)
document.f1.subjectLine.options[i] = null;
if (elem.selectedIndex != -1){

<!-- Subjects for Request Type MY ORDER -->	
if (elem.options[elem.selectedIndex].value == 324){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Can I Change My Order?", "332");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Order Status", "333");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Order Problem", "334");
}

<!-- Subjects for Request Type PRODUCT QUESTIONS -->	
if (elem.options[elem.selectedIndex].value == 325){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Product Comments and Suggestions", "335");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Product Ingredients", "336");
}

<!-- Subjects for Request Type CUSTOMER REGISTRY CHANGES -->			
if (elem.options[elem.selectedIndex].value == 326){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Email Change of Address", "337");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Unsubscribe from Customer Registry", "338");
}

<!-- Subjects for Request Type RETAIL LOCATIONS AND SERVICE -->			
if (elem.options[elem.selectedIndex].value == 328){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("UK Retail Locations", "339");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("International Retail Locations", "340");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Retail Service Comments", "342");
}
<!-- Subjects for Request Type INTERNATIONAL -->			
if (elem.options[elem.selectedIndex].value == 329){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("International Orders", "343");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("International Retail Locations", "344");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("International Service Comments/Suggestions", "345");
}

<!-- Subjects for Request Type KIEHL'S CORPORATE -->	
if (elem.options[elem.selectedIndex].value == 330){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Careers", "346");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Corporate Services/Corporate Accounts", "347");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Wholesale Distribution Requests", "348");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Public Relations", "349");
}
<!-- Subjects for Request Type GENERAL -->			
if (elem.options[elem.selectedIndex].value == 331){
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("General Request", "350");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Comments/Suggestions", "351");
document.f1.subjectLine.options[document.f1.subjectLine.options.length]
= new Option("Site Related", "352");
}
}
}

function formValidator(theForm)
{

var checkOK = "0123456789-";
var checkStr = theForm.vwquantity.value;
var allValid = true;
var validGroups = true;
var decPoints = 0;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit characters in the \"quantity\" field.");
theForm.vwquantity.focus();
return (false);
}

var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal >= "1"))
{
alert("Please enter a value greater than or equal to \"1\" in the \"quantity\" field.");
theForm.vwquantity.focus();
return (false);
}

if (chkVal != "" && !(prsVal <= "3") && theForm.vwitem.options!=null && theForm.vwitem.options[theForm.vwitem.selectedIndex].text.indexOf('Sample')!=-1)
{
alert("Please note, only 3 complimentary samples are available with each purchase");
theForm.vwquantity.focus();
return (false);
}

//if (theForm.dropdownChoice.options!=null && theForm.dropdownChoice.options[theForm.dropdownChoice.selectedIndex].value=="")
if (theForm.dropdownChoice!=null && theForm.dropdownChoice.options[theForm.dropdownChoice.selectedIndex].value=="")

{
alert("We\'re sorry. The size you have selected is not currently in stock. Please select another size.");
theForm.dropdownChoice.focus();
return (false);
}

if(document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"] != null)
{
	if(document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][0].value.length > 25 )
	{
		alert("The \'To\' field of the gift message must be 25 characters or less. Please try again.");
		document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][0].focus();
		return (false);
	}

	if(document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][1].value.length > 100 )
	{
		alert("The Gift Message must be 100 characters or less. Please try again.");
		document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][1].focus();
		return (false);
	}

	if(document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][2].value.length > 25 )
	{
		alert("The \'Your Name\' field of the gift message must be 25 characters or less. Please try again.");
		document.yahooForm["vw-inscription-3C423E47494654204D4553534147453A3C2F423E"][2].focus();
		return (false);
	}
}

 if (document.yahooForm["dropdownChoice"]!=null) {
     document.yahooForm["vwitem"].value=document.yahooForm["dropdownChoice"].value;
     document.yahooForm["dropdownChoice"].value='';
     document.yahooForm["dropdownChoice"].visible=false;
     //															alert(document.yahooForm["vwitem"].value);
   }
return (true);
}










