/* @file _class.rules.js
 * @purpose : on a franchise level, this file will contain javascript rules and
 * 	settings which pertain to the loading franchise. these include how some strings
 * 	must be formatted, as well as what settings are spacified
 * @author : Scott McDonald
 * @revision : Added settings object
 * @revision : 7/20/07 - created
 */

function franchiseRules(){
	/* scottm 8/8/2007:4:18 PM
		object which holds settings spacific to the given franchise, for use with
		javascript - most of these settings will also be backed up in ASP to prevent
		people bypassing them using script editing plugins.
	*/
	this.settings = new Object();
	this.debug = false;
	this.phone = _franchiseRules_phone;
	this.email = _franchiseRules_email;
	this.web = _franchiseRules_web;
}


function _franchiseRules_phone(o){
	/*
		Define Franchise Spacific rules applied to phone numbers which are too complex for
		the bullseye interface
	*/
	var val = o.value
	return(val)
}
function _franchiseRules_email(o){
	/*
		Define Franchise Spacific rules applied to email addresses which are too complex for
		the bullseye interface
	*/
	var val = o.value
	return(val)
}

// Friday, March 07, 2008 :: added rule NO WWW
function _franchiseRules_web(o){
	/*
		Define Franchise Spacific rules applied to web addresses which are too complex for
		the bullseye interface
	*/
	var val = o.value

	// WEB RULE NO WWW {
		// var arr = val.split(".");if(arr[0]=="www"){try{arr.splice(0,1);val = arr.join(".");}catch(e){Catch("Century21 _web NO WWW: Failed:: ",e,true);}}
	// }


	return(val)
}


// create an instance of this object at the window global level
window.franchise = new franchiseRules();
