<!-- //function checkForScripting() {	document.getElementById('_javascriptCheck').style.display = 'none';}function checkForScriptAndCookies() {	createCookie('dallasbalfour[cookie_test]',true,null); 		if (readCookie('dallasbalfour[cookie_test]') == null) { return false; } 	else { eraseCookie('dallasbalfour[cookie_test]'); return true; }}function switchImage(imgName, imgSrc) {  if (document.images)  {    if (imgSrc != "none")    {      document.images[imgName].src = imgSrc;    }  }}function createCookie(name,value,days) {	//alert (name + '\n' + value);		if (days) {		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = date.toGMTString();	}	else var expires = '';		var ck = name+"="+value+expires+"; path=/";	top.document.cookie = ck;}function readCookie(name) {	var nameEQ = name + '=';	var ca = top.document.cookie.split(';');		for (var i=0;i<ca.length;i++) {		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}		return null;}function eraseCookie(name) {	createCookie(name,'',false);}function isNumeric(txt){	var ValidChars = "0123456789.";	var IsNumber = true;	var Char;		for (i = 0; i < txt.length && IsNumber == true; i++) { 		Char = txt.charAt(i);				if (ValidChars.indexOf(Char) == -1) {			IsNumber = false;		}	}		return IsNumber;}function isEmpty(txt_fld) {	if ((txt_fld.value.length==0) || (txt_fld.value==null)) { return true; }	else { return false; }}	function isValidString(string, return_invalid_chars) {	valid_chars = '1234567890-_.^~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';	invalid_chars = '';		if (string == null || string == '') return(true);			//For every character on the string.	for (index = 0; index < string.length; index++) {		character = string.substr(index, 1);				//Is it a valid character?		if (valid_chars.indexOf(character) == -1) {			// If not, is it already on the list of invalid characters?			if (invalid_chars.indexOf(character) == -1) {				// If it's not, add it.				if(invalid_chars == '')					invalid_chars += character;				else					invalid_chars += ', ' + character;			}		}	}		//If the string does not contain invalid characters, the function will return true.	//If it does, it will either return false or a list of the invalid characters used	//in the string, depending on the value of the second parameter.	if (return_invalid_chars == true && invalid_chars != '') {		last_comma = invalid_chars.lastIndexOf(',');				if(last_comma != -1) invalid_chars = invalid_chars.substr(0, $last_comma) + ' and ' + invalid_chars.substr(last_comma + 1, invalid_chars.length);				return(invalid_chars);	} else {		return(invalid_chars == ''); 	}}function isValidEmailAddress(email_address) {	//Assumes that valid email addresses consist of user_name@domain.tld	at = email_address.indexOf('@');	dot = email_address.indexOf('.');		//if (at == -1 || dot == -1 || dot <= at + 1 || dot == 0 || dot == email_address.length - 1) return(false);	if (at == -1 || dot == -1 || dot == email_address.length - 1) return(false);		user_name = email_address.substr(0, at);	domain_name = email_address.substr(at + 1, email_address.length);		if (isValidString(user_name) === false || isValidString(domain_name) === false) return(false);		return(true);}function isPhoneNumber(str) {	rePhoneNumber = new RegExp(/^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/);      if (!rePhoneNumber.test(str)) {		 return false;	 }	 	 return true;}function ValidateChampRingDsgnrOtherInfo(frm) {	if (!isNumeric(frm._txtQuantity.value)) { 		alert ('Quantity must be a numeric value.');		frm._txtQuantity.focus();		return false;	}		return true;} function ValidateChampRingDsgnrCntctInfo(frm) {	if (isEmpty(frm._txtName)) { 		alert ('Name must be entered.');		frm._txtName.focus();		return false;	}		if (isEmpty(frm._txtPhone) && isEmpty(frm._txtEmail)) { 		alert ('Either phone OR email must be entered.');		frm._txtPhone.focus();		return false;	}		if (!isEmpty(frm._txtPhone) && !isPhoneNumber(frm._txtPhone.value)) {		alert ('Phone must be entered as:  (123) 456-7890');		frm._txtPhone.focus();		return false;	}		if (!isEmpty(frm._txtEmail) && !isValidEmailAddress(frm._txtEmail.value)) {		alert ('Email must be entered as:  name@domain.com');		frm._txtEmail.focus();		return false;	}		return true;} function cancelChampRingDsgnr() {	if (confirm('Are you sure you would like to cancel your design?\r\n\r\nCancelling will erase all of your current selections.')) {		eraseCookie('dallasbalfour[chmp_rng_size]');		eraseCookie('dallasbalfour[chmp_rng_top_design]');		eraseCookie('dallasbalfour[chmp_rng_custom_stone_panel_design]');		eraseCookie('dallasbalfour[chmp_rng_stone_panel_design]');		eraseCookie('dallasbalfour[chmp_rng_stone_color]');		eraseCookie('dallasbalfour[chmp_rng_side_design_one]');		eraseCookie('dallasbalfour[chmp_rng_side_design_two]');		eraseCookie('dallasbalfour[chmp_rng_metal]');		eraseCookie('dallasbalfour[chmp_rng_champ_event_desc]');		eraseCookie('dallasbalfour[chmp_rng_ring_size]');		eraseCookie('dallasbalfour[chmp_rng_quantity]');		eraseCookie('dallasbalfour[chmp_rng_name]');		eraseCookie('dallasbalfour[chmp_rng_school]');		eraseCookie('dallasbalfour[chmp_rng_phone]');		eraseCookie('dallasbalfour[chmp_rng_email]');		eraseCookie('dallasbalfour[chmp_rng_submit]');					new Ajax.Updater('_divDesignerContainer','inc/chmp_rng_dsgnr/sbmt_dsgn_rvw.php?actn=cncl');		new Ajax.Updater('_divDesignReviewContainer','inc/ajax.php');				obj = document.getElementById('_divDesignerContainer');		obj2 = document.getElementById('_divDesignReviewContainer');		if (null != obj)			obj.style.backgroundColor = '#ffffff';		if (null != obj2)			obj2.style.backgroundColor = '#ffffff';	}}function submitChampRingDsgnr() {	new Ajax.Updater('_divDesignerSubmitResults','inc/chmp_rng_dsgnr/sbmt_dsgn_rvw.php?actn=sbmt');	new Ajax.Updater('_divDesignerContainer','inc/ajax.php');	new Ajax.Updater('_divDesignReviewContainer','inc/ajax.php');			obj = document.getElementById('_divDesignerContainer');	obj2 = document.getElementById('_divDesignReviewContainer');	if (null != obj)		obj.style.backgroundColor = '#ffffff';	if (null != obj2)		obj2.style.backgroundColor = '#ffffff';}function toDollarsAndCents(n) {	var s = "" + Math.round(n * 100) / 100	var i = s.indexOf('.');	if (i < 0) return s + ".00"	var t = s.substring(0, i + 1) + s.substring(i + 1, i + 3)	if (i + 2 == s.length) t += "0"	return t}function changePriceDropdown(thisform, selValue, price, pricediv) {	var modPrice = "";		if(price != "")		price = parseFloat(price);	else		price = 0;			allSelects = thisform.getElementsByTagName("SELECT");		for(i=0;i<allSelects.length;i++) {		currentSelect = allSelects[i];				if(currentSelect.type == "select-one") {			if (selValue == 'value') {				priceval = currentSelect.options[currentSelect.selectedIndex].value;			} else {				priceval = currentSelect.options[currentSelect.selectedIndex].text;			}						pricevalAr = priceval.split("(+$");						if (pricevalAr.length > 1) {				pricevalAr2 = pricevalAr[1].split(")");				priceval = parseFloat(pricevalAr2[0]);			} else {				priceval = 0;			}						//quanNum = currentSelect.name.substring(6);			//quantityInput = findElementInTags("INPUT","name=='vwquantity" + quanNum + "'",thisform);			quantityInput = false;			quantity = 1;						if (quantityInput) quantity = quantityInput.value;			price = price + (parseFloat(priceval) * quantity);		}	}		modPrice = modPrice + "$" + toDollarsAndCents(price);	//	modPrice = modPrice + "$" + price;	if (document.all) {		eval(pricediv).innerHTML = modPrice;	} else if (document.getElementById) {		document.getElementById(pricediv).innerHTML = modPrice;	}}function setTShirtSizes(thisform, thissel) {	allSelects = thisform.getElementsByTagName("SELECT");		for(i=0;i<allSelects.length;i++) {		currentSelect = allSelects[i];				if (currentSelect.name == "Class T-Shirt Size") {			//alert (thissel.options[thissel.selectedIndex].value);			var opt;						if (thissel.options[thissel.selectedIndex].value == "Senior T-Shirt") {				opt = new Option ("XL","XL");			} else {				opt = new Option ("L","L");			}						currentSelect.options[2] = opt;		}	}}// -->