<!--
	// handles a request to edit page copy
	var objWindowEditPageCopy;
	function doEditCopy(contentElementId, pageVersionId, copyType){
	
		if (copyType == undefined){
			copyType = "normal";
		}
		
		var url = "/admin/frm_copy.jsp?contentElementId=" + contentElementId
				+ "&pageVersionId=" + pageVersionId +"&copyType=" + copyType;
		var windowName = "windowEditPageCopy";
		var features = "top=10,left=10,width=650,height=460,menubar=no,toolbar=no,scrolling=no";
		try{
			objWindowEditPageCopy.close();
		} catch (e){}
		objWindowEditPageCopy = window.open(url, windowName, features);
	}

	// handles a request to view a spec sheet
	function doViewSpecSheet(specSheetId, color){
		if (color == undefined){
			color = "0000ff";
		}
		var url = "/dsp_spec_sheet.jsp?specSheetId=" + specSheetId + "&color=" + color + "&rnd=" + new Date().getTime() + "&viewingSpecSheet=true";
		var windowName = "windowSpecSheetPreview";
		var features = "height=500,width=700,toolbar=no,menubar=no,top=0,left=0,scrollbars=yes";
		window.open( url, windowName, features );
	}

	//handles a request to view an image full-sized:
	var objShowImageWindow = null;
	
	function doViewProduct(productId, productType){
		var url="/hnd_products.jsp?productId=" + productId + "&productType=" + productType;
		location = url;
	}


	function doViewImage(imageId){

		var url = "/dsp_image.jsp?imageId=" + imageId;
		var features = "height=400,width=400,menubar=no,scrolling=yes,toolbar=no";
		var winName = "objShowImageWindow";
		try{
			objShowImageWindow.close();
		} catch(e){}
		objShowImageWindow = window.open(url, winName, features);
	
	}
	
	function mouseOverTopNav(objTD){
		objTD.className='topLevelNavTDon';
	}
	
	function mouseOutTopNav(objTD){
		objTD.className='topLevelNavTD';
	}
	
	function fitWindowToContent(){
		var newWidth = parseInt(document.body.scrollWidth);
		var newHeight = parseInt(document.body.scrollHeight);
		if ((screen.width - 30) < newWidth){
			newWidth = screen.width - 30;
		}
		
		if ((screen.height - 65) < newHeight){
			newHeight = screen.height - 65;
		}
		newHeight += 100;
		if (newHeight > screen.height){
			newHeight = screen.height - 60;
		}
		setTimeout("window.resizeTo("+newWidth+","+  newHeight+");", 500);
	}
	
	function sizeToWindow(){
	
		var newHeight = parseInt(document.body.scrollHeight) + parseInt(32);
		var newWidth = parseInt(document.body.scrollWidth) + parseInt(32);
		
		
		if (parseInt(newHeight) > (parseInt(screen.height) - 50)){
			newHeight = screen.height - 150;
			window.dialogTop = 50;
		}
		
		if (parseInt(newWidth) > (parseInt(screen.width) - 50)){
			newWidth = screen.width - 150;
			window.dialogLeft = 50;
		}
		
		window.dialogHeight = (newHeight + "px");
		window.dialogWidth = (newWidth + "px");
	}
	
	function submitDialogForm(){
		var objOpener = window.dialogArguments[0];
		objOpener.document.getElementById("divForForm").innerHTML = document.getElementById("formTable").innerHTML;
		objOpener.document.dialogForm.submit();
		window.close();
	}
	
//-->