// dem 05/21/09


function FlipCharts(page) {
OpenWin = this.open(page, "CtrlWindow", "width=580,height=470,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function Kits(page) {
OpenWin = this.open(page, "FeaturesWindow", "width=650,height=450,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no");
}

function Secure(page) {
OpenWin = this.open(page, "Secure", "width=440,height=386,toolbar=no,menubar=no,location=no,scrollbars=no,status=yes,resizable=no");
}

function BMIChart(page) {
OpenWin = this.open(page, "BMIChart", "width=450,height=350,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function Franchise() {
OpenWin = this.open("http://www.dietcenter.com/temps/opportunity/intro.cfm", "Pop1", "width=808,height=825,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=no,status=yes");
}

function FranchiseLogin() {
OpenWin = this.open("http://www.dietcenter.com/temps/fran_login.cfm", "Pop1", "width=375,height=320,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=yes");
}

function MembersLogin() {
OpenWin = this.open("http://www.dietcenter.com/temps/login.cfm", "Pop1", "width=375,height=320,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=yes");
}

function Tell1(page) {
OpenWin = this.open(page, "TellWindow", "width=375,height=325,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function Nutritional(page) {
OpenWin = this.open(page, "NutritionalWindow", "width=550,height=300,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no");
}

function Features(page) {
OpenWin = this.open(page, "FeaturesWindow", "width=675,height=450,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function OpenWindow(page) {
OpenWin = this.open(page, "TellWindow", "width=375,height=450,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function Pop1(page) {
OpenWin = this.open(page, "Pop1", "width=450,height=350,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no");
}

function Pop2(page) {
OpenWin = this.open(page, "Pop1", "width=450,height=290,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function Testimonials() {
OpenWin = this.open("http://www.dietcenter.com/temps/testimonials/1.cfm", "Testimonials2", "width=475,height=440,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no");
}

//locations page
function donothing() {} 
     function gotosite(site) {            
         if (site != "") {                    
             self.location=site;
         }
     }

//free analysis form
function chkForm(f) {
	var checkedButton = ''
	for (i=0; i < f.Gender.length; i++) {
		if (f.Gender[i].checked=='1') {
			var checkedButton = 'True'
		}
	}

	if (checkedButton == '') {
		alert ("Please select - GENDER");
		f.Gender[0].focus();
		return false;
	}
	
	if (f.Weight.value == "") {
		alert ("Please enter - WEIGHT");
		f.Weight.focus();
		return false;
	}

	if (f.HeightFeet.value == "") {
		alert ("Please enter - HEIGHT (Feet)");
		f.HeightFeet.focus();
		return false;
	}

	if (f.HeightInches.value == "") {
		alert ("Please enter - HEIGHT (Inches)");
		f.HeightInches.focus();
		return false;
	}
	
	if (f.Age.value == "") {
		alert ("Please enter - AGE");
		f.Age.focus();
		return false;
	}
	
	if (f.Waist.value == "") {
		alert ("Please enter - WAIST SIZE");
		f.Waist.focus();
		return false;
	}
	
	if (f.Wrist.value == "") {
		alert ("Please enter - WRIST SIZE");
		f.Wrist.focus();
		return false;
	}
	
	if (f.Hip.value == "") {
		alert ("Please enter - HIP SIZE");
		f.Hip.focus();
		return false;
	}
	
	if (f.Forearm.value == "") {
		alert ("Please enter - FOREARM SIZE");
		f.Forearm.focus();
		return false;
	}
	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(f.EMail.value)){
		return true
		}
	{
		alert("Please enter a valid - EMAIL ADDRESS");
		f.EMail.focus();
		return false;
	}		
}


//zip code locator
function chkForm2(f) {
	if (f.ZipCode.value == "") {
		alert ("Please enter - Your Zip Code!");
		f.ZipCode.focus();
		return false;
	}
}


//product ordering
function chkForm3(f) {
	if (f.Quantity.value == "") {
		alert ("Please enter - QUANTITY");
		f.Quantity.focus();
		return false;
	}
}


//product ordering effervescent
function chkForm4(f) {
	var checkedButton = ''
	for (i=0; i < f.ProductNo.length; i++) {
		if (f.ProductNo[i].checked=='1') {
			var checkedButton = 'True'
		}
	}

	if (checkedButton == '') {
		alert ("Please select - SUPPLY (15 or 30 day)");
		f.ProductNo[0].focus();
		return false;
	}
		
	if (f.Quantity.value == "") {
		alert ("Please enter - QUANTITY");
		f.Quantity.focus();
		return false;
	}	
}
