<!-- // Function to 'activate' images.
 
function swap(img,imgsrc){
	document[img].src=[imgsrc];
}

//Preload Images
//These are all the rollovers 
if (document.images) {            // Active Images
           	hat1_on = new Image(); 
            hat1_on.src = "CART/prodHTML/hat1.jpg";
			hat2_on = new Image(); 
            hat2_on.src = "CART/prodHTML/hat2.jpg";
			hat3_on = new Image(); 
            hat3_on.src = "CART/prodHTML/hat3.jpg";
			hat4_on = new Image(); 
            hat4_on.src = "CART/prodHTML/shirt.jpg";
			hat5_on = new Image(); 
            hat5_on.src = "CART/prodHTML/shirtback.jpg";
}

// New Window w/location

function winpop(w,h,url,winnm){
    var xpos=(screen.width)/2-(w/2);
    var ypos=(screen.height)/2-(h/2);
	var features="toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+w+",height="+h+",left="+xpos+",top="+ypos+"";
	var x=window.open(url,winnm,features);
	x.focus();
}

function scrollpop(w,h,url,winnm){
    var xpos=(screen.width)/2-(w/2);
    var ypos=(screen.height)/2-(h/2);
	var features="toolbar=no,status=yes,menubar=no,location=no,scrollbars=auto,resizable=no,width="+w+",height="+h+",left="+xpos+",top="+ypos+"";
	var x=window.open(url,winnm,features);
	x.focus();
	
}
function updatepop(w,h,url,winnm){
    var xpos=0;
    var ypos=0;
	var features="toolbar=no,status=no,menubar=no,location=no,scrollbars=no,resizable=no,width="+w+",height="+h+",left="+xpos+",top="+ypos+"";
	var x=window.open(url,winnm,features);
}
// Functions to check form validity
function isEmail(elm) {
	if (elm.value.indexOf("@") != "-1" &&
		elm.value.indexOf(".") != "-1" &&
		elm.value != "")
		return true;
		else return false;
}

function isFilled(elm) {
	if (elm.value == "" ||
		elm.value == null)
	return false;
	else return true;
}

function formFilled(form) {
var errorMessage, valid_func;
errorMessage = "Please fill in a valid \n \n";
valid_func = 1;
	if (isEmail(form.email) == false) {
	errorMessage += "email address\n";
	valid_func = 0;
	form.email.focus();
	}
	errorMessage += "\n so we can reply to \n your question.";
	if (valid_func == 0) {
		alert(errorMessage);
		return false;
	}
 	else 
 		return true;
}

// Function to check email in CART
function formFilled(form) {
var errorMessage, valid_func;
errorMessage = "Please fill in a valid \n \n";
valid_func = 1;
	if (isEmail(form.user_email) == false) {
	errorMessage += "email address\n";
	valid_func = 0;
	form.email.focus();
	}
	errorMessage += "\n so we can reply to \n your question.";
	if (valid_func == 0) {
		alert(errorMessage);
		return false;
	}
 	else 
 		return true;
}

// Function to return to previous page 

function goPrev() {
    window.history.back();
}	

-->
