//alert("YEPPERS");
function goPage(codeName,catID,page){
	location = "catalog.asp?categoryId=" + catID + "&team=" + codeName;
}
function openWin(page,width,height){
	//alert(page);
	window.open(page,"CONSTRUCTION","menubar=no,width=" + width + ",height=" + height + ",toolbar=no");
}

function contactMe(type){
	f = document.forms[0];
	cool=true;
	tableFlag=false;
	feltFlag=false;
	fields = "";
	felt="";
	tableID="";
	i = 0;
	focusField=""; //not used
	formName="form";
//window.location="http://dev.digitalbungalow.com/dynamic_skating/cart/default.asp?type="+type+"&code="+code;
	if(f.imperialCatalogId.type!="hidden"){
		//there is more than one option.  Checking radios
		for(r=0;r<f.imperialCatalogId.length;r++){
			//alert(f.imperialCatalogId[r].value);
			if(f.imperialCatalogId[r].checked){
				tableFlag=true;
				tableID=f.imperialCatalogId[r].value;
			}
		}
		if(!tableFlag){
			fields += "Table Length" + "\n";
			i ++;
			cool = false;
		}
	}
	if(f.felt.type!="hidden"){
		//there is more than one option.  Checking radios
		for(r=0;r<f.felt.length;r++){
			if(f.felt[r].checked){
			felt=f.imperialCatalogId[r].value;
			feltFlag=true;
			}
		}
		if(!feltFlag){
			fields += "Felt Grade" + "\n";
			i ++;
			cool = false;
		}
	}
	if(f.firstname.value==""){
		setAlert("firstname","First Name",formName);
	}
	if(isStringWhitespace(f.lastname.value)){
		setAlert("lastname","Last Name",formName);
	}
	if(isStringWhitespace(f.phone.value)){
		setAlert("phone","Phone Number",formName);
	}
	if(isStringWhitespace(f.email.value)){
		setAlert("email","Email Address",formName);
	}
	if(isStringWhitespace(f.address1.value)){
		setAlert("address1","Address",formName);
	}
	if(isStringWhitespace(f.city.value)){
		setAlert("city","City",formName);
	}
	if(isStringWhitespace(f.state.value)){
		setAlert("state","State",formName);
	}
	if( isStringWhitespace(f.zip.value)  || ( f.zip.value.length < 5 || isNaN(f.zip.value)) ){
		setAlert("zip","Valid 5-Digit Zip Code",formName); //Valid 5-Digit 
	}

	if(cool){
		location="contactDealer.asp?ftype="+felt+"&ttype="+tableID;
	}else{
		s = "";
		if(i > 1){
			s = "s";
		}
		alert("Please select the following field" + s + ":\n" + fields);
	}
}