// JavaScript Document

function CheckInfo() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
if(WithoutContent(document.MyOtherForm.F_UserName.value))
		{ errormessage += "\n\nPlease enter a username."; }
if(WithoutContent(document.MyOtherForm.F_Password.value))
		{ errormessage += "\n\nPlease enter a password."; }
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfo1() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
if(WithoutContent(document.MyOtherForm1.F_LastName.value))
		{ errormessage += "\n\nPlease enter the first 3 letters of last name."; }
if(WithoutContent(document.MyOtherForm1.F_BonusCard.value))
		{ errormessage += "\n\nPlease enter your BonusCard number."; }
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfo2() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum

if(NoneWithCheck(document.MyOtherForm.contactinfo))
	{ errormessage += "\n\nPlease check yes or no if you like to be contacted."; }

var chkval = "Y";
	if (document.MyOtherForm.contactinfo[1].checked){
	
	if(WithoutContent(document.MyOtherForm.F_FirstName.value))
			{ errormessage += "\n\nPlease enter your first name."; }
	if(WithoutContent(document.MyOtherForm.F_LastName.value))
			{ errormessage += "\n\nPlease enter your last name."; }
	if(WithoutContent(document.MyOtherForm.F_Address1.value))
			{ errormessage += "\n\nPlease enter your address."; }
	if(WithoutContent(document.MyOtherForm.F_City.value))
			{ errormessage += "\n\nPlease enter your city."; }
	if(WithoutContent(document.MyOtherForm.F_State.value))
			{ errormessage += "\n\nPlease enter your state."; }
	if(WithoutContent(document.MyOtherForm.F_Zipcode.value))
			{ errormessage += "\n\nPlease enter your zip code."; }
	if(WithoutContent(document.MyOtherForm.F_Username.value))
			{ errormessage += "\n\nPlease enter a valid email address."; }

}

	

//if(WithoutSelectionValue(document.MyOtherForm.Category))
//		{ errormessage += "\n\nPlease select a department."; }
//if(WithoutSelectionValue(document.MyOtherForm.Type))
//		{ errormessage += "\n\nPlease select a area."; }		
		
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}
//-->

// JavaScript Document

function CheckInfo2_1() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum

if(NoneWithCheck(document.MyOtherForm.storerelated))
	{ errormessage += "\n\nPlease check if this is store related ."; }

var chkval = "Y";
	if (document.MyOtherForm.storerelated[0].checked){
	
	if(WithoutSelectionValue(document.MyOtherForm.F_PreferredStoreNew))
			{ errormessage += "\n\nPlease select a store."; }
	if(WithoutContent(document.MyOtherForm.strdate.value))
			{ errormessage += "\n\nPlease enter your date."; }
	if(WithoutSelectionValue(document.MyOtherForm.F_IncidentTimeHour))
			{ errormessage += "\n\nPlease enter the hour."; }
	if(WithoutSelectionValue(document.MyOtherForm.F_IncidentTimeMinutes))
			{ errormessage += "\n\nPlease enter the minutes."; }
}

	
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}
//-->

// JavaScript Document

function CheckInfo2a() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum

	if(NoneWithCheck(document.MyOtherForm.Service))
			{ errormessage += "\n\nPlease select a request type."; }
	

//if(WithoutSelectionValue(document.MyOtherForm.Category))
//		{ errormessage += "\n\nPlease select a department."; }
//if(WithoutSelectionValue(document.MyOtherForm.Type))
//		{ errormessage += "\n\nPlease select a area."; }		
		
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}
//-->

// JavaScript Document

function CheckInfoProduct() {
var errormessage = new String();

// Put field checks below this point.

if((document.MyOtherForm.F_BrandType.value == 'Corporate Brand' && document.MyOtherForm.F_CorpBrand.value == '')){
		{ errormessage += "\n\nPlease select a store brand from the drop down."; }
}

if((document.MyOtherForm.F_BrandType.value == 'National Brand' && document.MyOtherForm.F_NatBrand.value == '')){
		{ errormessage += "\n\nPlease enter a national brand name."; }
}

if((document.MyOtherForm.F_Upc.value == '' && document.MyOtherForm.F_Description.value == '')){
		{ errormessage += "\n\nPlease enter either UPC or a description."; }
}

//if(NoneWithCheck(document.MyOtherForm.f_mywebtype))
//		{ errormessage += "\n\nPlease select your concern - Complaint, Praise, or Request."; }
if(WithoutSelectionValue(document.MyOtherForm.F_webCategory))
		{ errormessage += "\n\nPlease select a department."; }
if(WithoutSelectionValue(document.MyOtherForm.F_BrandType))
		{ errormessage += "\n\nPlease select a type of brand."; }
if(WithoutSelectionValue(document.MyOtherForm.F_webType))
		{ errormessage += "\n\nPlease select a action."; }		
if(NoneWithCheck(document.MyOtherForm.f_subtype))
		{ errormessage += "\n\nPlease check one or more check boxes that apply."; }
if(WithoutContent(document.MyOtherForm.f_comments.value))
		{ errormessage += "\n\nPlease enter your comments."; }
		
//if(WithoutContent(document.MyOtherForm.f_comments.value))
	//	{ errormessage += "\n\nPlease enter your comments."; }

//if(WithoutSelectionValue(document.MyOtherForm.F_Title))
//		{ errormessage += "\n\nPlease select a Title."; }
//if(WithoutSelectionValue(document.MyOtherForm.Category))
//		{ errormessage += "\n\nPlease select a department."; }
//if(WithoutSelectionValue(document.MyOtherForm.Type))
//		{ errormessage += "\n\nPlease select a area."; }		
		
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfoComplaint() {
var errormessage = new String();

// Put field checks below this point.
if(WithoutSelectionValue(document.MyOtherForm.F_webCategory))
		{ errormessage += "\n\nPlease select a department."; }
if(WithoutSelectionValue(document.MyOtherForm.F_webType))
		{ errormessage += "\n\nPlease select a area."; }
//if(NoneWithCheck(document.MyOtherForm.routing))
//	{ errormessage += "\n\nPlease select a routing."; }
if(NoneWithCheck(document.MyOtherForm.f_subtype))
		{ errormessage += "\n\nPlease check one or more check boxes that apply."; }
if(WithoutContent(document.MyOtherForm.f_comments.value))
		{ errormessage += "\n\nPlease enter your comments."; }		
		
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfoBCweb() {
var errormessage = new String();

// Put field checks below this point.
if(NoneWithCheck(document.MyOtherForm.f_type))
		{ errormessage += "\n\nPlease check one or more check boxes that apply."; }
		
if(WithoutContent(document.MyOtherForm.f_comments.value))
		{ errormessage += "\n\nPlease enter your comments."; }

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfoGenInfo() {
var errormessage = new String();

// Put field checks below this point.
if(NoneWithCheck(document.MyOtherForm.f_category))
		{ errormessage += "\n\nPlease check one or more check boxes that apply."; }
		
if(WithoutContent(document.MyOtherForm.f_comments.value))
		{ errormessage += "\n\nPlease enter your comments."; }

// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->


// JavaScript Document

function CheckInfo3() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
if(document.MyOtherForm.F_Password.value != '' && document.MyOtherForm.F_Password_check.value != ''){
	if(document.MyOtherForm.F_Password.value != document.MyOtherForm.F_Password_check.value){
		alert ('Passwords do not match.')
	document.MyOtherForm.F_Password.value=''
	document.MyOtherForm.F_Password_check.value=''
	return false; 
		} 
}
	
if(document.MyOtherForm.F_Password.value.length < 4)
		{ errormessage += "\n\nPassword must be between 4 to 10 characters."; }
if(document.MyOtherForm.F_Password.value.length > 10)
		{ errormessage += "\n\nPassword must be between 4 to 10 characters."; }
	
if(WithoutContent(document.MyOtherForm.F_Username.value))
		{ errormessage += "\n\nPlease enter a valid username."; }
if(WithoutContent(document.MyOtherForm.F_Password.value))
		{ errormessage += "\n\nPlease enter a password."; }
if(WithoutContent(document.MyOtherForm.F_Password_check.value))
		{ errormessage += "\n\nPlease enter a confirm password."; }
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function CheckInfo4() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
if(document.MyOtherForm.F_Password.value != '' && document.MyOtherForm.F_Password_check.value != ''){
	if(document.MyOtherForm.F_Password.value != document.MyOtherForm.F_Password_check.value){
		alert ('Passwords do not match.')
	document.MyOtherForm.F_Password.value=''
	document.MyOtherForm.F_Password_check.value=''
	return false; 
		} 
}

if(WithoutContent(document.MyOtherForm.F_Username.value))
		{ errormessage += "\n\nPlease enter a valid username."; }
if(WithoutContent(document.MyOtherForm.F_Password.value))
		{ errormessage += "\n\nPlease enter a password."; }
if(WithoutContent(document.MyOtherForm.F_Password_check.value))
		{ errormessage += "\n\nPlease enter a confirm password."; }
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document

function emailpref() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
{
document.MyOtherForm.F_EmailPreference1.checked=false;
document.MyOtherForm.F_EmailPreference2.checked=false;
}
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

function emailpref1() {
var errormessage = new String();

// Put field checks below this point.
// Check the length of the value of the element named f_storenum
{
document.MyOtherForm.F_EmailPreference3.checked=false;
}
	
// Put field checks above this point.
if(errormessage.length > 2) {
	alert('INCOMPLETE:' + errormessage);
	return false;
	}
return true;
} // end of function CheckRequiredFields()

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

//-->

// JavaScript Document
function keyCheck(eventObj, obj)
{
	var keyCode

	// Check For Browser Type
	if (document.all){ 
		keyCode=eventObj.keyCode
	}
	else{
		keyCode=eventObj.which
	}

	var str=obj.value

	if(keyCode==46){ 
		if (str.indexOf(".")>0){
			return false
		}
	}

	if((keyCode<48 || keyCode >58)){ // Allow only integers and decimal points
		return false
	}

	return true
}
//-->

