<!--
//Site Services JS functions

//////////////////////////////////////////////////////////////////
//pops up new window
//////////////////////////////////////////////////////////////////
function popUp(url,w,h,l,t) 
{
	wlNewWin = window.open(url, '','toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,left=' + l + ',top=' + t + ',height=' + h + ',width=' + w);
};

//////////////////////////////////////////////////////////////////
/*this function is used in auto tabbing through 
  text inputs*/
//////////////////////////////////////////////////////////////////
function moveNextField(len, caller,next){
		
	if (event.keyCode > 48) {
		
			if (caller.value.length == len) {
			next.focus();
		}
		
	}
};

/////////////////////////////////////////////////////////////////
/*this function is used to prompt user
  that coupon is to be used
*/
function downloadCoupon(url, width, height, left, top, question, idx) {
		
	if (question != '') {
		
		if (confirm(question)) {
			WLNewWin = window.open('','WLNewWin',"toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);								
			eval('document.frm' + idx).submit();
			WLNewWin.focus();
		}		
	 }
	 
	else {
		
		WLNewWin = window.open('','WLNewWin',"toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);								
		eval('document.frm' + idx).submit();
		WLNewWin.focus();
	}
				
};


/*******************************************************************************
//pass in the name of the select box containing months
//the select box with the days must be the next form object in your form
/*******************************************************************************/
function changedays(thisselectname){
var thisindex;
thisindex= -1;
days= new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
for (x=0; x < document.forms[0].elements.length; x++){
	if (document.forms[0].elements[x].name == thisselectname) {
		thisindex= x;
		daysindex= x+1;
		break;
	}
}
if (thisindex == -1){
	alert("No such element found");
}
else{
	thismonth= document.forms[0].elements[thisindex].selectedIndex;
	document.forms[0].elements[daysindex].length= 1;
	for (i=2; i<=days[thismonth]; i++){
		document.forms[0].elements[daysindex].options[i-1]= new Option(i, i);
	}		
}
}

/*******************************************************************************
// Validation function for Claim Status Form
//
/*******************************************************************************/
function validateClaimStatus(thisform){
	if (thisform.status_question.value == ''){
		alert("Please enter text for the body of the email.");
		thisform.status_question.focus();
		return false;
	}
	if (thisform.subject.value == ''){
		alert("Please enter a subject");
		thisform.subject.focus();
		return false;
	}
	return true;
}

/*******************************************************************************
// Validation function for Inquiry Form
//
/*******************************************************************************/
function validateInquiry(thisform){
	if (thisform.subject.value == ''){
		alert("Please select a subject");
		thisform.subject.focus();
		return false;
	}
	if (thisform.comment.value == ''){
		alert("Please enter your comment or suggestion.");
		thisform.comment.focus();
		return false;
	}
	return true;
}

/*******************************************************************************
// Function to disable Credit Card Expiration Date fields.  
// Originally setup for Brylane members....
/*******************************************************************************/
function CCTypeChanged()
{
	if (document.forms[0])
	{			
		//brylane types don't have expiration dates
		if (document.forms[0].lstCCExpMonth) {
			document.forms[0].lstCCExpMonth.disabled = 
				document.forms[0].lstCCExpYear.disabled=(document.forms[0].lstCCType.selectedIndex>4);
		}
		
		//nullify expiration date fields
		if (document.forms[0].lstCCExpMonth) {
			if (document.forms[0].lstCCExpMonth.disabled == true) {
				document.forms[0].lstCCExpMonth.value = '';
			}
		}
		if (document.forms[0].lstCCExpYear) {
			if (document.forms[0].lstCCExpYear.disabled == true) {
				document.forms[0].lstCCExpYear.value = '';
			}
		}
	}
}	

//--------------------------------------------------------------------------------------------------------
//RR Redesign Specific Scripts --------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------

function RevertLink(thisNavLink)
{
	thisNavLink.style.border = 'solid 1px #E3EFFB';
	thisNavLink.style.borderTopColor = '#FFFFFF';
}

function Outline(thisElement)
{
	thisElement.style.border = 'solid 1px black';    
}

-->