// JScript source code

function imgRollover(imgID)
{
    var imgSRC;
    imgSRC = document.getElementById(imgID).src;

    var ext = imgSRC.substring(imgSRC.length - 4,imgSRC.length);
    
    if (imgSRC.substring(imgSRC.length - 8,imgSRC.length) == "_HOT" + ext)
    {
    
    }else
    {
        var newSRC = imgSRC.substring(0,imgSRC.length - 4);
        document.getElementById(imgID).src = newSRC + "_HOT" + ext;
    }
}

function imgRollout(imgID)
{
    var imgSRC;
    imgSRC = document.getElementById(imgID).src;

    var ext = imgSRC.substring(imgSRC.length - 4,imgSRC.length);
    
    if (imgSRC.substring(imgSRC.length - 8,imgSRC.length) == ext)
    {
    
    }else
    {
        var newSRC = imgSRC.substring(0,imgSRC.length - 8);
        document.getElementById(imgID).src = newSRC + ext;
    }
}

function changeTabs(tabVal)
{
    
    if (tabVal == 1)
    {
        document.getElementById("tab1").style.display = 'block';
        document.getElementById("tab2").style.display = 'none';
        document.getElementById("addToBagContent").style.display = 'block';
        
    }
    else
    {
        document.getElementById("tab1").style.display = 'none';
        document.getElementById("tab2").style.display = 'block';
        document.getElementById("addToBagContent").style.display = 'none';
    }

}

function shopByCategory(comboID)
{
    /// shop by category select menu, cats have static landing pages so couldnt do it dynamically
	switch (comboID)

	{

		case "21":
            window.location = "/Content/Category-21-1-60.htm?CategoryName=Accessories";
            // men
            break;
         
         case "113":
            window.location = "/content/64.htm";
            //women
            break;
                
		case "50":
            window.location = "/Content/Category-21-1-51.htm?CategoryName=Accessories";
            //accessories
            break;                                             
	}
	
}

function newsletterSignup(emailAddr)
{
	if(emailAddr != "Enter your email address to receive updates on special offers")
	{
		window.location = "/content/36.htm?userEmail=" + escape(emailAddr);
	}

}

function Validate(){
if (document.TopSearchForm.Props.value.length == 0) return true;
    var ary = document.TopSearchForm.Props.value.split(',');
    for(var i=0;i<ary.length;i++)
    {
         if (eval('document.TopSearchForm.Prop' + ary[i].toString() + '.value') != '%'){
         
	        if (document.TopSearchForm.SearchText.value == '') document.TopSearchForm.SearchText.value = ' ';
 		        return true;
         }
    }
}

          
