
var newInfoReqWindow
function openInfoReqWindow(partNum,prodName,application) {
	var subWindowDims
	
	var queryString=""
		if (partNum) {
			queryString=queryString + "prodNum=" + escape(partNum) + "&"
		}
		if (prodName) {
			queryString=queryString + "prodName=" + escape(prodName)+ "&"
		}
		if (application) {
			queryString=queryString + "prodApp=" + escape(application)
		}
		var url = "/info_requests.asp"
		if (queryString) {
			url=url + "?" + queryString
		}
	if (!newInfoReqWindow || newInfoReqWindow.closed) {
		
		newInfoReqWindow = window.open(url,"infoReqWindow","width=500,height=400,scrollbars,status,resizable")
		
		if (!newInfoReqWindow.opener) {
			newInfoReqWindow.opener = window
		}
		
	} else {
		// window's already open; update and bring to front
		newInfoReqWindow.location=url
		newInfoReqWindow.focus()
	}
}

var bigImgWindow
function openBigImgWindow(filename,prodName,partNum) {
	
	var queryString=""
		if (filename) {
			queryString=queryString + "filename=" + escape(filename) + "&"
		}
		if (prodName) {
			queryString=queryString + "prodName=" + escape(prodName) 
		}
		if (partNum) {
			queryString=queryString + "&partNum=" + escape(partNum)
		}
		
		var url = "/big_image.asp"
		if (queryString) {
			url=url + "?" + queryString
		}
	if (!bigImgWindow || bigImgWindow.closed) {
		
		bigImgWindow = window.open(url,"bigImgWindow","width=500,height=450,status,scrollbars,resizable,location")
		
		if (!bigImgWindow.opener) {
			bigImgWindow.opener = window
		}
		bigImgWindow.focus()
		
	} else {
		// window's already open; update and bring to front
		
		bigImgWindow.focus()
		bigImgWindow.location=url
		
	}
}

var beautyImgWindow
function openBeautyImgWindow(filename,prodName) {
	
	var queryString=""
		if (filename) {
			queryString=queryString + "filename=" + escape(filename) + "&"
		}
		if (prodName) {
			queryString=queryString + "prodName=" + escape(prodName)
		}
		
		var url = "/beauty_image.asp"
		if (queryString) {
			url=url + "?" + queryString
		}
	if (!beautyImgWindow || beautyImgWindow.closed) {
		
		beautyImgWindow = window.open(url,"beautyImgWindow","width=500,height=425,status,scrollbars,resizable,location")
		
		if (!beautyImgWindow.opener) {
			beautyImgWindow.opener = window
		}
		beautyImgWindow.focus()
		
	} else {
		// window's already open; update and bring to front
		beautyImgWindow.location=url
		beautyImgWindow.focus()
	}
}


//the images are preloaded in the header--conditional ASP upon pageLocation	
function flipCaseProfile(application,profile) {
	var strSrc;
	
	if (application=="Wall Cases") {
		switch (profile) {
			case "Mezzanine Shelves":
				document.imgCaseProfile.src=objWallMezzImg.src;
				break;
			case "Flat Racks":
				document.imgCaseProfile.src=objWallFlatImg.src;
				break;
			case "Flex Zee Racks":
				document.imgCaseProfile.src=objWallZeeImg.src;
				break;
			case "One Step Racks":
				document.imgCaseProfile.src=objWall1StepImg.src;
				break;
			case "Double Step Racks":
				document.imgCaseProfile.src=objWallDoubleImg.src;
				break;
			case "Xtra Step Racks":
				document.imgCaseProfile.src=objWallXtraImg.src;
				break;
			case "Lift Back Racks":
				document.imgCaseProfile.src=objWallLiftImg.src;
				break;
			case "Multi-Step Racks":
				document.imgCaseProfile.src=objWallMultiImg.src;
				break;
			case "Vertical Racks":
				document.imgCaseProfile.src=objWallVertImg.src;
				break;
			case "Specialty Racks":
				document.imgCaseProfile.src=objWallSpecialImg.src;
				break;
			default:
				document.imgCaseProfile.src=objWallImg.src;
				
		}
	}
	else if (application=="Multi-Deck") {
		switch (profile) {
			case "Flat Racks":
				document.imgCaseProfile.src=objMultiFlatImg.src;
				break;
			case "Mezzanine Shelves":
				document.imgCaseProfile.src=objMultiMezzImg.src;
				break;
			case "Inserts":
				document.imgCaseProfile.src=objMultiInsImg.src;
				break;
			case "One Step Racks":
				document.imgCaseProfile.src=objMulti1StepImg.src;
				break;
			case "Multi-Step Racks":
				document.imgCaseProfile.src=objMultiMultiImg.src;
				break;
			case "Vertical Racks":
				document.imgCaseProfile.src=objMultiVertImg.src;
				break;
		}
	}
	else if (application=="Island Cases") {
		switch (profile) {
			case "Flat Racks":
				document.imgCaseProfile.src=objIslandFlatImg.src;
				break;
			case "Flex Zee Racks":
				document.imgCaseProfile.src=objIslandZeeImg.src;
				break;
			case "One Step Racks":
				document.imgCaseProfile.src=objIsland1StepImg.src;
				break;
			case "Xtra Step Racks":
				document.imgCaseProfile.src=objIslandXtraImg.src;
				break;	
			case "Multi-Step Racks":
				document.imgCaseProfile.src=objIslandMultiImg.src;
				break;
			case "Specialty Racks":
				document.imgCaseProfile.src=objIslandSpecialImg.src;
				break;
			case "End Caps":
				document.imgCaseProfile.src=objIslandEndsImg.src;
				break;
			default:
				document.imgCaseProfile.src=objIslandImg.src;
				break;
				
		}
	}
	else if (application=="Mobile Cases") {
		switch (profile) {
			case "Flat Racks":
				document.imgCaseProfile.src=objMobileFlatImg.src;
				break;
			case "Flex Zee Racks":
				document.imgCaseProfile.src=objMobileZeeImg.src;
				break;
			case "One Step Racks":
				document.imgCaseProfile.src=objMobile1StepImg.src;
				break;
			case "Multi-Step Racks":
				document.imgCaseProfile.src=objMobileMultiImg.src;
				break;
			default:
				document.imgCaseProfile.src=objMobileImg.src;
				break;
		}
	}
	
}

var objMobilePuzzle1 = new Image();
var objMobilePuzzle2 = new Image();
objMobilePuzzle1.src='/beautyimages/quarter_round_puzzle1.jpg';
objMobilePuzzle2.src='/beautyimages/quarter_round_puzzle2.jpg';

function flipMobilePuzzle() {
	if (imgMobilePuzzle.src==objMobilePuzzle1.src) {
		imgMobilePuzzle.src=objMobilePuzzle2.src;
	}
	else {
		imgMobilePuzzle.src=objMobilePuzzle1.src;
	}
}
