function popup(filename,height,width){
	childwindow = window.open(filename,'ViewProduct','top=5,screenx=5,left=5,screeny=5,width='+width+',height='+height+',buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	childwindow.opener = self;
}	//popup

function popupEmail(url,win){
	window.open(url,win,'top=20,screenx=20,left=20,screeny=20,width=480,height=520,buttons=no,scrollbars=auto,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no');
} //popupEmail


function contactpopup(){
	window.open('/contactus_form_small.aspx','ContactFormWindow','top=20,screenx=20,left=20,screeny=20,width=380,height=280,buttons=no,scrollbars=auto,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no');
}

function navprices(){
window.open('/popups/pop_navprices.htm','easypricing','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function navfreeshipping(){
	childwindow = window.open('/popups/pop_navfreeshipping.htm','freeshippingoffer2','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}
function navguarantee(){
window.open('/popups/pop_navguarantee.htm','100guarantee','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function giftmessage(){
window.open('/popups/pop_emailnotice.htm','giftmessage','top=20,screenx=20,left=20,screeny=20,width=400,height=420,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function giftnotice(){
window.open('/popups/pop_giftnotice.htm','giftnotice','top=20,screenx=20,left=20,screeny=20,width=400,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function testimonials(){
window.open('/popups/pop_testimonials.htm','testimonials','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function tellterms(){
window.open('/popups/pop_tell_terms.htm','tellterms','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function tellfaq(){
window.open('/popups/pop_tell_faq.htm','tellfaq','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function tellfriend(){
window.open('/popups/pop_tell_friend.htm','tellfriend','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function tellcoupon(){
window.open('/popups/pop_tell_coupon.htm','tellcoupon','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function tellhelp(){
window.open('/popups/pop_tell_help.htm','tellhelp','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function customfaq(){
window.open('/custom/pop_custom_faq.htm','customfaq','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function customsample(){
window.open('/custom/pop_custom_sample.htm','customsample','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function customform(){
window.open('/custom/custom_form.asp','customform','top=20,screenx=20,left=20,screeny=20,width=570,height=500,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function customprint(){
window.open('/custom/custom_info.htm','customprint','top=20,screenx=20,left=20,screeny=20,width=570,height=500,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no');
}
function guarantee(){
window.open('/popups/pop_security.htm','security','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function newarrivals(){
window.open('/popups/pop_newarrivals.htm','newarrivals','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function popular(){
window.open('/popups/pop_popular.htm','popular','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function satisfaction(){
window.open('/popups/pop_satisfaction.htm','satisfaction','top=20,screenx=20,left=20,screeny=20,width=370,height=420,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function search(){
window.open('/popups/pop_search.htm','search','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function shipping(){
window.open('/popups/pop_shipping.htm','shipping','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function shirtcolor(){
window.open('/popups/pop_shirtcolor.htm','shirtcolor','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function shirtcolor_ash(){
window.open('/popups/pop_shirtcolor_ash.htm','shirtcolor_ash','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function shirtcolor_black(strImage){

	var strTarget;	//used for putting page and image together
	var strPage;	//url of destination page with querystring already constructed

	strPage   = '/popups/pop_shirtcolor_black.htm?image=';
	strTarget = strPage + strImage;

	window.open(strTarget ,'shirtcolor_black','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');

}

function shirtcolor_white(strImage){

	var strTarget;	//used for putting page and image together
	var strPage;	//url of destination page with querystring already constructed

	strPage   = '/popups/pop_shirtcolor_black.htm?image=';
	strTarget = strPage + strImage;

	window.open(strTarget,'shirtcolor_white','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}


function shirtsize(){
window.open('/popups/pop_shirtsize2.asp','shirtsize','top=20,screenx=20,left=20,screeny=20,width=425,height=515,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function shirtsizelicensed(){
window.open('/popups/pop_shirtsize_preprint.asp','shirtsize','top=20,screenx=20,left=20,screeny=20,width=425,height=515,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function shirtsize2(strTarget){
window.open(strTarget,'productdetails','width=425,height=515,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no');
}

function shirtstyle(){
window.open('/popups/pop_shirtcontent2.asp','shirtstyle','top=20,screenx=20,left=20,screeny=20,width=425,height=515,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function shirtstyle2(){
window.open('/popups/pop_shirtstyle.htm','shirtstyle','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function hanes(){
window.open('/popups/pop_hanes.htm','hanes','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function sendtoafriend(page){
window.open('/email_page.aspx?p='+page,'sendtoafriend','top=20,screenx=20,left=20,screeny=20,width=370,height=440,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function freeshipping(){
window.open('/popups/pop_freeshipping.htm','freeshipping','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function freetshirt(){
window.open('/popups/pop_freetshirt.htm','freetshirt','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function freetote(){
window.open('/popups/pop_freetote.htm','freetote','top=20,screenx=20,left=20,screeny=20,width=370,height=425,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function cookies(){
window.open('/popups/pop_cookies.htm','freeshipping','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function xmasship(){
window.open('/popups/pop_xmasship.htm','xmasship','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}


function rushservice(){
window.open('/popups/pop_rushservice.htm','freeshipping','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function contactus(){
window.open('/pop_contactus.htm','contact','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function sendtoafriend2(){
window.open('/pop_emailshirt2.htm','hanes','top=20,screenx=20,left=20,screeny=20,width=370,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}


function customerservice(){
window.open('/customer_service/index.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function customshirts(){
window.open('/customer_service/customshirts.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function howtoupload(){
	childwindow = window.open('/popups/pop_custom_howdoiupload.htm','customserservice','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}
function imagerequire(){
	childwindow = window.open('/popups/pop_custom_imagerequire.htm','customerservice','top=20,screenx=20,left=20,screeny=20,width=370,height=450,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}

function multiplecolors(){
	childwindow = window.open('/popups/pop_custom_multiplecolors.htm','customerservice','top=20,screenx=20,left=20,screeny=20,width=250,height=270,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}
function sameside(){
	childwindow = window.open('/popups/pop_custom_sameside.htm','customerservice','top=20,screenx=20,left=20,screeny=20,width=250,height=340,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}
function returnpolicy(){
window.open('/customer_service/returns.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function privacy(){
window.open('/customer_service/privacy.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function contact(){
	childwindow = window.open('/customer_service/contactus.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}

function emailform(){
	childwindow = window.open('/customer_service/contactemail.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	if (childwindow.opener == null) {
		childwindow.opener = self;
	}
}

function about(){
window.open('/customer_service/aboutus.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function shopping(){
window.open('/customer_service/sizing.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function international_old(){
window.open('/customer_service/purchasing.htm','customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function CSCNA1123(){
	window.open('/popups/cscna1123.asp','couponpopup','top=5,screenx=5,left=5,screeny=5,width=200,height=310,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function fatherdelivery(){
window.open('/popups/pop_fatherdelivery.htm','father','top=20,screenx=20,left=20,screeny=20,width=370,height=380,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function popup_bingonet(){
window.open('/affiliates/popup_bingonet/bingo_popup.htm','father','top=20,screenx=20,left=20,screeny=20,width=320,height=400,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function reminder(){
window.open('/html/reminder.asp','reminder','top=20,screenx=20,left=20,screeny=20,width=370,height=200,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function view(strProductID){
	window.open('/productpopup.aspx?productid=' + strProductID,'productdetails','width=250,height=320,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no');
}
function viewshirtlarge(strProductID){
	window.open('/productpopuplarge.aspx?productid=' + strProductID,'productdetails','width=640,height=585,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function thawte(){
	window.open('https://www.thawte.com/cgi/server/certdetails.exe?referer=/','thawte','top=20,screenx=20,left=20,screeny=20,width=500,height=510,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function international(){
	window.open('/popups/pop_ship_international.htm','popup','top=20,screenx=20,left=20,screeny=20,width=360,height=360,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function no_international(){
	window.open('/popups/pop_ship_no_international.htm','popup','top=20,screenx=20,left=20,screeny=20,width=360,height=360,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}


function express(){
	window.open('/popups/pop_ship_express.htm','popup','top=20,screenx=20,left=20,screeny=20,width=360,height=360,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function priority(){
	window.open('/popups/pop_ship_priority.htm','popup','top=20,screenx=20,left=20,screeny=20,width=360,height=360,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function pop_up_file(filename){
window.open(filename,'customerservice','top=5,screenx=5,left=5,screeny=5,width=575,height=400,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}

function headshot(filename){
	childwindow = window.open(filename,'headshots','top=5,screenx=5,left=5,screeny=5,width=477,height=500,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	childwindow.opener = self;
}

function headshotindirect(filename){
	childwindow = window.open(filename,'headshots','top=5,screenx=5,left=5,screeny=5,width=477,height=500,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
	childwindow.opener = self.opener
}

function pop_up_file_narrow(filename){
window.open(filename,'customerservice','top=5,screenx=5,left=5,screeny=5,width=431,height=515,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function pop_up_file_narrow2(filename){
window.open(filename,'customerservice','top=5,screenx=5,left=5,screeny=5,width=360,height=360,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no');
}
function focusme() {
	window.focus();
}

//utility functions for showitem.aspx

//determines which control to update
function doPulldownUpdate(objControl)
{
    var strID = objControl.id
    var intControl = strID.substring(strID.indexOf('ctl') + 3 , strID.indexOf('ctl') + 4);
    if (intControl == 0)
    {
        loadSizeList();
    }

    if (intControl == 1)
    {
        loadColorList();
    }
}

function loadStyleList()
{
    if (document.getElementById('lstSKUBuilder__ctl0_drpSelector'))
    {
        var listObj = document.getElementById('lstSKUBuilder__ctl0_drpSelector');
        var strSelectedStyle = document.getElementById('lstSKUBuilder__ctl0_drpSelector').value;
        var strSelectedSize = document.getElementById('lstSKUBuilder__ctl1_drpSelector').value;
        var strSelectedColor = document.getElementById('lstSKUBuilder__ctl2_drpSelector').value;

        document.getElementById('lstSKUBuilder__ctl1_drpSelector').options[0].selected = true;
        document.getElementById('lstSKUBuilder__ctl2_drpSelector').options[0].selected = true;

        // empty options from list
        listObj.length = 0;
        var n = 0;
        var selectIndex = 0;
        for (var i = 0; i < arrStyleCodes.length; i++)
        {
            if (n == 0 || validNewListItem(arrStyleCodes[i], strSelectedSize, strSelectedColor, i))
            {
                listObj.options[n] = new Option(arrStyleDescript[i], arrStyleCodes[i])
                n++;
            }
        }

        if (n <= 0)
        {
            listObj.options[0] = new Option(arrSizeCodes[0]);
        }
        listObj.options[selectIndex].selected = true
    } //if (document.getElementById('lstSKUBuilder__ctl0_drpSelector'))
} // loadStyleList

function loadSizeList()
{
    if (document.getElementById('lstSKUBuilder__ctl1_drpSelector'))
    {
        var listObj = document.getElementById('lstSKUBuilder__ctl1_drpSelector');
        var strSelectedStyle = document.getElementById('lstSKUBuilder__ctl0_drpSelector').value;
        var strSelectedSize = document.getElementById('lstSKUBuilder__ctl1_drpSelector').value;
        var strSelectedColor = document.getElementById('lstSKUBuilder__ctl2_drpSelector').value;

        document.getElementById('lstSKUBuilder__ctl2_drpSelector').options[0].selected = true;

        // empty options from list
        listObj.length = 0;
        var n = 0;
        var selectIndex = 0;
        for (var i = 0; i < arrStyleCodes.length; i++)
        {
            if (n == 0 || validNewListItem(strSelectedStyle, arrSizeCodes[i], strSelectedColor, i))
            {
                listObj.options[n] = new Option(arrSizeDescript[i], arrSizeCodes[i])
                n++;
            }
        }

        if (n <= 0)
        {
            listObj.options[0] = new Option(arrSizeCodes[0]);
        }

        listObj.options[selectIndex].selected = true
        if (strSelectedStyle == "DA")
        {
            setprice(strSelectedStyle, "-A", strSelectedColor);
        }
        else
        {
            setprice(strSelectedStyle, "-3", strSelectedColor);
        }
    } //if (document.getElementById('lstSKUBuilder__ctl1_drpSelector')) (
} // loadSizeList

function loadColorList()
{
    if (document.getElementById('lstSKUBuilder__ctl2_drpSelector'))
    {
        var listObj = document.getElementById('lstSKUBuilder__ctl2_drpSelector');
        var strSelectedStyle = document.getElementById('lstSKUBuilder__ctl0_drpSelector').value;
        var strSelectedSize = document.getElementById('lstSKUBuilder__ctl1_drpSelector').value;
        var strSelectedColor = document.getElementById('lstSKUBuilder__ctl2_drpSelector').value;

        // empty options from list
        listObj.length = 0;

        var n = 0;
        var selectIndex = 0;

        for (var i = 0; i < arrStyleCodes.length; i++)
        {
            if (n == 0 || validNewListItem(strSelectedStyle, strSelectedSize, arrColorCodes[i], i))
            {
                listObj.options[n] = new Option(arrColorDescript[i], arrColorCodes[i])
                n++;
            }
        }

        if (n <= 0)
        {
            listObj.options[0] = new Option(arrSizeCodes[0]);
        }

        listObj.options[selectIndex].selected = true;
        setprice(strSelectedStyle, strSelectedSize, strSelectedColor);

    } //if (document.getElementById('lstSKUBuilder__ctl2_drpSelector'))
} // loadColorList

function validNewListItem(strStyle, strSize, strColor, intPos)
{
    //If there are any items we've passed already in the array
    //that match any of the parmeters passed in, this one is not new, return false:
    for (var i = 0; i < intPos; i++)
    {
        if ((strStyle == arrStyleCodes[i] || strStyle == "") && (strSize == arrSizeCodes[i] || strSize == "") && (strColor == arrColorCodes[i] || strColor == ""))
        {
            return false;
        }
    }

    //i = intPos at this point
    //if we didn't return false above, this one has not been found;
    //make sure it's applicable to the style/size we're working with right now

    if (strStyle != "" && strStyle != arrStyleCodes[i])
    {
        return false;
    }
    else if (strSize != "" && strSize != arrSizeCodes[i])
    {
        return false;
    }
    else if (strColor != "" && strColor != arrColorCodes[i])
    {
        return false;
    }

    return true;

} //validNewListItem

function setprice(strSelectedStyle, strSelectedSize, strSelectedColor)
{
    var selectIndex = 0;

    //set default size when not passed in
    if (strSelectedStyle == "DA" & strSelectedSize == '')
    {
        strSelectedSize = '-A';
    }
    if (strSelectedSize == '' )
    {
        strSelectedSize = '-3';
    }

    //hunt for matching price
    for (var i = 0; i < arrPriceImages.length; i++)
    {
        if (strSelectedStyle == arrStyleCodes[i] & strSelectedSize == arrSizeCodes[i])
        {
            selectIndex = i;
            break;
        }
    }

    document.getElementById('priceimage').src = arrPriceImages[selectIndex];

} //setprice


