<!--

// GorillaSoft, Inc.  < www.gorillasoft.com >
// Cherry Creek North Gourmet Series Javascript Resources

// Validate Email Subscribe field

function validateEmail()
{
	re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/;
	if (re.test(document.newsForm.email.value) == true)	
	{
		return true;
	}
	else
	{
		alert("Please enter a valid email address.");
		return false;
	}
}

var imageArray = new Array(
"images/partner_logos/ahhaa.gif",
"images/partner_logos/amarula.gif",
"images/partner_logos/boec.gif", 
"images/partner_logos/beef.gif",   
"images/partner_logos/beaver.gif",  
"images/partner_logos/ccn.gif",  
"images/partner_logos/cme.gif",
"images/partner_logos/cohomes.gif",
"images/partner_logos/comcast.gif", 
"images/partner_logos/dpost.gif",  
"images/partner_logos/gs.gif", 
"images/partner_logos/greatdivide.gif",
"images/partner_logos/inncc.gif",
"images/partner_logos/jwells.gif",
"images/partner_logos/mm.gif", 
"images/partner_logos/malibu.gif", 
"images/partner_logos/sauz.gif",
"images/partner_logos/tmv.gif",
"images/partner_logos/usfoodslogo.gif"
);
var number=imageArray.length;
   var linkArray = new Array(
"www.ahhaa.org",
"www.amarula.co.za",
"www.boec.org" ,
"www.beefeater.com",
"www.beaverrun.com",
"www.cherrycreeknorth.com",
"www.ridecme.com",
"www.coloradohomesmag.com",
"www.comcast.com",
"www.denverpost.org",
"www.gorillasoft.com",
"www.greatdividelodge.com",
"www.innatcherrycreek.com",
"www.jwu.edu",
"www.makersmark.com",
"www.malibu-rum.com" ,
"www.sauzapure.com",
"www.townofmountainvillage.com",
"www.usfoodservice.com" );

// Random number generating function.
function randomizeNumber()
   {
	
	random_number=(Math.round( Math.random()*100))%number;
	//  random_number=numer-1;

   // Set variable image equal to appropriate image file name.
      image=imageArray[random_number];
	  newlink=linkArray[random_number];
   }	
// Art Popup Window

function doCount( thisitem ) 
	
{ 
	i = 0;
	if (  document.passForm.p7.checked )
		i++;
	if (  document.passForm.p8.checked )
		i++;
	if (  document.passForm.p9.checked )
		i++;
	if (  document.passForm.p10.checked )
		i++;
	if (  document.passForm.p11.checked )
		i++;
	if (  document.passForm.p12.checked )
		i++;
	if ( i > 3 )
	{
		thisitem.checked = false;
		alert( 'You Can Only Select Three Seminars');

	}
}

function keepChecked( thisitem ) 
	
{ 

	thisitem.checked = true;
	alert( 'All Pass Items Come Together');

}

function checkForm() 
	
{ 
	i = 0;
	if (  document.passForm.p7.checked )
		i++;
	if (  document.passForm.p8.checked )
		i++;
	if (  document.passForm.p9.checked )
		i++;
	if (  document.passForm.p10.checked )
		i++;
	if (  document.passForm.p11.checked )
		i++;
	if (  document.passForm.p12.checked )
		i++;
	if ( i < 3 )
	{
		alert( 'You Must Select Three Seminars');
		return false;

	}
	return true;

}


// Books Popup Window


function openBigA (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=300,width=455');
	shopwindow.focus();
	
	}
	
	
function openSandy (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=450,width=375');
	shopwindow.focus();
	
	}
	
function openDex (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=310,width=425');
	shopwindow.focus();
	
	}

function openMonkey (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=350,width=425');
	shopwindow.focus();
	
	}

function openTrex (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=350,width=425');
	shopwindow.focus();
	
	}	
	

function openPhotos (theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=475,width=500');
	shopwindow.focus();
	
	}	
// Razoe vator Popup Window
	
	function openRazor(theURL,winName,features)
	
	{ 
	
		
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=0,resizable=0,height=410,width=525');
	shopwindow.focus();
	
	}

// beard Game Window

function openBeard(theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=no,scrollbars=no,resizable=0,height=400,width=575');
	shopwindow.focus();
	
	}

// Cider Ad Window

function openCider(theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=no,scrollbars=no,resizable=0,height=340,width=415');
	shopwindow.focus();
	
	}
	
// Past Events Form Handler

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.open(URL);

}


// Shopping Cart Detail Window

function openDetail(theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=no,resizable=0,height=300,width=350');
	shopwindow.focus();
	
	}
	

// Privacy Policy Window

function openPrivacy(theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=0,resizable=0,height=350,width=500');
	shopwindow.focus();
	
	}


// Print Schedule Window

function openPrint(theURL,winName,features) 
	
	{ 
	
	shopwindow = window.open(theURL,winName,'menubar=0,scrollbars=yes,resizable=0,height=400,width=600');
	shopwindow.focus();
	
	}
	
		
// DemoCenter Script :: Lite Security 


function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value


window.location=password + ".php"

}
	
// Navigation Rollover 

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_weekend_01_over = newImage("images/nav_weekend_01-over.gif");
		preloadFlag = true;
	}
}

// checkout_newmember.php

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function validateForm()
{
	var first = document.getElementById('cuFirstName');
	if ( first.value == '' )
	{
		alert('First Name is required');
		return false;
	}
	var last = document.getElementById('cuLastName');
	if ( last.value == '' )
	{
		alert('Last Name is required');
		return false;
	}
	var address1 = document.getElementById('cuAddress1');
	if ( address1.value == '' )
	{
		alert('Address 1 is required');
		return false;
	}
	var city = document.getElementById('cuCity');
	if ( city.value == '' )
	{
		alert('City is required');
		return false;
	}
	var state = document.getElementById('cuStateID');
	if ( state.selectedIndex == 0 )
	{
		alert('State is required');
		return false;
	}
	var zip = document.getElementById('cuZIP');
	if ( zip.value == '' )
	{
		alert('ZIP is required');
		return false;
	}
	var phone = document.getElementById('cuPhone');
	if ( phone.value == '' )
	{
		alert('Phone is required');
		return false;
	}
	var email = document.getElementById('cuEmail');
	if ( email.value == '' )
	{
		alert('Email is required');
		return false;
	}
	
	return true;
}


// -->
