function PopUpWindow(url,height,width,resize,scroll,toolbar,menubar,status,location)
{
	var theURLuser = url;
	var wd = width;
	var ht = height;
	var rs = resize;
	var sc = scroll;
	var tb = toolbar;
	var mb = menubar;
	var st = status;
	var lc = location;
	newWindow = window.open(theURLuser,'_blank','toolbar='+tb+',menubar='+mb+',resizable='+rs+',scrollbars='+sc+',status='+st+',location='+lc+',width='+wd+',height='+ht);
}

function Image_Click(setvalue)
{
	document.location = "SelectSKU.aspx?skuid=" + setvalue;
}

function Logo_Click(setvalue)
{
	document.location = setvalue;
}

function setFocusEmail()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtEmailAddress.focus()
	}
}

function setFocusLLNumber()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtLLorGCNumber.focus()
	}
}

function setFocusCheckoutCardNumber()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtCardNumber.focus()
	}
}

function setFocusCheckoutCardMessage()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtMessage.focus()
	}
}

function setFocusCheckoutEmail()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtEmailAddress.focus()
	}
}

function setFocusCheckoutLLNumber()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtLLorGCNumber.focus()
	}
}

function setFocusCheckoutFirstName()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtFirstName.focus()
	}
}

function setFocusCheckoutCVV2()
{
	with (document.all) 
	{
			_ctl0_eTAMCheckoutPlaceHolder_txtCVV2.focus()
	}
}

function setFocusStartDate()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtStartDate.focus()
	}
}

function setFocusServerName()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtServerName.focus()
	}
}

function setFocusFirstName()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtFirstName.focus()
	}
}

function setFocusWebMasterEmail()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtWebMasterEmail.focus()
	}
}

function setFocusKey1()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtKey1.focus()
	}
}

function setFocusCardNumber()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtCardNumber.focus()
	}
}

function setFocusContactName()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtContactName.focus()
	}
}

function setFocusQuantity()
{
	with (document.all) 
	{
			_ctl0_eTAMContent_txtQty.focus()
	}
}

function CheckAdvance1()
{
    //alert("Made it here. Length is " + document.eTAMForm.txtKey1.value.length);
    if (document.all._ctl0_eTAMContent_txtKey1.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey2.focus();
    }
}

function CheckAdvance2()
{
    if (document.all._ctl0_eTAMContent_txtKey2.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey3.focus();
    }
}

function CheckAdvance3()
{
    if (document.all._ctl0_eTAMContent_txtKey3.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey4.focus();
    }
}

function CheckAdvance4()
{
    if (document.all._ctl0_eTAMContent_txtKey4.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey5.focus();
    }
}

function CheckAdvance5()
{
    if (document.all._ctl0_eTAMContent_txtKey5.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey6.focus();
    }
}

function CheckAdvance6()
{
    if (document.all._ctl0_eTAMContent_txtKey6.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey7.focus();
    }
}

function CheckAdvance7()
{
    if (document.all._ctl0_eTAMContent_txtKey7.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey8.focus();
    }
}

function CheckAdvance8()
{
    if (document.all._ctl0_eTAMContent_txtKey8.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_txtKey9.focus();
    }
}

function CheckAdvance9()
{
    if (document.all._ctl0_eTAMContent_txtKey9.value.length == 4)
    {
	    document.all._ctl0_eTAMContent_btnContinue.focus();
    }
}

function SetShipOption(setvalue,carrier)
		{
			document.all._ctl0_eTAMCheckoutPlaceHolder_txtShipOption.value = setvalue;
			document.all._ctl0_eTAMCheckoutPlaceHolder_txtShipCarrier.value = carrier;
		}
		
function SetGiftWrap()
{
	if (document.all.GiftWrap.checked == true)
	{
		document.all._ctl0_eTAMCheckoutPlaceHolder_txtGiftWrapped.value = 2;
	}
	else
	{
		document.all._ctl0_eTAMCheckoutPlaceHolder_txtGiftWrapped.value = 1;
	}
}

function OpenLicenseWindow()
{
    window.open("UPSPrintableLicense.aspx","","height=600,width=700,left=80,top=80,scrollbars=yes,resizable=yes");
}

function LoadReturnPolicyInfo()
{
 	myFloater = window.open('','myWindow','scrollbars=no,status=no,width=600,height=375')
	myFloater.location.href = "HTML/ShipReturnPolicy.htm";
}

function LoadSendEmail(skuid)
{
 	myFloater = window.open('','myWindow','scrollbars=no,status=no,width=435,height=450,left=10,top=10')
	myFloater.location.href = "EmailPage.aspx?skuid=" + skuid;
}

function LoadUserImage(url)
{
 	myFloater = window.open('','myWindow','status=no,width=400,height=250,left=10,top=10,scrollbars=yes,resizable=yes')
	myFloater.location.href = url;
}

//	newWindow = window.open(theURLuser,'_blank','toolbar='+tb+',menubar='+mb+',resizable='+rs+',scrollbars='+sc+',status='+st+',location='+lc+',width='+wd+',height='+ht);


//function HideSort()
//{
//    with (document.all) 
//	{
//	    _ctl0_eTAMContent_cboSortBy.style.visibility="hidden";
//	}
//}

//function ShowSort()
//{
//    with (document.all) 
//	{
//	    _ctl0_eTAMContent_cboSortBy.style.visibility="visible";
//	}
//}