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 =  setvalue;
}

function Logo_Click(setvalue)
{
	document.location = setvalue;
}

function setFocusEmail()
{
	document.getElementById("_ctl0_eTAMContent_txtEmailAddress").focus();
}

function setFocusLLNumber()
{
	document.getElementById("_ctl0_eTAMContent_txtLLorGCNumber").focus();
}

function setFocusCheckoutCardNumber()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtCardNumber").focus();
}

function setFocusCheckoutCardMessage()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtMessage").focus();
}

function setFocusCheckoutEmail()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtEmailAddress").focus();
}

function setFocusCheckoutLLNumber()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtLLorGCNumber").focus();
}

function setFocusCheckoutFirstName()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtFirstName").focus();
}

function setFocusCheckoutCVV2()
{
	document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtCVV2").focus();
}

function setFocusStartDate()
{
	document.getElementById("_ctl0_eTAMContent_txtStartDate").focus();
}

function setFocusServerName()
{
	document.getElementById("_ctl0_eTAMContent_txtServerName").focus();
}

function setFocusFirstName()
{
	document.getElementById("_ctl0_eTAMContent_txtFirstName").focus();
}

function setFocusWebMasterEmail()
{
	document.getElementById("_ctl0_eTAMContent_txtWebMasterEmail").focus();
}

function setFocusKey1()
{
	document.getElementById("_ctl0_eTAMContent_txtKey1").focus();
}

function setFocusCardNumber()
{
	document.getElementById("_ctl0_eTAMContent_txtCardNumber").focus();
}

function setFocusContactName()
{
	document.getElementById("_ctl0_eTAMContent_txtContactName").focus();
}

function setFocusByID(ElementID) {
    document.getElementByID(ElementID);
}

function setFocusQuantity()
{
	document.getElementById("_ctl0_eTAMContent_txtQty").focus();
}

function CheckAdvance(CtrlKey1, CtrlKey2)
{
    //alert("Made it here. Length is " + document.eTAMForm.txtKey1.value.length); 
    if (document.getElementById(CtrlKey1).value.length == 4)
    {
        document.getElementById(CtrlKey2).focus();
    }
}

function SetShipOption(setvalue,carrier, txtShipOption, txtShipCarrier)
		{
		    document.getElementById(txtShipOption).value = setvalue;
		    document.getElementById(txtShipCarrier).value = carrier;
		}
		
function SetGiftWrap()
{
	if (document.getElementById("GiftWrap").checked == true)
	{
		document.getElementById("_ctl0_eTAMCheckoutPlaceHolder_txtGiftWrapped").value = 2;
	}
	else
	{
		document.getElementById("_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, vbskuid)
{
    myFloater = window.open('', 'myWindow', 'scrollbars=no,status=no,width=435,height=450,left=10,top=10')
    if (vbskuid == 0)
        myFloater.location.href = "EmailPage.aspx?skuid=" + skuid;
    else
        myFloater.location.href = "EmailPage.aspx?skuid=" + skuid + "&vbskuid=" + vbskuid;
}
//Added by Mike C 4/21/10
function LoadSendGREmail(grnbr) {
    myFloater = window.open('', 'myWindow', 'scrollbars=no,status=no,width=435,height=450,left=10,top=10')
    myFloater.location.href = "EmailPage.aspx?grnbr=" + grnbr;
}

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.getElementById()) 
//	{
//	    _ctl0_eTAMContent_cboSortBy.style.visibility="hidden";
//	}
//}

//function ShowSort()
//{
//    with (document.getElementById()) 
//	{
//	    _ctl0_eTAMContent_cboSortBy.style.visibility="visible";
//	}
//}

/// <reference path="eTAM_Scripts.js" />


