<!--
	// BEGIN SPECIAL CODE TO PREVENT OUR SITES FROM BEING LOADED INTO A FRAME
	if(top!= self) top.location.href = self.location.href;
	// END SPECIAL CODE TO PREVENT OUR SITES FROM BEING LOADED INTO A FRAME
	
	// BEGIN REFINE ATTRIBUTES FUNCTIONS
	function refine_search (baseURL, kwURL) {
		var kw = document.getElementById('refine_search_form').refine_keyword.value;
		if (kw && kwURL) {
			var newURL = kwURL.replace('REFINE_REPLACE', kw);
			document.location.href = newURL;
		} else {
			document.location.href = baseURL;
		}
	}
	
	function pick_att(url) {
		opener.location.href = url;
		self.close();
	}
	
	function isPopup(url) {
		if (!window.name) {
			window.location.href = url;
		}
	}
	// END REFINE ATTRIBUTES FUNCTIONS

	// BEGIN FORGOT YOUR PASSWORD EMAIL VALIDATION
	function validate_email(str) {

		var error = 0;
		var at = "@";
		var dot = ".";
		var string_length = str.length;
		var at_location = str.indexOf(at);
		var local_part = str.substr(0, at_location);
		var domain = str.substr(at_location + 1, string_length);

		var dot_locations_array = new Array();
		for (i = 0; i <= string_length - 1; i++) {
			if (str.substr(i, 1) == dot) {
				dot_locations_array[dot_locations_array.length] = i;
			}
		}

		if (str.indexOf(at,(at_location +1))!=-1) {
			error = 1;
		}

		if (at_location == -1) {
			error = 1;
		}

		if (at_location == 0) {
			error = 1;
		}

		if (at_location == string_length - 1) {
			error = 1;
		}
		
		if (dot_locations_array.length == 0) {
			error = 1;
		} else if (dot_locations_array[0] == 0) {
			error = 1;
		} else if (dot_locations_array[dot_locations_array.length - 1] == string_length - 1) {
			error = 1;
		} else {
			for (i = 0; i <= dot_locations_array.length - 1; i++) {
				if ((str.substr(dot_locations_array[i]+1,2).length < 2) || (str.substr(dot_locations_array[i]+2,1) == "@")) {
					error = 1;
				}
			}
		}

		for (i = 0; i <= dot_locations_array.length - 1; i++) {
			if (str.substr(dot_locations_array[i] + 1, 1) == dot) {
				error = 1;
			}
		}
		
		if (str.indexOf(dot,(at_location + 2)) == -1) {
			error = 1;
		}
		
		if (str.indexOf(" ") != -1) {
			error = 1;
		}
	
		return error;				
	}

	function validate_form() {
		var error = 0;
		var emailID = document.login.email;
		
		if ((emailID.value == null) || (emailID.value == "")) {
			error = 1;
		}
		if (validate_email(emailID.value) == 1) {
			display_errors();
			return false;
		}
		return true;
	}
	
	function display_errors() {
		alert("Your email address does not appear to be a valid format.\nPlease verify your email address and try again.");
		document.getElementById("email_required").style.color = '#f00';
		document.getElementById("email_required").style.fontWeight = 'bold';
	}
	// END FORGOT YOUR PASSWORD EMAIL VALIDATION

//-->
