function ChangeStyleForBox(box, styleid) { if (box) { var theScene = box.scene; var otherBoxId = box.getAttribute("relatedBoxId"); if (theScene && otherBoxId && (otherBoxId != "")) { var relBox = theScene.getBoxById(otehrBoxId); if (relBox) relBox.styleId = styleid; } } }