if (document.images) {  
	furnitureOn = new Image();
	furnitureOn.src = "../office/images/main_nav/office_furniture_on.gif";
	furnitureOff = new Image();
	furnitureOff.src = "../office/images/main_nav/office_furniture_sel.gif";

	accessoriesOn = new Image();
	accessoriesOn.src = "../office/images/main_nav/accessories_on.gif";
	accessoriesOff = new Image();
	accessoriesOff.src = "../office/images/main_nav/accessories_off.gif";

	finalizeOn = new Image();
	finalizeOn.src = "../office/images/main_nav/finalize_on.gif";
	finalizeOff = new Image();
	finalizeOff.src = "../office/images/main_nav/finalize_off.gif";
}

function ZipSubmit()
	{
		//if (Button_Type == "Submit")
 
				if (document.office_main.zip.value.length < 5)
					{
						alert ("Please enter a valid City & State or zip code")
						return false;
					}
				else
					{
						if (document.office_main.term.value == "")
							{
								alert ("Please select a term");
								return false;
							}
						else
							{
								if (document.office_main.action_name.value == "Submit_Designer") 
								{
									document.office_main.action = "office_main.aspx?myaction=read";
									document.office_main.submit();
								}
								
								if (document.office_main.action_name.value == "Submit_Custom") 
								{
									document.office_main.action = "/catalog/catalog.aspx";
									document.office_main.submit();
								}								
 
							}
					}
				
			
		//else
			//{
				//document.brian_zip.action = "brian_zip.asp?myaction=reset"
				//document.brian_zip.submit()
				//document.residential_main1.action = "residential_main1.asp?myaction=reset"
				//document.residential_main1.submit()
			//}
	}


function imageon(category,imgsrc){

	if(document.images){
		document.images[category].src= imgsrc;
		
	}
}
function imageoff(category,imgsrc){

	if(document.images){
		document.images[category].src= imgsrc;
		
	}
}

function setSRDelAction()
	{
		
		document.office_shop.srdel.value = "Delete";
		
	}

function addtoRequest(txtobj, ovalue){
	//alert(ovalue)
	var objFValue = document.getElementById(txtobj);
	//alert(objFValue.name);


	if(ovalue == objFValue.value)
	{
		objFValue.value = ovalue + 1;
	}

	//return false;	
	document.office_shop.submit();

}


function popSKU(img, caller, e) {
    if (img == '') return;
    var container = document.getElementById('itempop');
    if (container == undefined || container == null) {
        //alert("Didn't exist... creating it!");
        var body = document.getElementsByTagName("body")[0];
        container = document.createElement("div");
        container.setAttribute("id", "itempop");
        container.setAttribute("style", "position: absolute; left: 100px; top: 100px; border: 1px #000 solid;");
        body.appendChild(container);
    }

    if (container != undefined && container != null) {
        container.innerHTML = "";

        // Get the mouse location on the page
        var IE = document.all ? true : false;
        var tempX = 0;
        var tempY = 0;
        if (IE) { // grab the x-y pos.s if browser is IE

            var scTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)
            var scLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft)

            tempX = event.clientX + scLeft; //document.documentElement.scrollLeft;
            tempY = event.clientY + scTop; //document.documentElement.scrollTop;



            if (tempX < 0) { tempX = 0; }
            if (tempY < 0) { tempY = 0; }

            tempX += 5;
            tempY += 20;

            /*container.style.left = tempX + "px";
            container.style.top = tempY + "px";

            container.setAttribute("left", tempX + "px");
            container.setAttribute("top", tempY + "px");*/

            container.style.cssText = "position: absolute; left: " + tempX + "px; top: " + tempY + "px; border: 1px #000 solid;";

            /*alert("document.documentElement.scrollTop=" + document.documentElement.scrollTop + "\r\n" +
            "document.body.scrollTop=" + document.body.scrollTop + "\r\n" +
            "scTop=" + scTop + "\r\n" +
            "event.clientY=" + event.clientY + "\r\n" +
            "tempY=" + tempY + "\r\n" +
            "container.style.top=" + container.style.top + "\r\n");*/
        }
        else {  // grab the x-y pos.s if browser is NS
            tempX = e.pageX;
            tempY = e.pageY;

            if (tempX < 0) { tempX = 0; }
            if (tempY < 0) { tempY = 0; }

            container.style.left = tempX + 5 + "px";
            container.style.top = tempY + 20 + "px";

        }
        //container.style.left = 0;
        //container.style.top = 0;

        //alert('X=' + tempX + ', Y=' + tempY);

        container.innerHTML = '<img src="' + img + '" />';
        container.style.display = "inline";
    }
}

function popSKUHide() {
    var container = document.getElementById('itempop');
    if (container != undefined && container != null) {
        container.style.display = "none";
    }
}
